Main entry point when used as application. @param args args[0] may be a data or xml file name
(String[] args)
| 283 | * @param args args[0] may be a data or xml file name |
| 284 | */ |
| 285 | public static void main(String[] args) { |
| 286 | getTool(true); |
| 287 | if (OSPRuntime.isJS) |
| 288 | tool.standAlone = true; |
| 289 | if (tool.standAlone) |
| 290 | tool.setLocation(0, 0); |
| 291 | OSPRuntime.setAppClass(tool); |
| 292 | tool.exitOnClose = true; |
| 293 | tool.saveChangesOnClose = true; |
| 294 | if ((args != null) && (args.length > 0) && (args[0] != null)) { |
| 295 | tool.setVisible(true); |
| 296 | tool.open(new File(args[0])); |
| 297 | } else { |
| 298 | tool.addWindowListener(new WindowAdapter() { |
| 299 | @Override |
| 300 | public void windowOpened(WindowEvent e) { |
| 301 | if (tool.getTabCount() == 0) { |
| 302 | DataToolTab tab = tool.createTab(null); |
| 303 | tab.setUserEditable(true); |
| 304 | tool.addTab(tab); |
| 305 | } |
| 306 | } |
| 307 | }); |
| 308 | tool.setVisible(true); |
| 309 | } |
| 310 | |
| 311 | } |
| 312 | |
| 313 | /** |
| 314 | * Constructs a blank DataTool. |
nothing calls this directly
no test coverage detected