Package javax.swing

Examples of javax.swing.JCheckBoxMenuItem.addActionListener()


            final ColumnSelectionModel column = columns[col];
            final JCheckBoxMenuItem checkBox = new JCheckBoxMenuItem();
            checkBox.setText(column.getName());
            checkBox.setSelected(column.isSelected());
            checkBox.setEnabled(column.isEnabled());
            checkBox.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent evt) {
                    column.setSelected(checkBox.isSelected());
                }
            });
View Full Code Here


        menuButtons = new HashMap<String, JCheckBoxMenuItem>();
        this.downloadFormat = downloadFormat;
        for(ColumnStatus c : downloadFormat.getColumns()) {
            JCheckBoxMenuItem menu = new JCheckBoxMenuItem(c.getName());
            menu.setActionCommand(c.getName());
            menu.addActionListener(this);
            menuButtons.put(c.getName(), menu);
            add(menu);
        }
    }
   
View Full Code Here

                    public void actionPerformed(ActionEvent evt) {
                        frameRateActionPerformed(evt);
                    }
                });
                fps200.addActionListener(new ActionListener() {

                    public void actionPerformed(ActionEvent evt) {
                        frameRateActionPerformed(evt);
                    }
                });
View Full Code Here

    dateFormatChangePopup.add(isoButton);
    dateFormatChangePopup.add(simpleTimeButton);

    final JCheckBoxMenuItem menuItemToggleToolTips =
      new JCheckBoxMenuItem("Show ToolTips");
    menuItemToggleToolTips.addActionListener(
      new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
          preferenceModel.setToolTips(menuItemToggleToolTips.isSelected());
        }
      });
View Full Code Here

      });
    menuItemToggleToolTips.setIcon(new ImageIcon(ChainsawIcons.TOOL_TIP));

    final JCheckBoxMenuItem menuItemLoggerTree =
      new JCheckBoxMenuItem("Show Logger Tree panel");
    menuItemLoggerTree.addActionListener(
      new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          preferenceModel.setLogTreePanelVisible(
            menuItemLoggerTree.isSelected());
        }
View Full Code Here

      });
    menuItemLoggerTree.setIcon(new ImageIcon(ChainsawIcons.WINDOW_ICON));

    final JCheckBoxMenuItem menuItemScrollBottom =
      new JCheckBoxMenuItem("Scroll to bottom");
    menuItemScrollBottom.addActionListener(
      new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
          preferenceModel.setScrollToBottom(menuItemScrollBottom.isSelected());
        }
      });
View Full Code Here

    menuItemScrollBottom.setIcon(
      new ImageIcon(ChainsawIcons.SCROLL_TO_BOTTOM));

    final JCheckBoxMenuItem menuItemToggleDetails =
      new JCheckBoxMenuItem("Show Detail Pane");
    menuItemToggleDetails.addActionListener(
      new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          preferenceModel.setDetailPaneVisible(
            menuItemToggleDetails.isSelected());
        }
View Full Code Here

            }
        });
        settingsMenu.add(desktopColorMI = new JMenuItem("Desktop color"));
        final JCheckBoxMenuItem desktopImage = new JCheckBoxMenuItem("Desktop image");
        desktopImage.setSelected(false);
        desktopImage.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                desktop.enableBackgroundImage(desktopImage.isSelected());
            }
        });
        settingsMenu.add(desktopImage);
View Full Code Here

                for (int frameNum=0; frameNum < pictureFrames.length; frameNum++) {
                    final PictureFrame pictureFrame = (PictureFrame)pictureFrames[frameNum];
                    JCheckBoxMenuItem windowMenuItem = new JCheckBoxMenuItem("" + (frameNum + 1) + " " + pictureFrame.getTitle());
                    windowMenuItem.setSelected(pictureFrame.isSelected());
                    windowMenuItem.setMnemonic((char)(0x30 + frameNum));
                    windowMenuItem.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            // If a window is selected from the menu, switch to that window.
                            try {
                                pictureFrame.setSelected(true);
                            } catch (PropertyVetoException e1) {
View Full Code Here

        // add the given items to the popup menu.
        for (E item : fPopupItemsList) {
            // TODO should we throw IllegalArgumentException if o is null?
            JMenuItem menuItem = new JCheckBoxMenuItem(item.toString());
            menuItem.setFont(newPopupMenuFont);
            menuItem.addActionListener(createMenuItemListener(item));
            buttonGroup.add(menuItem);
            fPopupMenu.add(menuItem);
        }

        // set the selected item now that we've filled the popup menu with menu
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.