Search in sources :

Example 21 with JCheckBoxMenuItem

use of javax.swing.JCheckBoxMenuItem in project zaproxy by zaproxy.

the class ExtensionOption method getMenuViewImage.

private JCheckBoxMenuItem getMenuViewImage() {
    if (menuViewImage == null) {
        menuViewImage = new JCheckBoxMenuItem();
        // ZAP: i18n
        menuViewImage.setText(Constant.messages.getString("menu.view.enableImage"));
        menuViewImage.addItemListener(new java.awt.event.ItemListener() {

            @Override
            public void itemStateChanged(java.awt.event.ItemEvent e) {
                getModel().getOptionsParam().getViewParam().setProcessImages(getMenuViewImage().getState() ? 1 : 0);
            }
        });
    }
    return menuViewImage;
}
Also used : JCheckBoxMenuItem(javax.swing.JCheckBoxMenuItem)

Example 22 with JCheckBoxMenuItem

use of javax.swing.JCheckBoxMenuItem in project zaproxy by zaproxy.

the class ExtensionState method getMenuSessionTrackingEnable.

/**
	 * This method initializes menuViewImage	
	 * 	
	 * @return javax.swing.JCheckBoxMenuItem	
	 */
private JCheckBoxMenuItem getMenuSessionTrackingEnable() {
    if (menuSessionTrackingEnable == null) {
        menuSessionTrackingEnable = new JCheckBoxMenuItem();
        // ZAP: i18n
        menuSessionTrackingEnable.setText(Constant.messages.getString("menu.edit.enableTracking"));
        getMenuResetSessionState().setEnabled(menuSessionTrackingEnable.isSelected());
        menuSessionTrackingEnable.addItemListener(new java.awt.event.ItemListener() {

            @Override
            public void itemStateChanged(java.awt.event.ItemEvent e) {
                getModel().getOptionsParam().getConnectionParam().setHttpStateEnabled(menuSessionTrackingEnable.isEnabled());
                getMenuResetSessionState().setEnabled(menuSessionTrackingEnable.isSelected());
                resetSessionState();
            }
        });
    }
    return menuSessionTrackingEnable;
}
Also used : JCheckBoxMenuItem(javax.swing.JCheckBoxMenuItem)

Example 23 with JCheckBoxMenuItem

use of javax.swing.JCheckBoxMenuItem in project ACS by ACS-Community.

the class LogMenuBar method getAutoReconnectMenuItem.

/**
	 * Getter 
	 * 
	 * @return The menu item
	 */
public JCheckBoxMenuItem getAutoReconnectMenuItem() {
    if (autoReconnectMI == null) {
        ImageIcon icon = new ImageIcon(LogTypeHelper.class.getResource("/autoreconnect.png"));
        autoReconnectMI = new JCheckBoxMenuItem("Auto reconnect", icon, false);
    }
    return autoReconnectMI;
}
Also used : ImageIcon(javax.swing.ImageIcon) LogTypeHelper(com.cosylab.logging.engine.log.LogTypeHelper) JCheckBoxMenuItem(javax.swing.JCheckBoxMenuItem)

Example 24 with JCheckBoxMenuItem

use of javax.swing.JCheckBoxMenuItem in project ACS by ACS-Community.

the class ObjectExplorer method connEtoC5.

/**
	 *  updates "Show confirmation dialog" menu item 
	 *  before the menu contains it opens. 
	 */
private void connEtoC5(java.awt.event.ActionEvent arg1) {
    try {
        JCheckBoxMenuItem item = getConfirmationCheckBox();
        item.setSelected(getNotificationBean1().isConfirmationDialog());
    } catch (java.lang.Throwable ivjExc) {
        handleException(ivjExc);
    }
}
Also used : JCheckBoxMenuItem(javax.swing.JCheckBoxMenuItem)

Example 25 with JCheckBoxMenuItem

use of javax.swing.JCheckBoxMenuItem in project jdk8u_jdk by JetBrains.

the class InsetsEncapsulation method run.

