Handler for toolbar and menu action events.
326 String cmd = event.getActionCommand();
329 if (cmd.equals(
"Start"))
332 else if (cmd.equals(
"Stop"))
335 else if (cmd.equals(
"Restart")) {
336 log.appendln(
"Restarting server (reload configuration)...",
"status");
341 else if (cmd.equals(
"Clear log"))
344 else if (cmd.equals(
"Quit")) {
345 boolean reply = Alert.prompt(
this,
"Are you sure you want to quit?");
352 else if (cmd.equals(
"Toolbar")) {
354 add(
tools, BorderLayout.NORTH);
361 else if (cmd.equals(
"Statusbar")) {
363 add(
status, BorderLayout.SOUTH);
370 else if (cmd.equals(
"Find"))
371 Alert.error(
this,
"Not implemented yet",
false);
373 else if (cmd.equals(
"Preferences"))
374 Alert.error(
this,
"Not implemented yet",
false);
376 else if (cmd.equals(
"Always on top")) {
377 boolean state = menu.getToggleState(2);
378 setAlwaysOnTop(state);
379 desktop.setAlwaysOnTop(-1, state);
382 else if (cmd.equals(
"Full screen")) {
383 GraphicsEnvironment env;
384 env = GraphicsEnvironment.getLocalGraphicsEnvironment();
386 GraphicsDevice dev = env.getDefaultScreenDevice();
387 if (!dev.isFullScreenSupported())
390 JFrame cur = (JFrame) dev.getFullScreenWindow();
392 dev.setFullScreenWindow(
this);
394 dev.setFullScreenWindow(null);
399 else if (cmd.equals(
"Select previous"))
402 else if (cmd.equals(
"Select next"))
405 else if (cmd.equals(
"Close")) {
408 desktop.disposeCurrent();
411 else if (cmd.equals(
"Cascade"))
414 else if (cmd.equals(
"Minimize all"))
417 else if (cmd.equals(
"Restore all"))
420 else if (cmd.equals(
"Close all")) {
421 boolean reply = Alert.prompt(
this,
"Close all client windows?");
425 desktop.disposeAll();
428 else if (cmd.startsWith(
"Select session")) {
429 String parts[] = cmd.split(
"\\s");
430 desktop.setCurrent(Integer.valueOf(parts[2]));
435 cmd.equals(
"Online documentation") ||
436 cmd.equals(
"Bug tracker") ||
437 cmd.equals(
"Submit feedback")
439 Registry conf = Registry.getCurrent();
440 String key =
"url-" + cmd.toLowerCase().replace(
' ',
'-');
441 conf.browse((URL) conf.get(
"generic", key));
444 else if (cmd.equals(
"Check for updates"))
445 Alert.error(
this,
"Not implemented yet",
false);
447 else if (cmd.startsWith(
"About")) {
449 about =
new AboutDialog(
this);
451 about.setLocationRelativeTo(
this);
452 about.setVisible(
true);
461 catch (Throwable t) {
ToolBar tools
Application toolbar.
AboutDialog about
About dialog.
LogPane log
Application logging pane.
void stopService()
Stop the server.
StatusBar status
Application statusbar.
void setIconified(final boolean how)
Minimize or restore all client windows.
MenuBar menu
Application menu.
void shiftSelection(int step)
Select the previous/next not iconified client window.
void clear()
Remove all contents.
void startService()
Start the server.
SessionManager desktop
Main and window manager.