//# 0 errors, 225 messages
//#
/*
    //#StandardDialog.java:1:1: class: com.dmdirc.addons.ui_swing.components.StandardDialog$2
    //#StandardDialog.java:1:1: method: com.dmdirc.addons.ui_swing.components.StandardDialog$2.com.dmdirc.addons.ui_swing.components.StandardDialog$2__static_init
    //#StandardDialog.java:1:1: class: com.dmdirc.addons.ui_swing.components.StandardDialog$1
    //#StandardDialog.java:1:1: method: com.dmdirc.addons.ui_swing.components.StandardDialog$1.com.dmdirc.addons.ui_swing.components.StandardDialog$1__static_init
    //#StandardDialog.java:1:1: class: com.dmdirc.addons.ui_swing.components.StandardDialog
    //#StandardDialog.java:1:1: method: com.dmdirc.addons.ui_swing.components.StandardDialog.com.dmdirc.addons.ui_swing.components.StandardDialog__static_init
 * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

package com.dmdirc.addons.ui_swing.components;

import com.dmdirc.ui.CoreUIUtils;

import java.awt.Dialog;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.Window;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;

import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JDialog;
import javax.swing.JRootPane;
import javax.swing.KeyStroke;

/**
 * Provides common methods for dialogs.
 */
public class StandardDialog extends JDialog {
    //#StandardDialog.java:45: method: JButton com.dmdirc.addons.ui_swing.components.StandardDialog.access$000(StandardDialog)
    //#input(JButton access$000(StandardDialog)): x0
    //#input(JButton access$000(StandardDialog)): x0.cancelButton
    //#output(JButton access$000(StandardDialog)): return_value
    //#pre[1] (JButton access$000(StandardDialog)): x0 != null
    //#pre[2] (JButton access$000(StandardDialog)): init'ed(x0.cancelButton)
    //#post(JButton access$000(StandardDialog)): return_value == x0.cancelButton
    //#post(JButton access$000(StandardDialog)): init'ed(return_value)
    //#StandardDialog.java:45: end of method: JButton com.dmdirc.addons.ui_swing.components.StandardDialog.access$000(StandardDialog)
    //#StandardDialog.java:45: method: JButton com.dmdirc.addons.ui_swing.components.StandardDialog.access$100(StandardDialog)
    //#input(JButton access$100(StandardDialog)): x0
    //#input(JButton access$100(StandardDialog)): x0.okButton
    //#output(JButton access$100(StandardDialog)): return_value
    //#pre[1] (JButton access$100(StandardDialog)): x0 != null
    //#pre[2] (JButton access$100(StandardDialog)): init'ed(x0.okButton)
    //#post(JButton access$100(StandardDialog)): return_value == x0.okButton
    //#post(JButton access$100(StandardDialog)): init'ed(return_value)
    //#StandardDialog.java:45: end of method: JButton com.dmdirc.addons.ui_swing.components.StandardDialog.access$100(StandardDialog)

    /**
     * A version number for this class. It should be changed whenever the class
     * structure is changed (or anything else that would prevent serialized
     * objects being unserialized with the new class).
     */
    private static final long serialVersionUID = 1;
    /**
     * The OK button for this frame.
     */
    private JButton okButton;
    /**
     * The cancel button for this frame.
     */
    private JButton cancelButton;

    /**
     * Creates a new instance of StandardDialog.
     * @param owner The frame that owns this dialog
     * @param modal Whether to display modally or not
     */
    public StandardDialog(final Frame owner, final boolean modal) {
        super(owner, modal);
    //#StandardDialog.java:68: method: void com.dmdirc.addons.ui_swing.components.StandardDialog.com.dmdirc.addons.ui_swing.components.StandardDialog(Frame, bool)
    //#input(void com.dmdirc.addons.ui_swing.components.StandardDialog(Frame, bool)): modal
    //#input(void com.dmdirc.addons.ui_swing.components.StandardDialog(Frame, bool)): owner
    //#input(void com.dmdirc.addons.ui_swing.components.StandardDialog(Frame, bool)): this
    //#test_vector(void com.dmdirc.addons.ui_swing.components.StandardDialog(Frame, bool)): owner: Addr_Set{null}, Inverse{null}
        
        if (owner != null) {
            setIconImages(owner.getIconImages());
    //#StandardDialog.java:71: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.StandardDialog:setIconImages(List)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.StandardDialog
    //#    method: void com.dmdirc.addons.ui_swing.components.StandardDialog(Frame, bool)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.StandardDialog:setIconImages(List)
        }
    }
    //#StandardDialog.java:73: end of method: void com.dmdirc.addons.ui_swing.components.StandardDialog.com.dmdirc.addons.ui_swing.components.StandardDialog(Frame, bool)

