Search in sources :

Example 1 with MenuAdapter

use of maspack.widgets.MenuAdapter in project artisynth_core by artisynth.

the class MeshThicken method addMenuBar.

public JMenuBar addMenuBar() {
    JMenuBar menuBar = super.addMenuBar();
    JMenu menu = new JMenu("Edit");
    menu.addMenuListener(new MenuAdapter() {

        public void menuSelected(MenuEvent m_evt) {
            createEditMenu((JMenu) m_evt.getSource());
        }
    });
    menuBar.add(menu);
    return menuBar;
}
Also used : MenuAdapter(maspack.widgets.MenuAdapter) JMenuBar(javax.swing.JMenuBar) JMenu(javax.swing.JMenu) MenuEvent(javax.swing.event.MenuEvent)

Example 2 with MenuAdapter

use of maspack.widgets.MenuAdapter in project artisynth_core by artisynth.

the class MeshViewer method createMenuBar.

private void createMenuBar() {
    JMenuBar menuBar = new JMenuBar();
    setJMenuBar(menuBar);
    JMenu menu = new JMenu("File");
    menu.addMenuListener(new MenuAdapter() {

        public void menuSelected(MenuEvent m_evt) {
            createFileMenu((JMenu) m_evt.getSource());
        }
    });
    menuBar.add(menu);
    menu = new JMenu("View");
    menu.addMenuListener(new MenuAdapter() {

        public void menuSelected(MenuEvent m_evt) {
            createViewMenu((JMenu) m_evt.getSource());
        }
    });
    menuBar.add(menu);
}
Also used : MenuAdapter(maspack.widgets.MenuAdapter) JMenuBar(javax.swing.JMenuBar) JMenu(javax.swing.JMenu) MenuEvent(javax.swing.event.MenuEvent)

Aggregations

JMenu (javax.swing.JMenu)2 JMenuBar (javax.swing.JMenuBar)2 MenuEvent (javax.swing.event.MenuEvent)2 MenuAdapter (maspack.widgets.MenuAdapter)2