Search in sources :

Example 46 with JButton

use of javax.swing.JButton in project binnavi by google.

the class TypeDialog method createButtons.

private void createButtons() {
    final JPanel buttonPane = new JPanel();
    buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
    getContentPane().add(buttonPane, BorderLayout.SOUTH);
    {
        final JButton okButton = new JButton("Ok");
        okButton.addActionListener(new OkActionListener());
        buttonPane.add(okButton);
        getRootPane().setDefaultButton(okButton);
    }
    final JButton cancelButton = new JButton("Cancel");
    cancelButton.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(final ActionEvent e) {
            dispose();
        }
    });
    buttonPane.add(cancelButton);
}
Also used : JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton)

Example 47 with JButton

use of javax.swing.JButton in project android-classyshark by google.

the class Toolbar method buildSettingsButton.

private JButton buildSettingsButton() {
    JButton button = new JButton(theme.getSettingsIcon());
    button.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            toolbarController.onSettingsButtonPressed();
        }
    });
    button.setToolTipText("Settings");
    button.setBorderPainted(false);
    return button;
}
Also used : ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton)

Example 48 with JButton

use of javax.swing.JButton in project android-classyshark by google.

the class Toolbar method buildExportButton.

private JButton buildExportButton() {
    JButton result = new JButton(theme.getExportIcon());
    result.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            toolbarController.onExportButtonPressed();
        }
    });
    result.setToolTipText("Export");
    result.setBorderPainted(false);
    result.setEnabled(false);
    return result;
}
Also used : ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton)

Example 49 with JButton

use of javax.swing.JButton in project android-classyshark by google.

the class Toolbar method buildViewButton.

private JButton buildViewButton() {
    JButton result = new JButton(theme.getForwardIcon());
    result.setToolTipText("Next");
    result.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            toolbarController.onViewTopClassPressed();
        }
    });
    result.setBorderPainted(false);
    result.setFocusPainted(true);
    result.setEnabled(false);
    return result;
}
Also used : ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton)

Example 50 with JButton

use of javax.swing.JButton in project android-classyshark by google.

the class Toolbar method buildMappingsButton.

private JButton buildMappingsButton() {
    JButton result = new JButton(theme.getMappingIcon());
    result.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            toolbarController.onMappingsButtonPressed();
        }
    });
    result.setToolTipText("Import Proguard mapping file");
    result.setBorderPainted(false);
    result.setEnabled(true);
    return result;
}
Also used : ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton)

Aggregations

JButton (javax.swing.JButton)923 JPanel (javax.swing.JPanel)408 ActionEvent (java.awt.event.ActionEvent)389 ActionListener (java.awt.event.ActionListener)317 JLabel (javax.swing.JLabel)278 JScrollPane (javax.swing.JScrollPane)166 BoxLayout (javax.swing.BoxLayout)158 FlowLayout (java.awt.FlowLayout)142 BorderLayout (java.awt.BorderLayout)138 Dimension (java.awt.Dimension)138 Insets (java.awt.Insets)114 JTextField (javax.swing.JTextField)114 GridBagLayout (java.awt.GridBagLayout)110 JCheckBox (javax.swing.JCheckBox)103 GridBagConstraints (java.awt.GridBagConstraints)95 ImageIcon (javax.swing.ImageIcon)95 JTable (javax.swing.JTable)67 JDialog (javax.swing.JDialog)65 JComboBox (javax.swing.JComboBox)56 JTextArea (javax.swing.JTextArea)56