    /**
     * Creates a new instance of StandardDialog.
     * @param owner The frame that owns this dialog
     * @param modal Whether to display modally or not
     */
    public StandardDialog(final Window owner, final ModalityType modal) {
        super(owner, modal);
    //#StandardDialog.java:81: method: void com.dmdirc.addons.ui_swing.components.StandardDialog.com.dmdirc.addons.ui_swing.components.StandardDialog(Window, Dialog$ModalityType)
    //#input(void com.dmdirc.addons.ui_swing.components.StandardDialog(Window, Dialog$ModalityType)): modal
    //#input(void com.dmdirc.addons.ui_swing.components.StandardDialog(Window, Dialog$ModalityType)): owner
    //#input(void com.dmdirc.addons.ui_swing.components.StandardDialog(Window, Dialog$ModalityType)): this
    //#test_vector(void com.dmdirc.addons.ui_swing.components.StandardDialog(Window, Dialog$ModalityType)): owner: Addr_Set{null}, Inverse{null}
        
        if (owner != null) {
            setIconImages(owner.getIconImages());
    //#StandardDialog.java:84: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.StandardDialog:setIconImages(List)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.StandardDialog
    //#    method: void com.dmdirc.addons.ui_swing.components.StandardDialog(Window, Dialog$ModalityType)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.StandardDialog:setIconImages(List)
        }
    }
    //#StandardDialog.java:86: end of method: void com.dmdirc.addons.ui_swing.components.StandardDialog.com.dmdirc.addons.ui_swing.components.StandardDialog(Window, Dialog$ModalityType)

    /**
     * Creates a new instance of StandardDialog.
     * @param owner The frame that owns this dialog
     * @param modal Whether to display modally or not
     */
    public StandardDialog(final Dialog owner, final boolean modal) {
        super(owner, modal);
    //#StandardDialog.java:94: method: void com.dmdirc.addons.ui_swing.components.StandardDialog.com.dmdirc.addons.ui_swing.components.StandardDialog(Dialog, bool)
    //#input(void com.dmdirc.addons.ui_swing.components.StandardDialog(Dialog, bool)): modal
    //#input(void com.dmdirc.addons.ui_swing.components.StandardDialog(Dialog, bool)): owner
    //#input(void com.dmdirc.addons.ui_swing.components.StandardDialog(Dialog, bool)): this
    //#test_vector(void com.dmdirc.addons.ui_swing.components.StandardDialog(Dialog, bool)): owner: Addr_Set{null}, Inverse{null}
        
        if (owner != null) {
            setIconImages(owner.getIconImages());
    //#StandardDialog.java:97: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.StandardDialog:setIconImages(List)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.StandardDialog
    //#    method: void com.dmdirc.addons.ui_swing.components.StandardDialog(Dialog, bool)
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.StandardDialog:setIconImages(List)
        }
    }
    //#StandardDialog.java:99: end of method: void com.dmdirc.addons.ui_swing.components.StandardDialog.com.dmdirc.addons.ui_swing.components.StandardDialog(Dialog, bool)

    /**
     * Centers and displays this dialog.
     */
    public void display() {
        CoreUIUtils.centreWindow(this);
    //#StandardDialog.java:105: method: void com.dmdirc.addons.ui_swing.components.StandardDialog.display()
    //#StandardDialog.java:105: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.ui.CoreUIUtils:centreWindow(Window)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.StandardDialog
    //#    method: void display()
    //#    unanalyzed callee: void com.dmdirc.ui.CoreUIUtils:centreWindow(Window)
    //#input(void display()): this
        setVisible(true);
    //#StandardDialog.java:106: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.addons.ui_swing.components.StandardDialog:setVisible(bool)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.StandardDialog
    //#    method: void display()
    //#    unanalyzed callee: void com.dmdirc.addons.ui_swing.components.StandardDialog:setVisible(bool)
    }
    //#StandardDialog.java:107: end of method: void com.dmdirc.addons.ui_swing.components.StandardDialog.display()

