Search in sources :

Example 1 with EnableEscKeyCloseDialog

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);
}
Also used : EnableEscKeyCloseDialog(com.att.aro.ui.commonui.EnableEscKeyCloseDialog) WindowEvent(java.awt.event.WindowEvent) WindowAdapter(java.awt.event.WindowAdapter)

Example 2 with EnableEscKeyCloseDialog

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);
}
Also used : EnableEscKeyCloseDialog(com.att.aro.ui.commonui.EnableEscKeyCloseDialog) WindowEvent(java.awt.event.WindowEvent) WindowAdapter(java.awt.event.WindowAdapter)

Example 3 with EnableEscKeyCloseDialog

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);
}
Also used : EnableEscKeyCloseDialog(com.att.aro.ui.commonui.EnableEscKeyCloseDialog) WindowEvent(java.awt.event.WindowEvent) WindowAdapter(java.awt.event.WindowAdapter)

Example 4 with EnableEscKeyCloseDialog

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);
}
Also used : EnableEscKeyCloseDialog(com.att.aro.ui.commonui.EnableEscKeyCloseDialog) WindowEvent(java.awt.event.WindowEvent) WindowAdapter(java.awt.event.WindowAdapter)

Example 5 with EnableEscKeyCloseDialog

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);
}
Also used : TimeRange(com.att.aro.core.packetanalysis.pojo.TimeRange) EnableEscKeyCloseDialog(com.att.aro.ui.commonui.EnableEscKeyCloseDialog) PacketAnalyzerResult(com.att.aro.core.packetanalysis.pojo.PacketAnalyzerResult) MainFrame(com.att.aro.ui.view.MainFrame)

Aggregations

EnableEscKeyCloseDialog (com.att.aro.ui.commonui.EnableEscKeyCloseDialog)9 WindowAdapter (java.awt.event.WindowAdapter)6 WindowEvent (java.awt.event.WindowEvent)6 PacketAnalyzerResult (com.att.aro.core.packetanalysis.pojo.PacketAnalyzerResult)2 MainFrame (com.att.aro.ui.view.MainFrame)2 IProfileFactory (com.att.aro.core.configuration.IProfileFactory)1 ApplicationSelection (com.att.aro.core.packetanalysis.pojo.ApplicationSelection)1 TimeRange (com.att.aro.core.packetanalysis.pojo.TimeRange)1 BorderLayout (java.awt.BorderLayout)1 Dimension (java.awt.Dimension)1 GridLayout (java.awt.GridLayout)1 JScrollPane (javax.swing.JScrollPane)1 JTable (javax.swing.JTable)1 TableModelEvent (javax.swing.event.TableModelEvent)1 TableModelListener (javax.swing.event.TableModelListener)1