Search in sources :

Example 66 with JMenuBar

use of javax.swing.JMenuBar in project libgdx by libgdx.

the class Hiero method initializeMenus.

private void initializeMenus() {
    {
        JMenuBar menuBar = new JMenuBar();
        setJMenuBar(menuBar);
        {
            JMenu fileMenu = new JMenu();
            menuBar.add(fileMenu);
            fileMenu.setText("File");
            fileMenu.setMnemonic(KeyEvent.VK_F);
            {
                openMenuItem = new JMenuItem("Open Hiero settings file...");
                openMenuItem.setMnemonic(KeyEvent.VK_O);
                openMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, KeyEvent.CTRL_MASK));
                fileMenu.add(openMenuItem);
            }
            {
                saveMenuItem = new JMenuItem("Save Hiero settings file...");
                saveMenuItem.setMnemonic(KeyEvent.VK_S);
                saveMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.CTRL_MASK));
                fileMenu.add(saveMenuItem);
            }
            fileMenu.addSeparator();
            {
                saveBMFontMenuItem = new JMenuItem("Save BMFont files (text)...");
                saveBMFontMenuItem.setMnemonic(KeyEvent.VK_B);
                saveBMFontMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_B, KeyEvent.CTRL_MASK));
                fileMenu.add(saveBMFontMenuItem);
            }
            fileMenu.addSeparator();
            {
                exitMenuItem = new JMenuItem("Exit");
                exitMenuItem.setMnemonic(KeyEvent.VK_X);
                fileMenu.add(exitMenuItem);
            }
        }
    }
}
Also used : JMenuItem(javax.swing.JMenuItem) JMenuBar(javax.swing.JMenuBar) JMenu(javax.swing.JMenu)

Example 67 with JMenuBar

use of javax.swing.JMenuBar in project binnavi by google.

the class CReilInstructionDialog method addMenuBar.

/**
   * Adds a menu bar to the dialog.
   */
private void addMenuBar() {
    final JMenu menu = new JMenu("REIL Code");
    final JMenuItem copyItem = new JMenuItem(CActionProxy.proxy(new CActionCopyAllReilCode(m_textArea)));
    menu.add(copyItem);
    final JMenuBar menuBar = new JMenuBar();
    menuBar.add(menu);
    setJMenuBar(menuBar);
}
Also used : JMenuItem(javax.swing.JMenuItem) JMenu(javax.swing.JMenu) JMenuBar(javax.swing.JMenuBar)

Example 68 with JMenuBar

use of javax.swing.JMenuBar in project ACS by ACS-Community.

the class BeanGrouper method getBeanGrouperMenuBar.

private JMenuBar getBeanGrouperMenuBar() {
    if (beanGrouperMenuBar == null) {
        beanGrouperMenuBar = new JMenuBar();
        beanGrouperMenuBar.add(getScriptMenu());
        beanGrouperMenuBar.add(getEditMenu());
    }
    return beanGrouperMenuBar;
}
Also used : JMenuBar(javax.swing.JMenuBar)

Example 69 with JMenuBar

use of javax.swing.JMenuBar in project ACS by ACS-Community.

the class ErrorTreeCellRenderer method getEBEMenuBar.

/**
	 * This method initializes jJMenuBar	
	 * 	
	 * @return javax.swing.JMenuBar	
	 */
private JMenuBar getEBEMenuBar() {
    if (EBEMenuBar == null) {
        EBEMenuBar = new JMenuBar();
        EBEMenuBar.add(getFileMenu());
    }
    return EBEMenuBar;
}
Also used : JMenuBar(javax.swing.JMenuBar)

Example 70 with JMenuBar

use of javax.swing.JMenuBar in project pcgen by PCGen.

the class GMGenSystem method createMenuBar.

// Creates the MenuBar for the application.
private void createMenuBar() {
    systemMenuBar = new JMenuBar();
    createFileMenu();
    createEditMenu();
    createToolsMenu();
    setJMenuBar(systemMenuBar);
    setDefaultEnablementOfMenuItems();
    pack();
}
Also used : JMenuBar(javax.swing.JMenuBar)

Aggregations

JMenuBar (javax.swing.JMenuBar)119 JMenu (javax.swing.JMenu)83 JMenuItem (javax.swing.JMenuItem)45 ActionEvent (java.awt.event.ActionEvent)36 ActionListener (java.awt.event.ActionListener)30 JPanel (javax.swing.JPanel)28 BoxLayout (javax.swing.BoxLayout)25 Dimension (java.awt.Dimension)23 JFrame (javax.swing.JFrame)17 JScrollPane (javax.swing.JScrollPane)15 JLabel (javax.swing.JLabel)14 JButton (javax.swing.JButton)13 JmriJFrame (jmri.util.JmriJFrame)12 GridBagLayout (java.awt.GridBagLayout)11 BorderLayout (java.awt.BorderLayout)10 JSeparator (javax.swing.JSeparator)10 AbstractAction (javax.swing.AbstractAction)9 FlowLayout (java.awt.FlowLayout)6 JCheckBoxMenuItem (javax.swing.JCheckBoxMenuItem)6 JPopupMenu (javax.swing.JPopupMenu)6