    /**
     * Sets the specified button up as the OK button.
     * @param button The target button
     */
    protected void setOkButton(final JButton button) {
        okButton = button;
    //#StandardDialog.java:114: method: void com.dmdirc.addons.ui_swing.components.StandardDialog.setOkButton(JButton)
    //#input(void setOkButton(JButton)): button
    //#input(void setOkButton(JButton)): this
    //#output(void setOkButton(JButton)): this.okButton
    //#pre[1] (void setOkButton(JButton)): button != null
    //#post(void setOkButton(JButton)): this.okButton == button
    //#post(void setOkButton(JButton)): this.okButton != null
        button.setText("OK");
        button.setDefaultCapable(false);
    }
    //#StandardDialog.java:117: end of method: void com.dmdirc.addons.ui_swing.components.StandardDialog.setOkButton(JButton)

    /**
     * Sets the specified button up as the Cancel button.
     * @param button The target button
     */
    protected void setCancelButton(final JButton button) {
        cancelButton = button;
    //#StandardDialog.java:124: method: void com.dmdirc.addons.ui_swing.components.StandardDialog.setCancelButton(JButton)
    //#input(void setCancelButton(JButton)): button
    //#input(void setCancelButton(JButton)): this
    //#output(void setCancelButton(JButton)): this.cancelButton
    //#pre[1] (void setCancelButton(JButton)): button != null
    //#post(void setCancelButton(JButton)): this.cancelButton == button
    //#post(void setCancelButton(JButton)): this.cancelButton != null
        button.setText("Cancel");
        button.setDefaultCapable(false);
    }
    //#StandardDialog.java:127: end of method: void com.dmdirc.addons.ui_swing.components.StandardDialog.setCancelButton(JButton)

    /**
     * Gets the left hand button for a dialog.
     * @return left JButton
     */
    protected final JButton getLeftButton() {
        if (System.getProperty("os.name").toLowerCase().startsWith("win")) {
    //#StandardDialog.java:134: method: JButton com.dmdirc.addons.ui_swing.components.StandardDialog.getLeftButton()
    //#input(JButton getLeftButton()): this
    //#input(JButton getLeftButton()): this.cancelButton
    //#input(JButton getLeftButton()): this.okButton
    //#output(JButton getLeftButton()): return_value
    //#pre[2] (JButton getLeftButton()): (soft) init'ed(this.cancelButton)
    //#pre[3] (JButton getLeftButton()): (soft) init'ed(this.okButton)
    //#presumption(JButton getLeftButton()): java.lang.System:getProperty(...)@134 != null
    //#post(JButton getLeftButton()): return_value == One-of{this.okButton, this.cancelButton}
    //#post(JButton getLeftButton()): init'ed(return_value)
    //#test_vector(JButton getLeftButton()): java.lang.String:startsWith(...)@134: {0}, {1}
            return getOkButton();
        } else {
            return getCancelButton();
    //#StandardDialog.java:137: end of method: JButton com.dmdirc.addons.ui_swing.components.StandardDialog.getLeftButton()
        }
    }

    /**
     * Gets the right hand button for a dialog.
     * @return right JButton
     */
    protected final JButton getRightButton() {
        if (System.getProperty("os.name").toLowerCase().startsWith("win")) {
    //#StandardDialog.java:146: method: JButton com.dmdirc.addons.ui_swing.components.StandardDialog.getRightButton()
    //#input(JButton getRightButton()): this
    //#input(JButton getRightButton()): this.cancelButton
    //#input(JButton getRightButton()): this.okButton
    //#output(JButton getRightButton()): return_value
    //#pre[2] (JButton getRightButton()): (soft) init'ed(this.cancelButton)
    //#pre[3] (JButton getRightButton()): (soft) init'ed(this.okButton)
    //#presumption(JButton getRightButton()): java.lang.System:getProperty(...)@146 != null
    //#post(JButton getRightButton()): return_value == One-of{this.cancelButton, this.okButton}
    //#post(JButton getRightButton()): init'ed(return_value)
    //#test_vector(JButton getRightButton()): java.lang.String:startsWith(...)@146: {0}, {1}
            return getCancelButton();
        } else {
            return getOkButton();
    //#StandardDialog.java:149: end of method: JButton com.dmdirc.addons.ui_swing.components.StandardDialog.getRightButton()
        }
    }

