Package javax.swing

Examples of javax.swing.JMenuItem.addActionListener()


                miDelete.addActionListener(this);
                miDelete.setActionCommand("deleteFile");
                miDelete.setEnabled(file.exists());

                JMenuItem miMove = ComponentFactory.getMenuItem(DcResources.getText("lblMoveFile"));
                miMove.addActionListener(this);
                miMove.setActionCommand("moveFile");
                miMove.setEnabled(file.exists());

                JMenuItem miLocateHP = ComponentFactory.getMenuItem(IconLibrary._icoDriveScanner, DcResources.getText("lblLocateFile", DcResources.getText("lblMatchOnHashAndSize")));
                miLocateHP.addActionListener(this);
View Full Code Here


                miMove.addActionListener(this);
                miMove.setActionCommand("moveFile");
                miMove.setEnabled(file.exists());

                JMenuItem miLocateHP = ComponentFactory.getMenuItem(IconLibrary._icoDriveScanner, DcResources.getText("lblLocateFile", DcResources.getText("lblMatchOnHashAndSize")));
                miLocateHP.addActionListener(this);
                miLocateHP.setActionCommand("locateFileHP");
                miLocateHP.setEnabled(!file.exists() && dco.isFilled(DcObject._SYS_FILEHASH) && dco.isFilled(DcObject._SYS_FILESIZE));
               
                JMenuItem miLocateMP = ComponentFactory.getMenuItem(IconLibrary._icoDriveScanner, DcResources.getText("lblLocateFile", DcResources.getText("lblMatchOnFilenameAndSize")));
                miLocateMP.addActionListener(this);
View Full Code Here

                miLocateHP.addActionListener(this);
                miLocateHP.setActionCommand("locateFileHP");
                miLocateHP.setEnabled(!file.exists() && dco.isFilled(DcObject._SYS_FILEHASH) && dco.isFilled(DcObject._SYS_FILESIZE));
               
                JMenuItem miLocateMP = ComponentFactory.getMenuItem(IconLibrary._icoDriveScanner, DcResources.getText("lblLocateFile", DcResources.getText("lblMatchOnFilenameAndSize")));
                miLocateMP.addActionListener(this);
                miLocateMP.setActionCommand("locateFileMP");
                miLocateMP.setEnabled(!file.exists() && dco.isFilled(DcObject._SYS_FILESIZE));           

                JMenuItem miLocateLP = ComponentFactory.getMenuItem(IconLibrary._icoDriveScanner, DcResources.getText("lblLocateFile", DcResources.getText("lblMatchOnFilename")));
                miLocateLP.addActionListener(this);
View Full Code Here

                miLocateMP.addActionListener(this);
                miLocateMP.setActionCommand("locateFileMP");
                miLocateMP.setEnabled(!file.exists() && dco.isFilled(DcObject._SYS_FILESIZE));           

                JMenuItem miLocateLP = ComponentFactory.getMenuItem(IconLibrary._icoDriveScanner, DcResources.getText("lblLocateFile", DcResources.getText("lblMatchOnFilename")));
                miLocateLP.addActionListener(this);
                miLocateLP.setActionCommand("locateFileLP");
                miLocateLP.setEnabled(!file.exists());       
               
                menuFile.add(miDelete);
                menuFile.add(miMove);
View Full Code Here

    public class PopupMenu extends DcPopupMenu implements ActionListener {

        public PopupMenu() {
            JMenuItem menuToggleLabels = new JMenuItem(DcResources.getText("lblToggleMenuLabels"));

            menuToggleLabels.addActionListener(this);
            menuToggleLabels.setActionCommand("toggleLabels");
            this.add(menuToggleLabels);
        }
       
        @Override
View Full Code Here

        JMenuItem menuDelete = new JMenuItem(DcResources.getText("lblDelete"), IconLibrary._icoDelete);
       
        menuOpen.addActionListener(this);
        menuOpen.setActionCommand("open");
       
        menuDelete.addActionListener(this);
        menuDelete.setActionCommand("delete");

        add(menuOpen);
        add(menuDelete);
    }
View Full Code Here

                    Vector vec = new Vector();
                    vec.add(new JSeparator());

                    JMenuItem done = new JMenuItem("Done");
                    done.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent ae) {
                            deactivate();
                        }
                    });
                    vec.add(done);
View Full Code Here

                || ((Boolean) g.getAttribute(OMGraphicConstants.CHANGE_APPEARANCE)).booleanValue()) {

            JMenuItem gui = new JMenuItem(i18n.get(OMDrawingTool.class,
                    "popupMenuChangeAppearance",
                    "Change Appearance"));
            gui.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent ae) {
                    EditableOMGraphic eomg = getCurrentEditable();
                    if (eomg != null) {
                        boolean previous = eomg.getShowGUI();
                        eomg.setShowGUI(true);
View Full Code Here

                || ((Boolean) g.getAttribute(OMGraphicConstants.REMOVABLE)).booleanValue()) {

            JMenuItem delete = new JMenuItem(i18n.get(OMDrawingTool.class,
                    "popupMenuDelete",
                    "Delete"));
            delete.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent ae) {
                    OMAction action = new OMAction();
                    action.setMask(OMGraphic.DELETE_GRAPHIC_MASK);
                    EditableOMGraphic eomg = getCurrentEditable();
                    if (eomg != null) {
View Full Code Here

          if( PersistenceManager.isPersistenceEnabled() ) {
            changePriorityMenu = new JMenu();
            for(final FreenetPriority priority : FreenetPriority.values()) {
              JMenuItem priorityMenuItem = new JMenuItem();
              priorityMenuItem.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(final ActionEvent actionEvent) {
                  changeItemPriorites(modelTable.getSelectedItems(), priority);
                }
              });
              changePriorityMenu.add(priorityMenuItem);
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.