Package javax.swing

Examples of javax.swing.JCheckBoxMenuItem.addActionListener()


  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());
      }
    });
   
View Full Code Here


  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());
      }
    });
   
View Full Code Here

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

    if (listener != null) {
      res.addActionListener(listener);
    }
    return res;
  }

  public JButton getBox(String name, ActionListener listener){
View Full Code Here

            ColumnKeeper ck = (ColumnKeeper)nextEntry.getValue();
            assert ck!=null;
            jcbmi.setSelected(ck.isShown);

            jcbmi.addActionListener(ck);
            popupMenu.add(jcbmi);
        }
        popupMenu.addSeparator();

        JMenuItem jmiAddColumn = new JMenuItem(language
View Full Code Here

            //
            JCheckBoxMenuItem jcbmi = new JCheckBoxMenuItem(newName);
            jcbmi.setSelected(true);
            ColumnKeeper ck = new ColumnKeeper(t);
            jcbmi.addActionListener(ck);
            mapTableColumnColumnKeeper.put(t, ck);
            //popupMenu.insert(jcbmi, popupMenu.getSubElements().length - 3);
            //
            getProject().setModified();
View Full Code Here

      ResourceColumn col;
    int size = cols.size();
    for (int i =0; i < size; i++) {
      col = (ResourceColumn)cols.get(i);
      JCheckBoxMenuItem item = new JCheckBoxMenuItem(col.getTitle(), col.isVisible());
      item.addActionListener(new ColumnHandler(col));
      popupMenu.add(item);
    }
    popupMenu.addSeparator();
   
    /* 'display all columns' button*/
 
View Full Code Here

      for(int i = 0; i < SORT_ARRAY.length; i++) {
        JCheckBoxMenuItem item = new JCheckBoxMenuItem(SORT_NAMES[i]);
        final int cat = SORT_ARRAY[i];
        item.setState(cat == sortCategory);
        item.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent ev) {
              sortCategory = cat;
              refreshList(false);
            }
          });
View Full Code Here

      ButtonGroup       group         = new ButtonGroup();

      JCheckBoxMenuItem item = new JCheckBoxMenuItem("Sort by name");
      item.setState(iconComparator == nameComparator);
      item.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent ev) {
            iconComparator = nameComparator;
            rebuildPanel();
          }
        });
View Full Code Here

      contextPopupMenu.add(item);
      group.add(item);

      item = new JCheckBoxMenuItem("Sort by start-level");
      item.setState(iconComparator == startLevelComparator);
      item.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent ev) {
            iconComparator = startLevelComparator;
            rebuildPanel();
          }
        });
View Full Code Here

      contextPopupMenu.add(item);
      group.add(item);

      item = new JCheckBoxMenuItem("Sort by bundle ID");
      item.setState(iconComparator == null);
      item.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent ev) {
            iconComparator = null;
            rebuildPanel();
          }
        });
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.