    /**
     * Orders the OK and Cancel buttons in an appropriate order for the current
     * operating system.
     * @param leftButton The left-most button
     * @param rightButton The right-most button
     */
    protected final void orderButtons(final JButton leftButton,
            final JButton rightButton) {
        if (System.getProperty("os.name").toLowerCase().startsWith("win")) {
    //#StandardDialog.java:161: method: void com.dmdirc.addons.ui_swing.components.StandardDialog.orderButtons(JButton, JButton)
    //#StandardDialog.java:161: Warning: suspicious precondition
    //#    The precondition for this.__Tag is not a contiguous range of values
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.addons.ui_swing.components.StandardDialog
    //#    method: void orderButtons(JButton, JButton)
    //#    suspicious precondition index: [4]
    //#input(void orderButtons(JButton, JButton)): __Descendant_Table[com/dmdirc/addons/nickcolours/NickColourInputDialog]
    //#input(void orderButtons(JButton, JButton)): __Descendant_Table[com/dmdirc/addons/ui_swing/components/ColourPickerDialog]
    //#input(void orderButtons(JButton, JButton)): __Descendant_Table[com/dmdirc/addons/ui_swing/components/MenuBar$1]
    //#input(void orderButtons(JButton, JButton)): __Descendant_Table[com/dmdirc/addons/ui_swing/components/StandardDialog]
    //#input(void orderButtons(JButton, JButton)): __Descendant_Table[com/dmdirc/addons/ui_swing/components/StandardInputDialog]
    //#input(void orderButtons(JButton, JButton)): __Descendant_Table[com/dmdirc/addons/ui_swing/components/durationeditor/DurationEditor]
    //#input(void orderButtons(JButton, JButton)): __Descendant_Table[others]
    //#input(void orderButtons(JButton, JButton)): __Dispatch_Table.setCancelButton(Ljavax/swing/JButton;)V
    //#input(void orderButtons(JButton, JButton)): __Dispatch_Table.setOkButton(Ljavax/swing/JButton;)V
    //#input(void orderButtons(JButton, JButton)): com/dmdirc/addons/nickcolours/NickColourInputDialog.__Dispatch_Table.setCancelButton(Ljavax/swing/JButton;)V
    //#input(void orderButtons(JButton, JButton)): com/dmdirc/addons/nickcolours/NickColourInputDialog.__Dispatch_Table.setOkButton(Ljavax/swing/JButton;)V
    //#input(void orderButtons(JButton, JButton)): com/dmdirc/addons/ui_swing/components/ColourPickerDialog.__Dispatch_Table.setCancelButton(Ljavax/swing/JButton;)V
    //#input(void orderButtons(JButton, JButton)): com/dmdirc/addons/ui_swing/components/ColourPickerDialog.__Dispatch_Table.setOkButton(Ljavax/swing/JButton;)V
    //#input(void orderButtons(JButton, JButton)): com/dmdirc/addons/ui_swing/components/MenuBar$1.__Dispatch_Table.setCancelButton(Ljavax/swing/JButton;)V
    //#input(void orderButtons(JButton, JButton)): com/dmdirc/addons/ui_swing/components/MenuBar$1.__Dispatch_Table.setOkButton(Ljavax/swing/JButton;)V
    //#input(void orderButtons(JButton, JButton)): com/dmdirc/addons/ui_swing/components/StandardInputDialog.__Dispatch_Table.setCancelButton(Ljavax/swing/JButton;)V
    //#input(void orderButtons(JButton, JButton)): com/dmdirc/addons/ui_swing/components/StandardInputDialog.__Dispatch_Table.setOkButton(Ljavax/swing/JButton;)V
    //#input(void orderButtons(JButton, JButton)): com/dmdirc/addons/ui_swing/components/durationeditor/DurationEditor.__Dispatch_Table.setCancelButton(Ljavax/swing/JButton;)V
    //#input(void orderButtons(JButton, JButton)): com/dmdirc/addons/ui_swing/components/durationeditor/DurationEditor.__Dispatch_Table.setOkButton(Ljavax/swing/JButton;)V
    //#input(void orderButtons(JButton, JButton)): leftButton
    //#input(void orderButtons(JButton, JButton)): rightButton
    //#input(void orderButtons(JButton, JButton)): this
    //#input(void orderButtons(JButton, JButton)): this.__Tag
    //#output(void orderButtons(JButton, JButton)): this.cancelButton
    //#output(void orderButtons(JButton, JButton)): this.okButton
    //#pre[1] (void orderButtons(JButton, JButton)): leftButton != null
    //#pre[2] (void orderButtons(JButton, JButton)): rightButton != null
    //#pre[4] (void orderButtons(JButton, JButton)): this.__Tag in {com/dmdirc/addons/nickcolours/NickColourInputDialog, com/dmdirc/addons/ui_swing/components/ColourPickerDialog, com/dmdirc/addons/ui_swing/components/MenuBar$1, com/dmdirc/addons/ui_swing/components/StandardDialog, com/dmdirc/addons/ui_swing/components/StandardInputDialog, com/dmdirc/addons/ui_swing/components/durationeditor/DurationEditor}
    //#presumption(void orderButtons(JButton, JButton)): java.lang.System:getProperty(...)@161 != null
    //#post(void orderButtons(JButton, JButton)): this.cancelButton == One-of{rightButton, leftButton}
    //#post(void orderButtons(JButton, JButton)): this.cancelButton != null
    //#post(void orderButtons(JButton, JButton)): this.okButton == One-of{leftButton, rightButton}
    //#post(void orderButtons(JButton, JButton)): this.okButton != null
    //#unanalyzed(void orderButtons(JButton, JButton)): Effects-of-calling:javax.swing.JButton:setText
    //#unanalyzed(void orderButtons(JButton, JButton)): Effects-of-calling:javax.swing.JButton:setDefaultCapable
    //#test_vector(void orderButtons(JButton, JButton)): java.lang.String:startsWith(...)@161: {0}, {1}
            // Windows - put the OK button on the left
            setOkButton(leftButton);
            setCancelButton(rightButton);
        } else {
            // Everything else - adhere to usability guidelines and put it on
            // the right.
            setOkButton(rightButton);
            setCancelButton(leftButton);
        }
        leftButton.setPreferredSize(new Dimension(100, 25));
        rightButton.setPreferredSize(new Dimension(100, 25));
        leftButton.setMinimumSize(new Dimension(100, 25));
        rightButton.setMinimumSize(new Dimension(100, 25));
    }
    //#StandardDialog.java:175: end of method: void com.dmdirc.addons.ui_swing.components.StandardDialog.orderButtons(JButton, JButton)

