Package javax.swing

Examples of javax.swing.JCheckBoxMenuItem$AccessibleJCheckBoxMenuItem


    if (isRadio) {
      JRadioButtonMenuItem jr = new JRadioButtonMenuItem(entry);
      jm = jr;
      jr.setArmed(state);
    } else {
      JCheckBoxMenuItem jcmi = new JCheckBoxMenuItem(entry);
      jm = jcmi;
      jcmi.setState(state);
    }
    jm.setSelected(state);
    jm.addItemListener(cmil);
    jm.setActionCommand(basename);
    updateButton(jm, entry, basename);
View Full Code Here


        }

        final PropertyCheckBoxMenuItem confirmOps;
        final PropertyCheckBoxMenuItem confirmTableEditorUpdates;
        final PropertyCheckBoxMenuItem checkSchema;
        final JCheckBoxMenuItem browserSearchAliases;

        confirmOps =
            new PropertyCheckBoxMenuItem(CBIntText.get("Confirm Tree Operations")"option.confirmTreeOperations");
        setMenuItemState(optionsMenu, confirmOps, "C", CBIntText.get("Prompt the user whenever the tree will be modified?"), true);

        confirmTableEditorUpdates =
            new PropertyCheckBoxMenuItem(CBIntText.get("Confirm Table Editor Updates")"option.confirmTableEditorUpdates");
        setMenuItemState(optionsMenu, confirmTableEditorUpdates, "T", CBIntText.get("Display message to confirm successful updates in Table Editor?"), true);

        checkSchema =
            new PropertyCheckBoxMenuItem(CBIntText.get("Ignore Schema Checking")"option.ignoreSchemaOnSubmission");
        setMenuItemState(optionsMenu, checkSchema, "g", CBIntText.get("Don't check entry consistency before submission."), true);

        browserSearchAliases =
            new JCheckBoxMenuItem(CBIntText.get("Resolve Aliases while Browsing"));
        setMenuItemState(optionsMenu, browserSearchAliases, "A", CBIntText.get("Whether to browse the referenced object, or the alias entry itself."), true);
        browserSearchAliases.setState("finding".equals(JXplorer.getProperty("option.ldap.browseAliasBehaviour")));

        //TE: defines a listener for the Advanced Options menu item of the Options menu.
        ActionListener optionsListener = new ActionListener()
        {
            public void actionPerformed(ActionEvent e)
            {
                JMenuItem item = (JMenuItem)e.getSource();

                if (item == advancedOptions)
                {
                    setUpAdvancedOptions();    //TE: sets up the AdvancedOptions dialog when user clicks on this menu item.
                }
                jxplorer.repaint();
            }
        };

        advancedOptions = setMenuItem(optionsMenu, optionsListener,
                    new String[] {CBIntText.get("Advanced Options"), "d", CBIntText.get("Open the Advanced Options dialog."), "E", ""} );

        // add *another* action listener for specific handling...
        browserSearchAliases.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                try
                {
                    if (browserSearchAliases.isSelected())
                    {
                        JXplorer.setProperty("option.ldap.browseAliasBehaviour", "finding");
                        if (jxplorer.jndiBroker.getDirContext() != null)
                        {
                            jxplorer.jndiBroker.getDirContext().addToEnvironment("java.naming.ldap.derefAliases", "finding");
View Full Code Here

        {
            if (menuItems[i][0].equals("-"))
                menu.add(new JSeparator());
            else
            {
                JCheckBoxMenuItem tmp = new JCheckBoxMenuItem(menuItems[i][0], new ImageIcon(menuItems[i][5]), (menuItems[i][4].charAt(0)=='C'));
                setMenuItemState(menu, tmp, menuItems[i][1], menuItems[i][2], (menuItems[i][3].charAt(0)=='E'));
                if (listener != null) tmp.addActionListener(listener);
            }
        }
    }
View Full Code Here

            lafMenu.add(laf);
        }
        optionsMenu.add(functionHelper);
        optionsMenu.add(lafMenu);

        JCheckBoxMenuItem menuToolBar = makeCheckBoxMenuItemRes("menu_toolbar", ActionNames.TOOLBAR); //$NON-NLS-1$
        JCheckBoxMenuItem menuLoggerPanel = makeCheckBoxMenuItemRes("menu_logger_panel", ActionNames.LOGGER_PANEL_ENABLE_DISABLE); //$NON-NLS-1$
        GuiPackage guiInstance = GuiPackage.getInstance();
        if (guiInstance != null) { //avoid error in ant task tests (good way?)
            guiInstance.setMenuItemToolbar(menuToolBar);
            guiInstance.setMenuItemLoggerPanel(menuLoggerPanel);
        }
View Full Code Here

        return makeCheckBoxMenuItemRes(resource, actionCommand, null);
    }

    private static JCheckBoxMenuItem makeCheckBoxMenuItemRes(String resource,
            String actionCommand, KeyStroke keyStroke){
        JCheckBoxMenuItem cbkMenuItem = new JCheckBoxMenuItem(JMeterUtils.getResString(resource));
        cbkMenuItem.setName(resource);
        cbkMenuItem.setActionCommand(actionCommand);
        cbkMenuItem.setAccelerator(keyStroke);
        cbkMenuItem.addActionListener(ActionRouter.getInstance());
        return cbkMenuItem;
    }
