use of com.att.aro.ui.commonui.EnableEscKeyCloseDialog in project VideoOptimzer by attdevsupport.
the class PreferencesDialog method init.
private void init() {
this.setContentPane(getJContentPane());
this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
this.setTitle("Preferences");
enableEscKeyCloseDialog = new EnableEscKeyCloseDialog(getRootPane(), this, false);
this.addWindowListener(new WindowAdapter() {
@Override
public void windowDeactivated(WindowEvent event) {
if (enableEscKeyCloseDialog.consumeEscPressed()) {
dispose();
}
}
});
pack();
setLocationRelativeTo(parent.getFrame());
getRootPane().setDefaultButton(reloadButton);
}
use of com.att.aro.ui.commonui.EnableEscKeyCloseDialog in project VideoOptimzer by attdevsupport.
the class MetadataDialog method init.
private void init() {
this.setContentPane(getJContentPane());
this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
this.setTitle("Metadata");
this.setModal(true);
enableEscKeyCloseDialog = new EnableEscKeyCloseDialog(getRootPane(), this, false);
this.addWindowListener(new WindowAdapter() {
@Override
public void windowStateChanged(WindowEvent event) {
pack();
validate();
}
@Override
public void windowDeactivated(WindowEvent event) {
if (enableEscKeyCloseDialog.consumeEscPressed()) {
dispose();
}
}
});
adjustDimensions();
revalidate();
pack();
setLocationRelativeTo(parent.getFrame());
getRootPane().setDefaultButton(okButton);
}
use of com.att.aro.ui.commonui.EnableEscKeyCloseDialog in project VideoOptimzer by attdevsupport.
the class OpenPcapFileDialog method init.
private void init(String newDirectoryName) {
setContentPane(this.getContentPane(newDirectoryName));
setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
setTitle("Open PCAP File");
EnableEscKeyCloseDialog escKeyCloseDialog = new EnableEscKeyCloseDialog(getRootPane(), this, false);
this.addWindowListener(new WindowAdapter() {
@Override
public void windowDeactivated(WindowEvent event) {
if (escKeyCloseDialog.consumeEscPressed()) {
dispose();
}
}
});
pack();
setLocationRelativeTo(parent.getFrame());
getRootPane().setDefaultButton(okButton);
}
use of com.att.aro.ui.commonui.EnableEscKeyCloseDialog in project VideoOptimzer by attdevsupport.
the class ServerNameIndicationDialog method init.
private void init() {
this.setContentPane(getJContentPane());
this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
this.setTitle("Server Name Indication Dialog");
this.setModal(true);
enableEscKeyCloseDialog = new EnableEscKeyCloseDialog(getRootPane(), this, false);
this.addWindowListener(new WindowAdapter() {
@Override
public void windowDeactivated(WindowEvent event) {
if (enableEscKeyCloseDialog.consumeEscPressed()) {
dispose();
}
}
});
pack();
setLocationRelativeTo(getRootPane());
getRootPane().setDefaultButton(okButton);
}
use of com.att.aro.ui.commonui.EnableEscKeyCloseDialog in project VideoOptimzer by attdevsupport.
the class ExcludeTimeRangeAnalysisDialog method initialize.
/**
* Initializes the dialog.
*
* @return void
*/
private void initialize() {
PacketAnalyzerResult traceresult = ((MainFrame) parent).getController().getTheModel().getAnalyzerResult();
if (traceresult == null) {
LOGGER.error("Trace result error! ");
MessageDialogFactory.getInstance().showErrorDialog(ExcludeTimeRangeAnalysisDialog.this, "wrong..");
} else {
if (endTimeResetValue == 0.0) {
endTimeResetValue = traceresult.getTraceresult().getTraceDuration();
}
traceEndTime = endTimeResetValue;
TimeRange timeRange = traceresult.getFilter().getTimeRange();
if (timeRange != null) {
timeRangeStartTime = timeRange.getBeginTime();
timeRangeEndTime = timeRange.getEndTime();
} else {
timeRangeStartTime = 0.0;
timeRangeEndTime = traceEndTime;
}
}
// For cancel button
saveInitTimeRangeValues(timeRangeStartTime, timeRangeEndTime);
this.setSize(400, 150);
this.setModal(true);
this.setTitle(ResourceBundleHelper.getMessageString(DialogItem.excludetimerangeanalysis_title));
this.setLocationRelativeTo(getOwner());
this.setContentPane(getJDialogPanel());
getRootPane().setDefaultButton(startButton);
new EnableEscKeyCloseDialog(getRootPane(), this);
}
Aggregations