FileDocCategorySizeDatePackage
IsoViewer.javaAPI Docmp4parser 1.0-RC-172720Wed Dec 19 20:10:21 GMT 2012com.googlecode.mp4parser.isoviewer

IsoViewer

public class IsoViewer extends org.jdesktop.application.SingleFrameApplication

(Omit source code)

Fields Summary
com.coremedia.iso.gui.IsoViewerPanel
isoViewerPanel
String
sessionFile
org.jdesktop.application.ApplicationContext
ctx
Logger
logger
File
openInitially
Constructors Summary
public IsoViewer()


      

    
Methods Summary
protected javax.swing.JMenuBarcreateMenu(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 voidinitialize(java.lang.String[] args)


        if (args.length > 0) {
            openInitially = new File(args[0]);
        }


    
public static voidmain(java.lang.String[] args)

        Application.launch(IsoViewer.class, args);
    
protected voidshutdown()

        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 voidstartup()

        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);