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;
}
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;
}
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;
}
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);
}
}
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");
}
}
Aggregations