Package javax.swing

Examples of javax.swing.JCheckBoxMenuItem$AccessibleJCheckBoxMenuItem


      mMenu.add(createConfigureItem());
    }
  }

  private static JCheckBoxMenuItem createViewSearchMenu() {
    final JCheckBoxMenuItem showSearch = new JCheckBoxMenuItem(
        ToolBarDragAndDropSettings.mLocalizer
            .msg("showSearchField", "Show search field"));
    showSearch.setSelected(Settings.propIsSearchFieldVisible.getBoolean());
    showSearch.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        MainFrame.getInstance().setShowSearchField(showSearch.isSelected());
      }
    });
   
    return showSearch;
  }
View Full Code Here


   
    return showSearch;
  }
 
  private static JCheckBoxMenuItem createViewMenu() {
    final JCheckBoxMenuItem show = new JCheckBoxMenuItem(
        ToolBarDragAndDropSettings.mLocalizer
            .msg("showToolbar", "Show toolbar"));
    show.setSelected(Settings.propIsToolbarVisible.getBoolean());
    show.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        MainFrame.getInstance().setShowToolbar(show.isSelected());
      }
    });
   
    return show;
  }
View Full Code Here

    new MenuHelpTextAdapter(mQuitMI, mLocalizer.msg("menuinfo.quit", ""),
        mLabel);

    mToolbarMenu = createMenu("menuitem.viewToolbar", "Toolbar");

    mToolbarMI = new JCheckBoxMenuItem(ToolBarDragAndDropSettings.mLocalizer
        .msg("showToolbar", "Show toolbar"));
    mToolbarMI.setSelected(Settings.propIsToolbarVisible.getBoolean());
    mToolbarMI.addActionListener(this);
    new MenuHelpTextAdapter(mToolbarMI, mLocalizer.msg("menuinfo.toolbar", ""),
        mLabel);
View Full Code Here

    return item;
  }

  private JCheckBoxMenuItem createCheckBoxItem(final String localizerKey,
      final String defaultLabel) {
    JCheckBoxMenuItem item = new JCheckBoxMenuItem();
    setLabelAndAccessKeys(localizerKey, defaultLabel, item, false);
    return item;
  }
View Full Code Here

        //          Debug.output("Action: " + e);
        String command = e.getActionCommand();

        if (layer != null && e.getSource().equals(this)) {
            if (command.equals(LocationHandler.showname)) {
                JCheckBoxMenuItem btn = (JCheckBoxMenuItem) e.getSource();
                clp.getLoc().setShowName(btn.getState());
                layer.repaint();
            }
        }
    }
View Full Code Here

            // mattedCheckBox = new JToggleButton(getMattedIcon(mattingPaint),
            // isMatted());
            interString = i18n.get(DrawingAttributes.class,
                    "mattedEnableItem",
                    "Enable Matting on Edge");
            mattedEnabledItem = new JCheckBoxMenuItem(interString, matted);
            mattedEnabledItem.setActionCommand(MattedCommand);
            mattedEnabledItem.addActionListener(this);
            interString = i18n.get(DrawingAttributes.class,
                    "mattedEnableItem",
                    I18n.TOOLTIP,
View Full Code Here

        project_forums = new JMenuItem();
        bug_tracker = new JMenuItem();
        check_for_updates = new JMenuItem();
    about = new JMenuItem();
   
    tool_bar_visibility = new JCheckBoxMenuItem();
    status_bar_visibility = new JCheckBoxMenuItem();
    tool_bar_visibility.setText("Tool bar");
        status_bar_visibility.setText("Status bar");
        tool_bar_visibility.setSelected(true);
        status_bar_visibility.setSelected(true);
   
View Full Code Here

    } catch (MissingResourceException mre) {}

    if (iname == null) {
      return null;
    }
    JCheckBoxMenuItem res = new JCheckBoxMenuItem(iname);

    String mname = null;
    try {
      mname=getString(name+"Mnemonic");
    } catch (MissingResourceException mre){}

    if(mname != null) {
      res.setMnemonic(mname.charAt(0));
    } else {
      res.setMnemonic(iname.charAt(0));
    }

    KeyStroke k = getKeyStroke(name+"Shortcut");
    if (k != null) res.setAccelerator(k);

    if (listener != null) {
      res.addActionListener(listener);
    }
    return res;
  }
View Full Code Here

  JMenu options = (JMenu) menuBar.add(new JMenu("Options"));
  file.setMnemonic('O');

        showItem = (JCheckBoxMenuItem) options.add(
      new JCheckBoxMenuItem("Show Visual"));
  showItem.setMnemonic('S');
  showItem.addActionListener(new ShowItemListener());

     setFileMenuState(numberOfTracks);
  setControlMenuState(MultiPlayer.NOTINITIALIZED);
View Full Code Here

        public void menuSelected(MenuEvent ev) {
          boolean firstMenuItem = true;
          // Fill menu dynamically with a menu item for the frame of each application home
          for (Home home : homeApplication.getHomes()) {
            final JFrame applicationFrame = homeApplication.getHomeFrame(home);
            JCheckBoxMenuItem windowMenuItem = new JCheckBoxMenuItem(
                new AbstractAction(applicationFrame.getTitle()) {
                    public void actionPerformed(ActionEvent ev) {
                      applicationFrame.toFront();
                    }
                  });
             
            if (frame == applicationFrame) {
              windowMenuItem.setSelected(true);
            }
            if (firstMenuItem) {
              windowMenu.addSeparator();
              firstMenuItem = false;
            }
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.