Examples of JMenuBar


Examples of javax.swing.JMenuBar

            panels.add(lrp);
        }
    }
   
    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

Examples of javax.swing.JMenuBar

                chartPanel.clear();
        }
    }
   
    public void updateMenuBar() {
        JMenuBar menubar = getJMenuBar();
        ComponentFactory.clean(menubar);
        setJMenuBar(null);
       
        setJMenuBar(activeModule.getMenuBar());
        repaint();
View Full Code Here

Examples of javax.swing.JMenuBar

       
        setTitle(!update && !readonly ?
                  DcResources.getText("lblNewItem", dco.getModule().getObjectName()) :
                  dco.getName());

        JMenuBar mb = getDcMenuBar();
        if (mb != null) setJMenuBar(mb);
       
        setResizable(true);
        setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
View Full Code Here

Examples of javax.swing.JMenuBar

            }
        });
    }

    private JMenuBar getDcMenuBar() {
        JMenuBar mb = null;
       
        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);
        }
       
        return mb;
    }
View Full Code Here

Examples of javax.swing.JMenuBar

        setSize(DcSettings.getDimension(DcRepository.Settings.stTextViewerSize));
        setCenteredLocation();

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

        setModal(true);
        setVisible(true);
View Full Code Here

Examples of javax.swing.JMenuBar

    public TreePanel(GroupingPane gp) {
        this.gp = gp;
       
        setLayout(Layout.getGBL());
       
        JMenuBar menu = getMenu();
        if (menu != null) {
            add(menu, Layout.getGBC( 0, 0, 1, 1, 1.0, 1.0
                    ,GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
                     new Insets(5, 5, 0, 5), 0, 0));
        }
View Full Code Here

Examples of javax.swing.JMenuBar

     */
    public void findAndInit(Object someObj) {
        if (someObj instanceof MapPanel && someObj instanceof Container) {
            getContentPane().add((Container) someObj);

            JMenuBar jmb = ((MapPanel) someObj).getMapMenuBar();
            if (jmb != null) {
                Debug.message("basic",
                        "OpenMapApplet: Got MenuBar from MapPanel");
                getRootPane().setJMenuBar(jmb);
            }
View Full Code Here

Examples of javax.swing.JMenuBar

    undoHandler = new UndoHandler(new UndoManager());
    doc.addUndoableEditListener(undoHandler);
    ui.addCaretListener(this);
    setupActions();

    JMenuBar mb = new JMenuBar();
    mb.add(createFileMenu());
    mb.add(createEditMenu());
    setJMenuBar(mb);
   
    getContentPane().add(scroller, BorderLayout.CENTER);
    getContentPane().add(createToolBar(), BorderLayout.NORTH);
    pack();
View Full Code Here

Examples of javax.swing.JMenuBar

   * <br><b>Summary:</b><br>
   * This method initialise the JMenuBar.
     * The actions need to have been intialized before calling this method.
   */
  private void initJMenuBar() {
      JMenuBar jMenuBar = new JMenuBar();
        setJMenuBar(jMenuBar);
        //The FILE menu
        JMenu fileMenu = new JMenu(getString("fileMenuTitle"));
        addMenuItem(fileMenu, ACTION_OPEN_FILE);
        addMenuItem(fileMenu, ACTION_SAVE_FILE);
        addMenuItem(fileMenu, ACTION_QUIT);
        jMenuBar.add(fileMenu);
        //The LOGS menu
        JMenu logsMenu = new JMenu(getString("logsMenuTitle"));
        addMenuItem(logsMenu, ACTION_CLEAR_LOGS);
        jMenuBar.add(logsMenu);
        //The Server menu
        JMenu serverMenu = new JMenu(getString("serverMenuTitle"));
        addMenuItem(serverMenu, ACTION_OPEN_SERVER);
        addMenuItem(serverMenu, ACTION_CLOSE_SERVER);
        jMenuBar.add(serverMenu);
        //The options Menu
        JMenu optionsMenu = new JMenu(getString("optionsMenuTitle"));
        addMenuItem(optionsMenu, ACTION_OPTIONS);
        jMenuBar.add(optionsMenu);
    }
View Full Code Here

Examples of javax.swing.JMenuBar

        this.add(center_panel, BorderLayout.CENTER);
   
  }
  //----------------------------------------------------------------------
  private void setMainMenu() {
    main_menu_bar = new JMenuBar();
    file = new JMenu();
    fnew = new JMenu();
    view = new JMenu();
    tools = new JMenu();
    help = new JMenu();
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.