View Full Code Here

      split.add(btn);
      view.add(split);
    }
    view.add(new JSeparator());
    // View / Display extends Object
    JCheckBoxMenuItem extendsObject = new JCheckBoxMenuItem(extendsObjectAction);
    extendsObject.setModel(new DefaultButtonModel() {
      @Override
      public boolean isSelected() {
        Preferences prefs = SystemFacade.getInstance().getPreferences();
        return prefs.getSetting(Settings.DISPLAY_EXTENDS_OBJECT, Boolean.class).booleanValue();
      }
    });
    view.add(extendsObject);
    // View / Show generics
    JCheckBoxMenuItem showGenerics = new JCheckBoxMenuItem(showGenericsAction);
    showGenerics.setModel(new DefaultButtonModel() {
      @Override
      public boolean isSelected() {
        Preferences prefs = SystemFacade.getInstance().getPreferences();
        return prefs.getSetting(Settings.DISPLAY_GENERICS, Boolean.class).booleanValue();
      }     
    });
    view.add(showGenerics);
    // View / Show varargs
    JCheckBoxMenuItem showVarargs = new JCheckBoxMenuItem(showVarargsAction);
    showVarargs.setModel(new DefaultButtonModel() {
      @Override
      public boolean isSelected() {
        Preferences prefs = SystemFacade.getInstance().getPreferences();
        return prefs.getSetting(Settings.DISPLAY_VARARGS, Boolean.class).booleanValue();
      }     
    });
    view.add(showVarargs);

   
    view.add(new JSeparator());

    // View / Tabs   
    JCheckBoxMenuItem box = new JCheckBoxMenuItem(tabViewAction);
    box.setText(this.structureTab.getTabTitle());
    view.add(box);
    this.viewCheckBoxes.put(box, Tab.STRUCTURE);
   
    box = new JCheckBoxMenuItem(tabViewAction);
    box.setText(this.hexTab.getTabTitle());
    view.add(box);
    this.viewCheckBoxes.put(box, Tab.HEX);

    box = new JCheckBoxMenuItem(tabViewAction);
    box.setText(this.constantPoolTab.getTabTitle());
    view.add(box);
    this.viewCheckBoxes.put(box, Tab.CONSTANTPOOL);

    box = new JCheckBoxMenuItem(tabViewAction);
    box.setText(this.editorTab.getTabTitle());
    view.add(box);
    this.viewCheckBoxes.put(box, Tab.EDITOR);

    box = new JCheckBoxMenuItem(tabViewAction);
    box.setText(this.obfuscationTab.getTabTitle());
    view.add(box);
    this.viewCheckBoxes.put(box, Tab.OBFUSCATION);

    box = new JCheckBoxMenuItem(tabViewAction);
    box.setText(this.searchTab.getTabTitle());
    view.add(box);
    this.viewCheckBoxes.put(box, Tab.SEARCH);

    box = new JCheckBoxMenuItem(tabViewAction);
    box.setText(this.debugTab.getTabTitle());
    view.add(box);
    this.viewCheckBoxes.put(box, Tab.DEBUG);

    box = new JCheckBoxMenuItem(tabViewAction);
    box.setText(this.compareTab.getTabTitle());
    view.add(box);
    this.viewCheckBoxes.put(box, Tab.COMPARE);
   
    for (JCheckBoxMenuItem chkBox : this.viewCheckBoxes.keySet()) {
      chkBox.setSelected(false);
View Full Code Here

      tearOffAction = new AbstractAction("Tear Off"){
       public void actionPerformed(ActionEvent e) {
          _desktop.tearOff(CDIInternalFrame.this);
       }};
     optionMenu.add(tearOffAction);
     mergeMode = new JCheckBoxMenuItem("Mergable");
     mergeMode.addItemListener(new ItemListener(){
       public void itemStateChanged(ItemEvent e) {
          setMergable(mergeMode.isSelected());
       }});
    
View Full Code Here

  }

  private void createViewMenu() {
    JMenu viewMenu = new JMenu(LocaleProps.get("VIEW_MENU"));

    viewRawDataItem = new JCheckBoxMenuItem(RAW_DATA_MODE);
    viewRawDataItem.setEnabled(false);
    viewRawDataItem.addActionListener(createRawDataListener());
    viewMenu.add(viewRawDataItem);

    viewPhasePlotItem = new JCheckBoxMenuItem(PHASE_PLOT_MODE);
    viewPhasePlotItem.setEnabled(false);
    viewPhasePlotItem.addActionListener(createPhasePlotListener());
    viewMenu.add(viewPhasePlotItem);

    viewMenu.addSeparator();
View Full Code Here

  //Setting menu

  private void initMenu() {
    JMenuBar menuBar = new JMenuBar();
    //create Options menu
    tabComponentsItem = new JCheckBoxMenuItem("Use TabComponents", true);
    tabComponentsItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_T, InputEvent.ALT_MASK));
    tabComponentsItem.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        for (int i = 0; i < pane.getTabCount(); i++) {
          if (tabComponentsItem.isSelected()) {
            initTabComponent(i);
          } else {
            pane.setTabComponentAt(i, null);
          }
        }
      }
    });
    scrollLayoutItem = new JCheckBoxMenuItem("Set ScrollLayout");
    scrollLayoutItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, InputEvent.ALT_MASK));
    scrollLayoutItem.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        if (pane.getTabLayoutPolicy() == JTabbedPane.WRAP_TAB_LAYOUT) {
          pane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
View Full Code Here

        viewMenu.add(new TSAction("Column_Chooser.Reset_Columns") {
            public void actionPerformed(ActionEvent e) {
                guiPrefs.reset("treeTable", "flatTable"); }});
        if (flatViewAction != null) {
            viewMenu.addSeparator();
            JCheckBoxMenuItem item = new JCheckBoxMenuItem(flatViewAction);
            flatViewAction.installButtonModel(item);
            viewMenu.add(item);
        } else if (mergedViewAction != null) {
            viewMenu.addSeparator();
            JCheckBoxMenuItem item = new JCheckBoxMenuItem(mergedViewAction);
            mergedViewAction.installButtonModel(item);
            viewMenu.add(item);
        }
        result.add(viewMenu);
View Full Code Here

TOP

Related Classes of javax.swing.JCheckBoxMenuItem$AccessibleJCheckBoxMenuItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.