Search in sources :

Example 16 with ActionListener

use of java.awt.event.ActionListener in project antlrworks by antlr.

the class DBControlPanel method createStepOverButton.

public JButton createStepOverButton() {
    JButton button = XJRollOverButton.createMediumButton(IconManager.shared().getIconStepOver());
    button.setToolTipText("Step Over");
    button.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent event) {
            debuggerTab.getRecorder().stepOver();
            updateInterfaceLater();
            StatisticsAW.shared().recordEvent(StatisticsAW.EVENT_DEBUGGER_STEP_OVER);
        }
    });
    return button;
}
Also used : ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent)

Example 17 with ActionListener

use of java.awt.event.ActionListener in project antlrworks by antlr.

the class DBControlPanel method createGoToStartButton.

public JButton createGoToStartButton() {
    JButton button = XJRollOverButton.createMediumButton(IconManager.shared().getIconGoToStart());
    button.setToolTipText("Go To Start");
    button.setFocusable(false);
    button.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent event) {
            debuggerTab.resetGrammarLocation();
            debuggerTab.getRecorder().goToStart();
            updateInterfaceLater();
            StatisticsAW.shared().recordEvent(StatisticsAW.EVENT_DEBUGGER_GOTO_START);
        }
    });
    return button;
}
Also used : ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent)

Example 18 with ActionListener

use of java.awt.event.ActionListener in project antlrworks by antlr.

the class DebuggerTab method createToggleButton.

public XJRotableToggleButton createToggleButton(String title, final int tag, Component c) {
    XJRotableToggleButton b = new XJRotableToggleButton(title);
    b.setFocusable(false);
    b.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent e) {
            performToggleButtonAction(tag);
        }
    });
    components2toggle.put(c, b);
    return b;
}
Also used : XJRotableToggleButton(org.antlr.xjlib.appkit.swing.XJRotableToggleButton) ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent)

Example 19 with ActionListener

use of java.awt.event.ActionListener in project antlrworks by antlr.

the class GPanel method createShowRuleNameButton.

private JCheckBox createShowRuleNameButton() {
    final JCheckBox button = new JCheckBox("Rule Name");
    button.setFocusable(false);
    button.setSelected(context.isShowRuleName());
    button.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent event) {
            context.setShowRuleName(button.isSelected());
            view.refresh();
        }
    });
    return button;
}
Also used : ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent)

Example 20 with ActionListener

use of java.awt.event.ActionListener in project antlrworks by antlr.

the class GPanel method createNextErrorButton.

private JButton createNextErrorButton() {
    JButton button = XJRollOverButton.createMediumButton(IconManager.shared().getIconForward());
    button.setFocusable(false);
    button.setToolTipText("Show Next Error");
    button.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent event) {
            if (view.setNextGraph()) {
                view.refresh();
                createPathSelectionButtons();
                updateCurrentError();
            }
        }
    });
    return button;
}
Also used : ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent)

Aggregations

ActionListener (java.awt.event.ActionListener)1347 ActionEvent (java.awt.event.ActionEvent)1303 JButton (javax.swing.JButton)363 JPanel (javax.swing.JPanel)345 JLabel (javax.swing.JLabel)234 JMenuItem (javax.swing.JMenuItem)191 BoxLayout (javax.swing.BoxLayout)150 GridBagConstraints (java.awt.GridBagConstraints)121 Insets (java.awt.Insets)121 GridBagLayout (java.awt.GridBagLayout)114 Dimension (java.awt.Dimension)113 FlowLayout (java.awt.FlowLayout)110 JCheckBox (javax.swing.JCheckBox)103 JScrollPane (javax.swing.JScrollPane)103 JMenu (javax.swing.JMenu)96 BorderLayout (java.awt.BorderLayout)88 JTextField (javax.swing.JTextField)79 JComboBox (javax.swing.JComboBox)73 ButtonGroup (javax.swing.ButtonGroup)64 ArrayList (java.util.ArrayList)60