本文整理了Java中nu.zoom.swing.desktop.Workbench.getMenuBar()
方法的一些代码示例,展示了Workbench.getMenuBar()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Workbench.getMenuBar()
方法的具体详情如下:
包路径:nu.zoom.swing.desktop.Workbench
类名称:Workbench
方法名:getMenuBar
暂无
代码示例来源:origin: nu.zoom/eon2
@Override
public void start() {
if (connectionsMenu == null) {
connectionsMenu = new JMenu(messages.getMessage("connection.menu"));
connectionsMenu.add(new FindServersMenuItem(messages, workbench, operationManager, resolver));
if (connectionFactories.size() > 0) {
for (ConnectionFactory factory : connectionFactories) {
ConnectionMenuChangeHandler menuHandler = new ConnectionMenuChangeHandler(
workbench, messages, componentFactory,
operationManager, factory);
connectionsMenu.add(menuHandler.getMenu());
}
}
}
workbench.getMenuBar().addMenu("connectionsmenu", connectionsMenu);
}
代码示例来源:origin: nu.zoom/svansprogram
public void start() {
workbench.getMenuBar().addToHelpMenu(
new AboutMenuItem(messages).getControl());
}
代码示例来源:origin: nu.zoom/eon2
@Override
public void start() {
super.start();
JMenuItem aboutMenuItem = new JMenuItem();
AboutAction aboutAction = new AboutAction(messages, aboutMenuItem);
aboutAction.setNameFromMessages("about.menuitem");
workbench.getMenuBar().addToHelpMenu(aboutMenuItem);
}
代码示例来源:origin: nu.zoom.svansprogram/svansprogram-about
@Override
public void start() {
aboutComponent = new AboutComponent(errorReporter, messages,
AboutPlugIn.this.version);
aboutComponent.init();
workbench.getMenuBar().addToHelpMenu(
new AboutMenuItem(messages).getControl());
workbench.getMenuBar().addToHelpMenu(
new JMenuItem(new OnlineHelpItem()));
try {
URL resource = getClass()
.getResource(
"/META-INF/maven/nu.zoom.svansprogram/svansprogram-about/pom.properties");
if (resource != null) {
Properties p = new Properties();
p.load(resource.openStream());
String versionProperty = p.getProperty("version");
if (versionProperty != null) {
this.version = versionProperty;
}
}
} catch (IOException e) {
}
}
代码示例来源:origin: nu.zoom/portunis
/**
* Start was called. This is the start-stuff that needs to be on the AWT
* event queue.
*/
private void startOnEventQueue() {
JMenu keyStoreMenu = new JMenu(messages.getMessage("keystore.menu"));
keyStoreMenu.add(new LoadKeyStoreAction(workbench, this, messages));
loadedKeyStoreMenu = new JMenu(messages
.getMessage("keystore.load.loaded"));
loadedKeyStoreMenu.setEnabled(false);
loadedKeyStoreMenu.setIcon(Utils.getIconFromMessages(messages,
"keystore.load.loaded.icon"));
keyStoreMenu.add(loadedKeyStoreMenu);
workbench.getMenuBar().addMenu(KEYSTORE_MENU_KEY, keyStoreMenu);
}
代码示例来源:origin: nu.zoom/svansprogram
fileOpener);
WorkbenchMenuBar menuBar = workbench.getMenuBar();
menuBar.addToApplicationMenu(new JMenuItem(openAction));
String recentFilesName = messages.getMessage("nu.zoom.catonine.recent");
代码示例来源:origin: nu.zoom.svansprogram/svansprogram-gui
errorReporter, preferences);
WorkbenchMenuBar menuBar = workbench.getMenuBar();
menuBar.addToApplicationMenu(new JMenuItem(openAction));
StringMenu<File> recentMenu = menuFactory.getMenu(File.class, RECENT_FILES_MENU_KEY);
代码示例来源:origin: nu.zoom/svansprogram
@Override
public void start() {
final ShowStyleRulesAction showStyleRulesAction = new ShowStyleRulesAction(messages,
"nu.zoom.catonine.configurations");
final WorkbenchMenuBar menuBar = workbench.getMenuBar();
menuBar.addToApplicationMenu(showStyleRulesAction.getControl());
try {
menuBar.addToApplicationMenu(new JMenuItem(new SaveStyleRulesManagerAsAction(this, localizedResources)));
menuBar.addToApplicationMenu(new JMenuItem(new OpenStyleRulesManagerAction(this, localizedResources)));
menuBar.addToApplicationMenu(new JMenuItem(new ImportStyleRulesManagerAction(this, localizedResources)));
} catch (LocalizedResources.ResourceNotFoundException resourceNotFoundException) {
workbench.getErrorReporter().reportError(resourceNotFoundException);
}
workbench.addCloseVetoListener(this);
workbench.registerKeyboardAction(
showStyleRulesAction,
KeyStroke.getKeyStroke(KeyEvent.VK_N, InputEvent.CTRL_DOWN_MASK),
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
try {
if (!loadManager()) {
manager = new StyleRulesManager();
manager.add(SampleStyleRulesFactory.getLog4JStyleRules());
manager.add(SampleStyleRulesFactory.getSyslogStyleRules());
}
} catch (InvalidDataTypeException invalidDataTypeException) {
workbench.getErrorReporter().reportError(invalidDataTypeException);
} catch (BackendException backendException) {
workbench.getErrorReporter().reportError(backendException);
}
}
代码示例来源:origin: nu.zoom.svansprogram/svansprogram-gui-rules
showStyleRulesAction = new ShowStyleRulesAction(
messages.getMessage("nu.zoom.catonine.configurations"));
final WorkbenchMenuBar menuBar = workbench.getMenuBar();
menuBar.addToApplicationMenu(showStyleRulesAction.getControl());
menuBar.addToApplicationMenu(new JMenuItem(
内容来源于网络,如有侵权,请联系作者删除!