Inheritance diagram for SampleApp::
Public Methods | |
void | init () |
init is called when this is used as an applet. More... | |
Static Public Methods | |
void | main (String args[]) |
main is called when this is used as an application. More... | |
Protected Methods | |
void | doMain (String args[]) |
void | quitSample () |
String | getSampleName () |
abstract boolean | buildSample (JFrame parent, JApplet applet, String[] args) |
JFrame | getParentFrame () |
JApplet | getApplet () |
boolean | isStandalone () |
SampleApp takes care of the common "problem" of running as applet or application. It makes sure there is a _parent (a JFrame) for the application to use as a "main window".
|
init is called when this is used as an applet.
00033 { 00034 getContentPane().add(createContents()); 00035 00036 OutputStreamArea out = new AppletOutputStreamArea(_msgArea); 00037 ErrorStreamArea err = new AppletErrorStreamArea(_msgArea); 00038 00039 _butStart.addActionListener(new AppletStarter()); 00040 _msgArea.setLineWrap(true); 00041 _msgArea.setEditable(false); 00042 00043 _applet = this; 00044 } |
|
main is called when this is used as an application. This function has to be overloaded in the "leaf node" application itself. Reimplemented in DatabaseApp, DisplayApp, IDBSurfApp, ImageSurfApp, MdiApp, MediaApp, MiaSurfApp, OracleApp, OracleSurfApp, QuerySegmentations, TestApp, TrackingApp, TVApp, VideoApp, VideoBrowser, VideoBrowserDemos, VxBasePlayerApp, VxMediaPlayerApp, VxPlayerApp, and ConfigureApp.
00050 { 00051 System.out.println("You have to implement the main method in your demo class."); 00052 System.out.println("In that main method you have to create an instance of your demo class"); 00053 System.out.println("and call its method doMain."); 00054 } |
|
00063 { 00064 doRun(args); 00065 } |
|
Reimplemented in DisplayApp, and VideoBrowserDemos.
00068 { 00069 if(isStandalone()) 00070 System.exit(0); 00071 else 00072 _parent.dispose(); 00073 } |
|
Reimplemented in VideoBrowserDemos, and VxBasePlayerApp.
00081 { 00082 return getClass().getName(); 00083 } |
|
Reimplemented in DatabaseApp, DisplayApp, IDBSurfApp, ImageSurfApp, MdiApp, MediaApp, MiaSurfApp, OracleApp, OracleSurfApp, QuerySegmentations, TestApp, TrackingApp, TVApp, VideoApp, VideoBrowser, VideoBrowserDemos, VxBasePlayerApp, VxMediaPlayerApp, and ConfigureApp. |
|
00090 { 00091 return _parent; 00092 } |
|
00095 { 00096 return _applet; 00097 } |
|
00100 { 00101 return (_applet == null); 00102 } |