Search in sources :

Example 1 with LoadXmlVSDecoderAction

use of jmri.jmrit.vsdecoder.LoadXmlVSDecoderAction in project JMRI by JMRI.

the class VSDManagerFrame method buildMenu.

private void buildMenu() {
    // uses NamedBeanBundle
    JMenu fileMenu = new JMenu(Bundle.getMessage("MenuFile"));
    // OK to use this different key name for Mnemonics
    fileMenu.setMnemonic(Mnemonics.get("FileMenu"));
    fileMenu.add(new LoadVSDFileAction(Bundle.getMessage("VSDecoderFileMenuLoadVSDFile")));
    fileMenu.add(new StoreXmlVSDecoderAction(Bundle.getMessage("VSDecoderFileMenuSaveProfile")));
    fileMenu.add(new LoadXmlVSDecoderAction(Bundle.getMessage("VSDecoderFileMenuLoadProfile")));
    JMenu editMenu = new JMenu(Bundle.getMessage("MenuEdit"));
    // OK to use this different key name for Mnemonics
    editMenu.setMnemonic(Mnemonics.get("EditMenu"));
    editMenu.add(new VSDPreferencesAction(Bundle.getMessage("VSDecoderFileMenuPreferences")));
    // disable XML store
    fileMenu.getItem(1).setEnabled(false);
    // disable XML load
    fileMenu.getItem(2).setEnabled(false);
    menuList = new ArrayList<JMenu>(3);
    menuList.add(fileMenu);
    menuList.add(editMenu);
    this.setJMenuBar(new JMenuBar());
    this.getJMenuBar().add(fileMenu);
    this.getJMenuBar().add(editMenu);
    // Fix this... needs to be help for the new frame
    this.addHelpMenu("package.jmri.jmrit.vsdecoder.swing.VSDManagerFrame", true);
}
Also used : StoreXmlVSDecoderAction(jmri.jmrit.vsdecoder.StoreXmlVSDecoderAction) LoadVSDFileAction(jmri.jmrit.vsdecoder.LoadVSDFileAction) LoadXmlVSDecoderAction(jmri.jmrit.vsdecoder.LoadXmlVSDecoderAction) JMenu(javax.swing.JMenu) JMenuBar(javax.swing.JMenuBar)

Example 2 with LoadXmlVSDecoderAction

use of jmri.jmrit.vsdecoder.LoadXmlVSDecoderAction in project JMRI by JMRI.

the class ManageLocationsFrame method buildMenu.

private void buildMenu() {
    JMenu fileMenu = new JMenu(Bundle.getMessage("MenuFile"));
    fileMenu.add(new LoadVSDFileAction(Bundle.getMessage("VSDecoderFileMenuLoadVSDFile")));
    fileMenu.add(new StoreXmlVSDecoderAction(Bundle.getMessage("VSDecoderFileMenuSaveProfile")));
    fileMenu.add(new LoadXmlVSDecoderAction(Bundle.getMessage("VSDecoderFileMenuLoadProfile")));
    JMenu editMenu = new JMenu(Bundle.getMessage("MenuEdit"));
    editMenu.add(new VSDPreferencesAction(Bundle.getMessage("VSDecoderFileMenuPreferences")));
    // disable XML store
    fileMenu.getItem(1).setEnabled(false);
    // disable XML load
    fileMenu.getItem(2).setEnabled(false);
    menuList = new ArrayList<JMenu>(3);
    menuList.add(fileMenu);
    menuList.add(editMenu);
    this.setJMenuBar(new JMenuBar());
    this.getJMenuBar().add(fileMenu);
    this.getJMenuBar().add(editMenu);
    // NOI18N
    this.addHelpMenu("package.jmri.jmrit.vsdecoder.swing.ManageLocationsFrame", true);
}
Also used : StoreXmlVSDecoderAction(jmri.jmrit.vsdecoder.StoreXmlVSDecoderAction) LoadVSDFileAction(jmri.jmrit.vsdecoder.LoadVSDFileAction) LoadXmlVSDecoderAction(jmri.jmrit.vsdecoder.LoadXmlVSDecoderAction) JMenu(javax.swing.JMenu) JMenuBar(javax.swing.JMenuBar)

Aggregations

JMenu (javax.swing.JMenu)2 JMenuBar (javax.swing.JMenuBar)2 LoadVSDFileAction (jmri.jmrit.vsdecoder.LoadVSDFileAction)2 LoadXmlVSDecoderAction (jmri.jmrit.vsdecoder.LoadXmlVSDecoderAction)2 StoreXmlVSDecoderAction (jmri.jmrit.vsdecoder.StoreXmlVSDecoderAction)2