Package javax.swing

Examples of javax.swing.JRadioButtonMenuItem.addActionListener()


    file.add(exit);


    JRadioButtonMenuItem graph = new JRadioButtonMenuItem("Graph");
    graph.setSelected(true);
    graph.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        frame.switchState(JediState.GRAPH);
      }
    });
   
View Full Code Here


        frame.switchState(JediState.GRAPH);
      }
    });
   
    JRadioButtonMenuItem tree = new JRadioButtonMenuItem("Binary Trees");
    tree.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        frame.switchState(JediState.TREE);
      }
    });
View Full Code Here

     */
    public void updateJMenu(String perspectiveName) {
        if ((perspectiveName != null) && (this.menuBarViewTool.getMenuPerspective() != null)) {
            JRadioButtonMenuItem newPerspectiveItem = new JRadioButtonMenuItem(perspectiveName);
            newPerspectiveItem.setToolTipText("Select " + perspectiveName + " Perspective");
            newPerspectiveItem.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    menuBarViewTool.getControllerTool().notifyUpdatingDockingView(e.getSource());
                }
            });
View Full Code Here

     */
    public void updateJMenu(String perspectiveName) {
        if (perspectiveName != null) {
            JRadioButtonMenuItem newPerspectiveItem = new JRadioButtonMenuItem(perspectiveName);
            newPerspectiveItem.setToolTipText("Select " + perspectiveName + " Perspective");
            newPerspectiveItem.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    menuBarViewTool.getControllerTool().notifyUpdatingDockingView(e.getSource());
                }
            });
View Full Code Here

     */
    public void updateJMenu(String perspectiveName) {
        if (perspectiveName != null && this.menuBarViewTool.getMenuPerspective() != null) {
            JRadioButtonMenuItem newPerspectiveItem = new JRadioButtonMenuItem(perspectiveName);
            newPerspectiveItem.setToolTipText("Select " + perspectiveName + " Perspective");
            newPerspectiveItem.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    menuBarViewTool.getControllerTool().notifyUpdatingDockingView(e.getSource());
                }
            });
View Full Code Here

     * @param newPerspective
     */
    public void updateJMenu(Perspective newPerspective) {
        JRadioButtonMenuItem newPerspectiveItem = new JRadioButtonMenuItem(newPerspective.getName());
        newPerspectiveItem.setToolTipText("Select " + newPerspective.getName() + " Perspective");
        newPerspectiveItem.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                menuBarViewTool.getControllerTool().notifyUpdatingDockingView(e.getSource());
            }
        });
View Full Code Here

        if (newPerspective != null) {
            JRadioButtonMenuItem newPerspectiveItem = new JRadioButtonMenuItem(newPerspective
                    .getName());
            newPerspectiveItem
                    .setToolTipText("Select " + newPerspective.getName() + " Perspective");
            newPerspectiveItem.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    menuBarViewTool.getControllerTool().notifyUpdatingDockingView(e.getSource());
                }
            });
View Full Code Here

     */
    public void updateJMenu(String perspectiveName) {
        if (perspectiveName != null && this.menuBarViewTool.getMenuPerspective() != null) {
            JRadioButtonMenuItem newPerspectiveItem = new JRadioButtonMenuItem(perspectiveName);
            newPerspectiveItem.setToolTipText("Select " + perspectiveName + " Perspective");
            newPerspectiveItem.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    menuBarViewTool.getControllerTool().notifyUpdatingDockingView(e.getSource());
                }
            });
View Full Code Here

          aiLevelEasy.setSelected(false);
          aiLevelMedium.setSelected(true);
          aiLevelBest.setSelected(false);
        }
      });
      aiLevelBest.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
          settings.aiLevel=AI.BEST;
          ai.setLevel(settings.aiLevel);
          aiLevelEasy.setSelected(false);
          aiLevelMedium.setSelected(false);
View Full Code Here

          }
        }
         
          // creating action listener for each radio buttons in order to open the option panel when a radio button is choosen
          for (JRadioButtonMenuItem radio : ret.keySet()) {
          radio.addActionListener(new PluginRadioButtonListener(ret.get(radio)));
        }
    } catch (Throwable t) {
      Debug.println(this.getClass(), "Error filling Inference Algorithm's plugins", t);
    }
     
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.