Inheritance diagram for DatabaseApp::

Public Methods | |
| void | handleExit () |
| void | handleTransferFile () |
Static Public Methods | |
| void | main (String[] args) |
| main is called when this is used as an application. More... | |
Protected Methods | |
| boolean | buildSample (JFrame parent, JApplet applet, String[] args) |
| Initialization. More... | |
|
|
main is called when this is used as an application. This function has to be overloaded in the "leaf node" application itself. Reimplemented from SampleApp.
00025 {
00026 DatabaseApp app = new DatabaseApp();
00027 app.doMain(args);
00028
00029 // doMain will call buildSample
00030 }
|
|
|
00033 {
00034 for(int i=0; i<_sessions.size(); i++)
00035 ((SessionInfo)_sessions.elementAt(i)).closeSession();
00036
00037 quitSample();
00038 }
|
|
|
00041 {
00042 if(_sessions.size() == 0) {
00043 ErrorStreamArea.println("There are no opened sessions.");
00044 return;
00045 }
00046
00047 HxCorba.Constructor cons =
00048 ServiceRepository.instance().getConstructor();
00049 if(cons == null) return;
00050
00051 java.io.File file = askFilename(null, CorbaMediator.instance().hasLocalServer());
00052 if(file == null) return;
00053
00054 HxCorba.VxSegmentation seg = cons.makeVxSegmentation(file.getPath());
00055 if(seg == null) {
00056 ErrorStreamArea.println(cons.getLastError());
00057 return;
00058 }
00059
00060 String videoName = file.getName();
00061 String segName = "";
00062 int i = videoName.indexOf('.');
00063 if(i != -1) {
00064 segName = videoName.substring(i+1);
00065 videoName = videoName.substring(0, i);
00066 }
00067
00068 transfer("Segmentation file", videoName, segName, seg);
00069 }
|
|
||||||||||||||||
|
Initialization.
Reimplemented from SampleApp.
00080 {
00081 ErrorStreamArea err = new ErrorStreamArea(parent, 10, 80);
00082
00083 OutputStreamArea.println("Initializing CorbaMediator...");
00084 initCorbaMediator(args);
00085 setAdvancedLookupManager(parent);
00086
00087 OutputStreamArea.println("Building "+getSampleName()+" GUI...");
00088
00089 // Create desktop
00090 _desktop = new JDesktopPane();
00091 //_desktop.putClientProperty("JDesktopPane.dragMode", "outline");
00092
00093 // DatabasesPanel
00094 DatabasesPanel dbPanel = new DatabasesPanel();
00095 DatabasesPanelListener listener = new DatabasesPanelListener(dbPanel);
00096
00097 JInternalFrame dbFrame = new JInternalFrame("Databases",
00098 true, false, true, true);
00099 dbFrame.getContentPane().add(dbPanel);
00100 dbFrame.pack();
00101
00102 _desktop.add(dbFrame);
00103 dbFrame.setVisible(true);
00104
00105 ExtMenuBar bmenu = new ExtMenuBar(this);
00106 bmenu.addMenu("File");
00107 bmenu.addMenuItem("File", "Exit", "handleExit");
00108 bmenu.addMenu("Transfer");
00109 bmenu.addMenuItem("Transfer", "Transfer Segmentation File...", "handleTransferFile");
00110
00111 parent.getContentPane().add(_desktop);
00112 parent.setJMenuBar(bmenu);
00113
00114 parent.setSize(1000, 730);
00115
00116 //dbFrame.pack();
00117
00118 OutputStreamArea.println("Done.");
00119
00120 return true;
00121 }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001