@Override
public void run() {
    runTest(new JLabel("hi"));
    runTest(new JMenu());
    runTest(new JTree());
    runTest(new JTable());
    runTest(new JMenuItem());
    runTest(new JCheckBoxMenuItem());
    runTest(new JToggleButton());
    runTest(new JSpinner());
    runTest(new JSlider());
    runTest(Box.createVerticalBox());
    runTest(Box.createHorizontalBox());
    runTest(new JTextField());
    runTest(new JTextArea());
    runTest(new JTextPane());
    runTest(new JPasswordField());
    runTest(new JFormattedTextField());
    runTest(new JEditorPane());
    runTest(new JButton());
    runTest(new JColorChooser());
    runTest(new JFileChooser());
    runTest(new JCheckBox());
    runTest(new JInternalFrame());
    runTest(new JDesktopPane());
    runTest(new JTableHeader());
    runTest(new JLayeredPane());
    runTest(new JRootPane());
    runTest(new JMenuBar());
    runTest(new JOptionPane());
    runTest(new JRadioButton());
    runTest(new JRadioButtonMenuItem());
    runTest(new JPopupMenu());
    runTest(new JScrollBar());
    runTest(new JScrollPane());
    runTest(new JViewport());
    runTest(new JSplitPane());
    runTest(new JTabbedPane());
    runTest(new JToolBar());
    runTest(new JSeparator());
    runTest(new JProgressBar());
    if (!failures.isEmpty()) {
        System.out.println("These classes failed");
        for (final Component failure : failures) {
            System.out.println(failure.getClass());
        }
        throw new RuntimeException("Test failed");
    }
}
Also used : JDesktopPane(javax.swing.JDesktopPane) JTextArea(javax.swing.JTextArea) JRadioButton(javax.swing.JRadioButton) JLayeredPane(javax.swing.JLayeredPane) JTabbedPane(javax.swing.JTabbedPane) JButton(javax.swing.JButton) JProgressBar(javax.swing.JProgressBar) JTableHeader(javax.swing.table.JTableHeader) JTextField(javax.swing.JTextField) JSeparator(javax.swing.JSeparator) JScrollBar(javax.swing.JScrollBar) JTextPane(javax.swing.JTextPane) JToggleButton(javax.swing.JToggleButton) JSlider(javax.swing.JSlider) JMenuItem(javax.swing.JMenuItem) JComponent(javax.swing.JComponent) Component(java.awt.Component) JScrollPane(javax.swing.JScrollPane) JViewport(javax.swing.JViewport) JFormattedTextField(javax.swing.JFormattedTextField) JLabel(javax.swing.JLabel) JRadioButtonMenuItem(javax.swing.JRadioButtonMenuItem) JToolBar(javax.swing.JToolBar) JOptionPane(javax.swing.JOptionPane) JCheckBoxMenuItem(javax.swing.JCheckBoxMenuItem) JPopupMenu(javax.swing.JPopupMenu) JCheckBox(javax.swing.JCheckBox) JTree(javax.swing.JTree) JFileChooser(javax.swing.JFileChooser) JPasswordField(javax.swing.JPasswordField) JTable(javax.swing.JTable) JEditorPane(javax.swing.JEditorPane) JSpinner(javax.swing.JSpinner) JRootPane(javax.swing.JRootPane) JSplitPane(javax.swing.JSplitPane) JColorChooser(javax.swing.JColorChooser) JInternalFrame(javax.swing.JInternalFrame) JMenu(javax.swing.JMenu) JMenuBar(javax.swing.JMenuBar)

Aggregations

JCheckBoxMenuItem (javax.swing.JCheckBoxMenuItem)41 ActionEvent (java.awt.event.ActionEvent)16 JMenuItem (javax.swing.JMenuItem)15 ActionListener (java.awt.event.ActionListener)13 JMenu (javax.swing.JMenu)12 JPopupMenu (javax.swing.JPopupMenu)11 AbstractAction (javax.swing.AbstractAction)8 JMenuBar (javax.swing.JMenuBar)6 JSeparator (javax.swing.JSeparator)5 JTableHeader (javax.swing.table.JTableHeader)4 TableColumn (javax.swing.table.TableColumn)4 Action (javax.swing.Action)3 JButton (javax.swing.JButton)3 JRadioButtonMenuItem (javax.swing.JRadioButtonMenuItem)3 Component (java.awt.Component)2 ItemEvent (java.awt.event.ItemEvent)2 HashMap (java.util.HashMap)2 ButtonGroup (javax.swing.ButtonGroup)2 JFrame (javax.swing.JFrame)2 JOptionPane (javax.swing.JOptionPane)2