Methods Summary |
---|
protected javax.swing.JMenuBar | createMenu(org.jdesktop.application.ApplicationActionMap map)
JMenuBar menuBar = new JMenuBar();
JMenu menu = new JMenu("File");
menuBar.add(menu);
JMenuItem open = new JMenuItem();
open.setAction(map.get("open-iso-file"));
menu.add(open);
return menuBar;
|
protected void | initialize(java.lang.String[] args)
if (args.length > 0) {
openInitially = new File(args[0]);
}
|
public static void | main(java.lang.String[] args)
Application.launch(IsoViewer.class, args);
|
protected void | shutdown()
super.shutdown();
try {
//ctx.getSessionStorage().save(this.getMainFrame(), sessionFile);
ctx.getSessionStorage().save(this.isoViewerPanel, sessionFile);
} catch (IOException e) {
logger.log(Level.WARNING, "couldn't save session", e);
}
|
protected void | startup()
ResourceMap resource = ctx.getResourceMap();
isoViewerPanel = new IsoViewerPanel(getMainFrame());
resource.injectFields(isoViewerPanel);
isoViewerPanel.createLayout();
try {
//ctx.getSessionStorage().restore(this.getMainFrame(), sessionFile);
if (openInitially != null) {
isoViewerPanel.open(openInitially);
} else {
ctx.getSessionStorage().restore(isoViewerPanel, sessionFile);
}
} catch (IOException e) {
logger.log(Level.WARNING, "couldn't restore session or open initial file given in command line", e);
}
// isoViewerPanel.open();
ApplicationActionMap map = ctx.getActionMap(isoViewerPanel);
this.getMainFrame().setJMenuBar(createMenu(map));
show(isoViewerPanel);
|