Package javax.swing

Examples of javax.swing.JMenu$WinListener


    @Override
    public void setFont(Font font) {
        super.setFont(font);
       
        for (int i = 0; i < getMenuCount(); i++) {
            JMenu menu = getMenu(i);
            menu.setFont(ComponentFactory.getSystemFont());
            for (int j = 0; j < menu.getMenuComponents().length; j++) {
                menu.getMenuComponents()[j].setFont(ComponentFactory.getStandardFont());
            }
        }
        revalidate();
    }   
View Full Code Here


                                    File baseDir) {
        super(parent);
       
        this.parent = parent;
       
        JMenu menu = new FileRenamerMenu(this);
        JMenuBar menuBar = ComponentFactory.getMenuBar();
        menuBar.add(menu);
        setJMenuBar(menuBar);       
       
        setHelpIndex("dc.tools.filerenamer");
View Full Code Here

        }
    }
   
    private void installMenu() {
        JMenuBar mb = ComponentFactory.getMenuBar();
        JMenu menu = ComponentFactory.getMenu(DcResources.getText("lblEdit"));
       
        JMenuItem miCreate = ComponentFactory.getMenuItem(IconLibrary._icoAdd, DcResources.getText("lblAddLanguage"));
        miCreate.setActionCommand("addLanguage");
        miCreate.addActionListener(this);
       
        menu.add(miCreate);
        mb.add(menu);
       
        setJMenuBar(mb);
    }
View Full Code Here

    public DcFileRenamerPopupMenu(DcFilePatternField fpf, int modIdx) {
        JMenuItem menuInsertText = ComponentFactory.getMenuItem(DcResources.getText("lblInsertText"));
        JMenuItem menuInsertDir = ComponentFactory.getMenuItem(DcResources.getText("lblInsertDirectory"));
        JMenuItem menuRemove = ComponentFactory.getMenuItem(DcResources.getText("lblRemove"));

        JMenu menuInsertField = ComponentFactory.getMenu(DcResources.getText("lblInsertField"));
       
        DcModule module = DcModules.get(modIdx);
        for (DcField field : DcModules.get(modIdx).getFields()) {
           
          if (field.getIndex() == DcObject._SYS_CONTAINER)
            continue;
         
            if (field.getIndex() == module.getParentReferenceFieldIndex()) {
              JMenuItem menuField = ComponentFactory.getMenuItemmodule.getParent().getObjectName());
                menuField.setActionCommand(String.valueOf(field.getIndex()));
                menuField.addActionListener(fpf);
                menuInsertField.add(menuField);
            } else if (isValid(field)) {
                JMenuItem menuField = ComponentFactory.getMenuItem(field.getSystemName());
                menuField.setActionCommand(String.valueOf(field.getIndex()));
                menuField.addActionListener(fpf);
                menuInsertField.add(menuField);
            }
        }
       
        menuInsertText.setActionCommand("insertText");
        menuInsertDir.setActionCommand("insertDirectory");    
View Full Code Here

        FileImporter importer = DcModules.get(moduleIdx).getImporter();
        if (    importer != null && importer.allowReparsing() &&
                DcModules.get(moduleIdx).getFileField() != null) {

            mb = ComponentFactory.getMenuBar();
            JMenu menuEdit = ComponentFactory.getMenu(DcResources.getText("lblFile"));

            PluginHelper.add(menuEdit, "AttachFileInfo");
            menuEdit.addSeparator();
            PluginHelper.add(menuEdit, "CloseWindow");
           
            mb.add(menuEdit);
        }
       
View Full Code Here

      private FieldPermissionPanel panel;
     
      protected ModulePermissionMenu(FieldPermissionPanel panel) {
        this.panel = panel;
       
        JMenu mnuEdit = ComponentFactory.getMenu(DcResources.getText("lblEdit"));
       
        JMenuItem miAllowViewAll = ComponentFactory.getMenuItem(DcResources.getText("lblAllowViewAll"));
        JMenuItem miAllowEditAll = ComponentFactory.getMenuItem(DcResources.getText("lblAllowEditAll"));
        JMenuItem miDenyAccess = ComponentFactory.getMenuItem(DcResources.getText("lblDenyModuleAccess"));
       
        miAllowViewAll.setActionCommand("viewAll");
        miAllowEditAll.setActionCommand("editAll");
        miDenyAccess.setActionCommand("denyAll");
       
        miAllowViewAll.addActionListener(this);
        miAllowEditAll.addActionListener(this);
        miDenyAccess.addActionListener(this);
       
        mnuEdit.add(miAllowViewAll);
        mnuEdit.add(miAllowEditAll);
        mnuEdit.add(miDenyAccess);
       
        add(mnuEdit);
      }
View Full Code Here

        textArea.setText(s);
        setSize(DcSettings.getDimension(DcRepository.Settings.stTextViewerSize));
        setCenteredLocation();

        if (edit) {
            JMenu editMenu = new TextEditMenu(textArea);
            JMenuBar mb = ComponentFactory.getMenuBar();
            mb.add(editMenu);
            setJMenuBar(mb);
        }
View Full Code Here

                if ((depth<currentItems.size())
                && (currentItems.get(depth) instanceof JMenu)
                && ((JMenu)currentItems.get(depth)).getText().equals(token))
                    continue;
                  // The menu does not correspond. Create a new one
                  item = new JMenu(token);
            }
            // So, it is a single item, either the last item in the list, or a at top-level
            else {
                item = new JMenuItem(token);
                // This is a single item, it can lead to child creation => add the adequate listener
View Full Code Here

    res.add(pasteAction);
    return res;
  }

  protected JMenu createFileMenu(){
    JMenu m=resources.getMenu("file");
    importMenuItem=resources.getItem("import",this);
    m.add(importMenuItem);
    exportMenuItem=resources.getItem("export",this);
    m.add(exportMenuItem);
    closeMenuItem=resources.getItem("close",this);
    m.add(closeMenuItem);
    return m;
  }
View Full Code Here

    m.add(closeMenuItem);
    return m;
  }
 
  protected JMenu createEditMenu(){
    JMenu m=resources.getMenu("edit");
    m.add(undoHandler.getUndoAction());
    m.add(undoHandler.getRedoAction());
   
    m.addSeparator();
   
    m.add(cutAction);
    m.add(copyAction);
    m.add(pasteAction);
   
    return m;
  }
View Full Code Here

TOP

Related Classes of javax.swing.JMenu$WinListener

Copyright © 2018 www.massapicom. 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.