Package javax.swing

Examples of javax.swing.JCheckBoxMenuItem.addActionListener()


      if (all.contains(type))
    return;
      all.addElement(type);
      JCheckBoxMenuItem item =
    new JCheckBoxMenuItem(type.getName(), false);
      item.addActionListener(wrap(new Service(type, -1)));
      menu.add(item);
      if (!ssuper.getState())
    return;
      if (sclass.getState() && type.getSuperclass() != null)
    addType(type.getSuperclass(), all);
View Full Code Here


      if (all.contains(type))
    return;
      all.addElement(type);
      JCheckBoxMenuItem item =
    new JCheckBoxMenuItem(typeName(type), false);
      item.addActionListener(wrap(new AttrSet(type)));
      menu.add(item);
      if (esuper.getState() &&
    Entry.class.isAssignableFrom(type.getSuperclass()))
    addType(type.getSuperclass(), all);
  }
View Full Code Here

        continue;
    try {
        if (field.get(ent) != null) {
      JCheckBoxMenuItem item =
          new JCheckBoxMenuItem(field.getName(), true);
      item.addActionListener(
          wrap(new Value(index, field, null)));
      menu.add(item);
        } else {
      JMenu item = new JMenu(field.getName());
      item.addMenuListener(
View Full Code Here

        String label = data.getColumnLabel(index, false);
        boolean visible = data.isVisible(key);
        JCheckBoxMenuItem item = new JCheckBoxMenuItem(label, visible);
        String cmd = String.valueOf(EventController.OP_TABLEMENU_CLICKED);
        item.setActionCommand(cmd + ">>" + key);
        item.addActionListener(EventController.getActionListener());
        return item;
    }
}
View Full Code Here

        boolean first = true;
        for(GroupOrganizer organizer : organizers) {
            JCheckBoxMenuItem item = new JCheckBoxMenuItem(organizer.getName());
            map.put(item, organizer);
            item.addActionListener(menuItemListener);
            buttonGroup.add(item);
            popup.add(item);
            if(first) {
                item.setSelected(true);
                first = false;
View Full Code Here

          }

         
        });
     
        regressionLineCheckBox.addActionListener(new ActionListener() {

          @Override
          public void actionPerformed(ActionEvent e) {
            AbstractButton abstractButton = (AbstractButton) e.getSource();
            if (abstractButton.getModel().isSelected()) {
View Full Code Here

        }

      });

      allAnagrams.addActionListener(new ActionListener(){

        /*
         * Enables or disables the option to see all the anagrams depending on user
         * chosen option.
         */
 
View Full Code Here

        m_menuOptions.removeAll();
       
        final JCheckBoxMenuItem antialias =
            new JCheckBoxMenuItem( "Antialias", m_frame.isAntialias() );
        antialias.setMnemonic( 'a' );
        antialias.addActionListener( new ActionListener()
            {
                public void actionPerformed( ActionEvent event )
                {
                    m_frame.setAntialias( antialias.getState() );
                }
View Full Code Here

      Class[] types = tmpl.serviceTypes;
      for (int i = 0; i < types.length; i++) {
    all.addElement(types[i]);
    JCheckBoxMenuItem item =
        new JCheckBoxMenuItem(types[i].getName(), true);
        item.addActionListener(wrap(new Service(types[i], i)));
        menu.add(item);
      }
      try {
    types = lookup.getServiceTypes(tmpl, "");
      } catch (Throwable t) {
View Full Code Here

      if (all.contains(type))
    return;
      all.addElement(type);
      JCheckBoxMenuItem item =
    new JCheckBoxMenuItem(type.getName(), false);
      item.addActionListener(wrap(new Service(type, -1)));
      menu.add(item);
      if (!ssuper.getState())
    return;
      if (sclass.getState() && type.getSuperclass() != null)
    addType(type.getSuperclass(), all);
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.