    /**
     * Creates the root pane of this dialog. We hook in two keylisteners
     * to send enter/escape events to our buttons.
     * @return The new root pane
     */
    @Override
    protected final JRootPane createRootPane() {
        final ActionListener escapeListener = new ActionListener() {
    //#StandardDialog.java:184: method: void com.dmdirc.addons.ui_swing.components.StandardDialog$1.com.dmdirc.addons.ui_swing.components.StandardDialog$1(StandardDialog)
    //#input(void com.dmdirc.addons.ui_swing.components.StandardDialog$1(StandardDialog)): Param_1
    //#input(void com.dmdirc.addons.ui_swing.components.StandardDialog$1(StandardDialog)): this
    //#output(void com.dmdirc.addons.ui_swing.components.StandardDialog$1(StandardDialog)): this.this$0
    //#post(void com.dmdirc.addons.ui_swing.components.StandardDialog$1(StandardDialog)): this.this$0 == Param_1
    //#post(void com.dmdirc.addons.ui_swing.components.StandardDialog$1(StandardDialog)): init'ed(this.this$0)
    //#StandardDialog.java:184: end of method: void com.dmdirc.addons.ui_swing.components.StandardDialog$1.com.dmdirc.addons.ui_swing.components.StandardDialog$1(StandardDialog)
    //#StandardDialog.java:184: method: JRootPane com.dmdirc.addons.ui_swing.components.StandardDialog.createRootPane()
    //#input(JRootPane createRootPane()): this
    //#output(JRootPane createRootPane()): new JRootPane(createRootPane#3) num objects
    //#output(JRootPane createRootPane()): return_value
    //#new obj(JRootPane createRootPane()): new JRootPane(createRootPane#3)
    //#post(JRootPane createRootPane()): return_value == &new JRootPane(createRootPane#3)
    //#post(JRootPane createRootPane()): new JRootPane(createRootPane#3) num objects == 1

            /** {@inheritDoc} */
            @Override
            public void actionPerformed(final ActionEvent actionEvent) {
                executeAction(StandardDialog.this.cancelButton);
    //#StandardDialog.java:189: method: void com.dmdirc.addons.ui_swing.components.StandardDialog$1.actionPerformed(ActionEvent)
    //#input(void actionPerformed(ActionEvent)): this
    //#input(void actionPerformed(ActionEvent)): this.this$0
    //#input(void actionPerformed(ActionEvent)): this.this$0.cancelButton
    //#pre[2] (void actionPerformed(ActionEvent)): this.this$0 != null
    //#pre[3] (void actionPerformed(ActionEvent)): init'ed(this.cancelButton)
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:javax.swing.JButton:doClick
            }
    //#StandardDialog.java:190: end of method: void com.dmdirc.addons.ui_swing.components.StandardDialog$1.actionPerformed(ActionEvent)
        };

        final ActionListener enterListener = new ActionListener() {
    //#StandardDialog.java:193: method: void com.dmdirc.addons.ui_swing.components.StandardDialog$2.com.dmdirc.addons.ui_swing.components.StandardDialog$2(StandardDialog)
    //#input(void com.dmdirc.addons.ui_swing.components.StandardDialog$2(StandardDialog)): Param_1
    //#input(void com.dmdirc.addons.ui_swing.components.StandardDialog$2(StandardDialog)): this
    //#output(void com.dmdirc.addons.ui_swing.components.StandardDialog$2(StandardDialog)): this.this$0
    //#post(void com.dmdirc.addons.ui_swing.components.StandardDialog$2(StandardDialog)): this.this$0 == Param_1
    //#post(void com.dmdirc.addons.ui_swing.components.StandardDialog$2(StandardDialog)): init'ed(this.this$0)
    //#StandardDialog.java:193: end of method: void com.dmdirc.addons.ui_swing.components.StandardDialog$2.com.dmdirc.addons.ui_swing.components.StandardDialog$2(StandardDialog)

            /** {@inheritDoc} */
            @Override
            public void actionPerformed(final ActionEvent actionEvent) {
                if (StandardDialog.this.getFocusOwner() instanceof JButton) {
    //#StandardDialog.java:198: method: void com.dmdirc.addons.ui_swing.components.StandardDialog$2.actionPerformed(ActionEvent)
    //#StandardDialog.java:198: Warning: method not available - call not analyzed
    //#    call on Component com.dmdirc.addons.ui_swing.components.StandardDialog:getFocusOwner()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.StandardDialog$2
    //#    method: void actionPerformed(ActionEvent)
    //#    unanalyzed callee: Component com.dmdirc.addons.ui_swing.components.StandardDialog:getFocusOwner()
    //#input(void actionPerformed(ActionEvent)): this
    //#input(void actionPerformed(ActionEvent)): this.this$0
    //#input(void actionPerformed(ActionEvent)): this.this$0.okButton
    //#pre[2] (void actionPerformed(ActionEvent)): this.this$0 != null
    //#pre[3] (void actionPerformed(ActionEvent)): (soft) init'ed(this.okButton)
    //#unanalyzed(void actionPerformed(ActionEvent)): Effects-of-calling:javax.swing.JButton:doClick
                    executeAction((JButton) StandardDialog.this.getFocusOwner());
    //#StandardDialog.java:199: Warning: method not available - call not analyzed
    //#    call on Component com.dmdirc.addons.ui_swing.components.StandardDialog:getFocusOwner()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.StandardDialog$2
    //#    method: void actionPerformed(ActionEvent)
    //#    unanalyzed callee: Component com.dmdirc.addons.ui_swing.components.StandardDialog:getFocusOwner()
                } else {
                    executeAction(StandardDialog.this.okButton);
                }
            }
    //#StandardDialog.java:203: end of method: void com.dmdirc.addons.ui_swing.components.StandardDialog$2.actionPerformed(ActionEvent)
        };

        final KeyStroke escape = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
        final KeyStroke enter = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,
                InputEvent.CTRL_DOWN_MASK);

