private JMenuBar createMenuBar([In] ResourceBundle obj0) { JMenuBar jmenuBar = new JMenuBar(); string string1 = obj0.getString("system-frame.menu.file"); Character character1 = (Character) obj0.getObject("system-frame.menu.file.mnemonic"); JMenu jmenu1 = new JMenu(string1, true); ((AbstractButton) jmenu1).setMnemonic(character1.charValue()); string string2 = obj0.getString("system-frame.menu.file.close"); Character character2 = (Character) obj0.getObject("system-frame.menu.file.close.mnemonic"); JMenuItem.__\u003Cclinit\u003E(); JMenuItem jmenuItem1 = new JMenuItem(string2, (int) character2.charValue()); ((AbstractButton) jmenuItem1).setActionCommand("CLOSE"); ((AbstractButton) jmenuItem1).addActionListener((ActionListener) this); jmenu1.add(jmenuItem1); string string3 = obj0.getString("system-frame.menu.edit"); Character character3 = (Character) obj0.getObject("system-frame.menu.edit.mnemonic"); JMenu jmenu2 = new JMenu(string3); ((AbstractButton) jmenu2).setMnemonic(character3.charValue()); string string4 = obj0.getString("system-frame.menu.edit.copy"); Character character4 = (Character) obj0.getObject("system-frame.menu.edit.copy.mnemonic"); JMenuItem.__\u003Cclinit\u003E(); JMenuItem jmenuItem2 = new JMenuItem(string4, (int) character4.charValue()); ((AbstractButton) jmenuItem2).setActionCommand("COPY"); ((AbstractButton) jmenuItem2).addActionListener((ActionListener) this); jmenu2.add(jmenuItem2); jmenuBar.add(jmenu1); jmenuBar.add(jmenu2); return jmenuBar; }
/// <summary> /// Sets the menubar for this frame. /// </summary> public void setJMenuBar(JMenuBar @menubar) { }
/// <summary> /// Sets the menubar for this applet. /// </summary> public void setJMenuBar(JMenuBar @menuBar) { }
/// <summary> /// <B>Deprecated.</B> <I>As of Swing version 1.0.3 /// replaced by <code>setJMenuBar(JMenuBar menu)</code>.</I> /// </summary> public void setMenuBar(JMenuBar @menu) { }
private JMenuBar createEditorMenubar([In] RootEditor obj0) { JMenuBar jmenuBar = this.getJMenuBar(); if (jmenuBar == null) jmenuBar = new JMenuBar(); else ((Container) jmenuBar).removeAll(); this.addMenus(jmenuBar, this.getPrefixMenus()); if (this.isGlobalMenu()) { for (int index = 0; index < this.rootEditors.size(); ++index) { RootEditor rootEditor = (RootEditor) this.rootEditors.get(index); this.addMenus(jmenuBar, rootEditor.getMenus()); } } else this.addMenus(jmenuBar, obj0.getMenus()); this.addMenus(jmenuBar, this.getPostfixMenus()); return jmenuBar; }
private JMenuBar updateGlobalMenubar() { JMenuBar jmenuBar = this.getJMenuBar(); if (jmenuBar == null) jmenuBar = new JMenuBar(); else ((Container) jmenuBar).removeAll(); this.addMenus(jmenuBar, this.getPrefixMenus()); for (int index = 0; index < this.rootEditors.size(); ++index) { RootEditor rootEditor = (RootEditor) this.rootEditors.get(index); this.addMenus(jmenuBar, rootEditor.getMenus()); } this.addMenus(jmenuBar, this.getPostfixMenus()); return jmenuBar; }
protected internal virtual void setJMenuBar(JMenuBar menuBar) { JMenuBar jmenuBar = this.jMenuBar; this.jMenuBar = menuBar; ((Component) this).firePropertyChange("jMenuBar", (object) jmenuBar, (object) menuBar); }
private void initMViewControl(MViewControl mviewControl) { MViewPane mViewPane = mviewControl.getMViewPane(); // set layout mViewPane.setParams("rows=3\n" + "cols=2\n" + "border=1\n" + "visibleRows=2\n" + "layout=:2:1:M:1:0:1:1:c:b:1:1:L:0:0:1:1:c:n:0:1\n" + "param=:M:100:100:L:10b\n"); UserSettings settings = mViewPane.getUserSettings(); settings.setViewNavmode2d("rotZ"); // create main menu JMenuBar menubar = new JMenuBar(); mViewPane.setJMenuBar(menubar); JMenu menu = new JMenu("File"); menubar.add(menu); JMenu submenu = new JMenu("Save As Image..."); mViewPane.makeSaveImageMenu(submenu); menu.add(submenu); JMenuItem mi; mi = createMenuItem("Save All as Image", "saveAllImage", mViewPane); menu.add(mi); mi = createMenuItem("Exit","exit", mViewPane); menu.add(mi); menu = new JMenu("View"); mViewPane.makeViewMenu(menu); menubar.add(menu); mViewPane.addHelpMenu(menubar); mViewPane.setM(0, "../../../view/mols-2d/caffeine.mol"); mViewPane.setL(0, "Caffeine"); mViewPane.setM(1, "../../../view/mols-2d/lysergide.csmol"); mViewPane.setL(1, "Lysergide"); mViewPane.setM(2, "../../../view/mols-2d/vitaminc.csmol"); mViewPane.setL(2, "Vitamin C"); mViewPane.setM(3, "../../../view/mols-2d/aspirin.csmol"); mViewPane.setL(3, "Aspirin"); }
/// <summary> /// Sets the <code>menuBar</code> property for this <code>JInternalFrame</code>. /// </summary> public void setJMenuBar(JMenuBar @m) { }
public DashboardFrame(bool competition) { int num = competition ? 1 : 0; base.\u002Ector("SmartDashboard - "); DashboardFrame dashboardFrame = this; this.prefs = new DashboardPrefs(this); this.displayMode = DashboardFrame.DisplayMode.__\u003C\u003ESmartDashboard; this.shouldHideMenu = ((Boolean) this.prefs.__\u003C\u003EhideMenu.getValue()).booleanValue(); this.logger = new LogToCSV(this); this.setLayout((LayoutManager) new BorderLayout()); DashboardPanel.__\u003Cclinit\u003E(); this.smartDashboardPanel = new DashboardPanel(this, Robot.getTable()); ((Component) this.smartDashboardPanel).setName("SmartDashboard"); DashboardPanel.__\u003Cclinit\u003E(); this.liveWindowPanel = new DashboardPanel(this, Robot.getLiveWindow()); ((Component) this.liveWindowPanel).setName("LiveWindow"); MainPanel.__\u003Cclinit\u003E(); CardLayout cardLayout = new CardLayout(); DashboardPanel defaultPanel = this.smartDashboardPanel; DashboardPanel[] dashboardPanelArray = new DashboardPanel[2]; int index1 = 0; DashboardPanel dashboardPanel1 = this.liveWindowPanel; dashboardPanelArray[index1] = dashboardPanel1; int index2 = 1; DashboardPanel dashboardPanel2 = this.smartDashboardPanel; dashboardPanelArray[index2] = dashboardPanel2; this.mainPanel = new MainPanel((LayoutManager) cardLayout, defaultPanel, dashboardPanelArray); ((Container) this.mainPanel).add((Component) this.smartDashboardPanel, (object) DashboardFrame.DisplayMode.__\u003C\u003ESmartDashboard.toString()); ((Container) this.mainPanel).add((Component) this.liveWindowPanel, (object) DashboardFrame.DisplayMode.__\u003C\u003ELiveWindow.toString()); this.setDisplayMode(DashboardFrame.DisplayMode.__\u003C\u003ESmartDashboard); DashboardMenu.__\u003Cclinit\u003E(); this.menuBar = (JMenuBar) new DashboardMenu(this, this.mainPanel); this.propEditor = new PropertyEditor((JFrame) this); if (!this.shouldHideMenu) ((Container) this).add((Component) this.menuBar, (object) "North"); ((Container) this).add((Component) this.mainPanel, (object) "Center"); DashboardFrame\u00241 dashboardFrame1 = new DashboardFrame\u00241(this); this.smartDashboardPanel.addMouseListener((MouseListener) dashboardFrame1); this.smartDashboardPanel.addMouseMotionListener((MouseMotionListener) dashboardFrame1); if (num != 0) { ((Component) this).setPreferredSize(DashboardFrame.NETBOOK_SIZE); ((Frame) this).setUndecorated(true); ((Window) this).setLocation(0, 0); ((Frame) this).setResizable(false); } else { ((Window) this).setMinimumSize(DashboardFrame.MINIMUM_SIZE); this.setDefaultCloseOperation(0); Dimension.__\u003Cclinit\u003E(); ((Component) this).setPreferredSize(new Dimension(this.prefs.__\u003C\u003Ewidth.getValue().intValue(), this.prefs.__\u003C\u003Eheight.getValue().intValue())); ((Window) this).setLocation(this.prefs.__\u003C\u003Ex.getValue().intValue(), this.prefs.__\u003C\u003Ey.getValue().intValue()); } ((Window) this).addWindowListener((WindowListener) new DashboardFrame\u00242(this)); ((Component) this).addComponentListener((ComponentListener) new DashboardFrame\u00243(this)); DashboardFrame.INSTANCE = this; }