        final JRootPane customRootPane = new JRootPane();

        customRootPane.registerKeyboardAction(escapeListener, escape,
                JComponent.WHEN_IN_FOCUSED_WINDOW);
        customRootPane.registerKeyboardAction(enterListener, enter,
                JComponent.WHEN_IN_FOCUSED_WINDOW);

        return customRootPane;
    //#StandardDialog.java:217: end of method: JRootPane com.dmdirc.addons.ui_swing.components.StandardDialog.createRootPane()
    }

    /**
     * Retrieves the OK button for this form.
     * @return The form's OK button
     */
    public final JButton getOkButton() {
        return okButton;
    //#StandardDialog.java:225: method: JButton com.dmdirc.addons.ui_swing.components.StandardDialog.getOkButton()
    //#input(JButton getOkButton()): this
    //#input(JButton getOkButton()): this.okButton
    //#output(JButton getOkButton()): return_value
    //#pre[2] (JButton getOkButton()): init'ed(this.okButton)
    //#post(JButton getOkButton()): return_value == this.okButton
    //#post(JButton getOkButton()): init'ed(return_value)
    //#StandardDialog.java:225: end of method: JButton com.dmdirc.addons.ui_swing.components.StandardDialog.getOkButton()
    }

    /**
     * Retrieves the Cancel button for this form.
     * @return The form's cancel button
     */
    public final JButton getCancelButton() {
        return cancelButton;
    //#StandardDialog.java:233: method: JButton com.dmdirc.addons.ui_swing.components.StandardDialog.getCancelButton()
    //#input(JButton getCancelButton()): this
    //#input(JButton getCancelButton()): this.cancelButton
    //#output(JButton getCancelButton()): return_value
    //#pre[2] (JButton getCancelButton()): init'ed(this.cancelButton)
    //#post(JButton getCancelButton()): return_value == this.cancelButton
    //#post(JButton getCancelButton()): init'ed(return_value)
    //#StandardDialog.java:233: end of method: JButton com.dmdirc.addons.ui_swing.components.StandardDialog.getCancelButton()
    }

    /**
     * Simulates the user clicking on the specified target button.
     * @param target The button to use
     */
    protected final void executeAction(final JButton target) {
        if (target != null) {
    //#StandardDialog.java:241: method: void com.dmdirc.addons.ui_swing.components.StandardDialog.executeAction(JButton)
    //#input(void executeAction(JButton)): target
    //#test_vector(void executeAction(JButton)): target: Addr_Set{null}, Inverse{null}
            target.doClick();
        }
    }
    //#StandardDialog.java:244: end of method: void com.dmdirc.addons.ui_swing.components.StandardDialog.executeAction(JButton)
}
    //#output(com.dmdirc.addons.ui_swing.components.StandardDialog$2__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/components/StandardDialog$2]
    //#output(com.dmdirc.addons.ui_swing.components.StandardDialog$2__static_init): __Dispatch_Table.actionPerformed(Ljava/awt/event/ActionEvent;)V
    //#post(com.dmdirc.addons.ui_swing.components.StandardDialog$2__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/components/StandardDialog$2] == &__Dispatch_Table
    //#post(com.dmdirc.addons.ui_swing.components.StandardDialog$2__static_init): __Dispatch_Table.actionPerformed(Ljava/awt/event/ActionEvent;)V == &actionPerformed
    //#StandardDialog.java:: end of method: com.dmdirc.addons.ui_swing.components.StandardDialog$2.com.dmdirc.addons.ui_swing.components.StandardDialog$2__static_init
    //#StandardDialog.java:: end of class: com.dmdirc.addons.ui_swing.components.StandardDialog$2
    //#output(com.dmdirc.addons.ui_swing.components.StandardDialog$1__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/components/StandardDialog$1]
    //#output(com.dmdirc.addons.ui_swing.components.StandardDialog$1__static_init): __Dispatch_Table.actionPerformed(Ljava/awt/event/ActionEvent;)V
    //#post(com.dmdirc.addons.ui_swing.components.StandardDialog$1__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/components/StandardDialog$1] == &__Dispatch_Table
    //#post(com.dmdirc.addons.ui_swing.components.StandardDialog$1__static_init): __Dispatch_Table.actionPerformed(Ljava/awt/event/ActionEvent;)V == &actionPerformed
    //#StandardDialog.java:: end of method: com.dmdirc.addons.ui_swing.components.StandardDialog$1.com.dmdirc.addons.ui_swing.components.StandardDialog$1__static_init
    //#StandardDialog.java:: end of class: com.dmdirc.addons.ui_swing.components.StandardDialog$1
    //#output(com.dmdirc.addons.ui_swing.components.StandardDialog__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/components/StandardDialog]
    //#output(com.dmdirc.addons.ui_swing.components.StandardDialog__static_init): __Dispatch_Table.createRootPane()Ljavax/swing/JRootPane;
    //#output(com.dmdirc.addons.ui_swing.components.StandardDialog__static_init): __Dispatch_Table.display()V
    //#output(com.dmdirc.addons.ui_swing.components.StandardDialog__static_init): __Dispatch_Table.executeAction(Ljavax/swing/JButton;)V
    //#output(com.dmdirc.addons.ui_swing.components.StandardDialog__static_init): __Dispatch_Table.getCancelButton()Ljavax/swing/JButton;
    //#output(com.dmdirc.addons.ui_swing.components.StandardDialog__static_init): __Dispatch_Table.getLeftButton()Ljavax/swing/JButton;
    //#output(com.dmdirc.addons.ui_swing.components.StandardDialog__static_init): __Dispatch_Table.getOkButton()Ljavax/swing/JButton;
    //#output(com.dmdirc.addons.ui_swing.components.StandardDialog__static_init): __Dispatch_Table.getRightButton()Ljavax/swing/JButton;
    //#output(com.dmdirc.addons.ui_swing.components.StandardDialog__static_init): __Dispatch_Table.orderButtons(Ljavax/swing/JButton;Ljavax/swing/JButton;)V
    //#output(com.dmdirc.addons.ui_swing.components.StandardDialog__static_init): __Dispatch_Table.setCancelButton(Ljavax/swing/JButton;)V
    //#output(com.dmdirc.addons.ui_swing.components.StandardDialog__static_init): __Dispatch_Table.setOkButton(Ljavax/swing/JButton;)V
    //#post(com.dmdirc.addons.ui_swing.components.StandardDialog__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/components/StandardDialog] == &__Dispatch_Table
    //#post(com.dmdirc.addons.ui_swing.components.StandardDialog__static_init): __Dispatch_Table.createRootPane()Ljavax/swing/JRootPane; == &createRootPane
    //#post(com.dmdirc.addons.ui_swing.components.StandardDialog__static_init): __Dispatch_Table.display()V == &display
    //#post(com.dmdirc.addons.ui_swing.components.StandardDialog__static_init): __Dispatch_Table.executeAction(Ljavax/swing/JButton;)V == &executeAction
    //#post(com.dmdirc.addons.ui_swing.components.StandardDialog__static_init): __Dispatch_Table.getCancelButton()Ljavax/swing/JButton; == &getCancelButton
    //#post(com.dmdirc.addons.ui_swing.components.StandardDialog__static_init): __Dispatch_Table.getLeftButton()Ljavax/swing/JButton; == &getLeftButton
    //#post(com.dmdirc.addons.ui_swing.components.StandardDialog__static_init): __Dispatch_Table.getOkButton()Ljavax/swing/JButton; == &getOkButton
    //#post(com.dmdirc.addons.ui_swing.components.StandardDialog__static_init): __Dispatch_Table.getRightButton()Ljavax/swing/JButton; == &getRightButton
    //#post(com.dmdirc.addons.ui_swing.components.StandardDialog__static_init): __Dispatch_Table.orderButtons(Ljavax/swing/JButton;Ljavax/swing/JButton;)V == &orderButtons
    //#post(com.dmdirc.addons.ui_swing.components.StandardDialog__static_init): __Dispatch_Table.setCancelButton(Ljavax/swing/JButton;)V == &setCancelButton
    //#post(com.dmdirc.addons.ui_swing.components.StandardDialog__static_init): __Dispatch_Table.setOkButton(Ljavax/swing/JButton;)V == &setOkButton
    //#StandardDialog.java:: end of method: com.dmdirc.addons.ui_swing.components.StandardDialog.com.dmdirc.addons.ui_swing.components.StandardDialog__static_init
    //#StandardDialog.java:: end of class: com.dmdirc.addons.ui_swing.components.StandardDialog
