@Override public void startup(Display display, Map<String, String> properties) throws Exception { /* TODO: Not sure that skin mapping should go here... */ Theme theme = Theme.getTheme(); theme.set(TopiaryView.class, TopiaryViewSkin.class); BXMLSerializer bxmlSerializer = new BXMLSerializer(); window = (SyntopWindow) bxmlSerializer.readObject(MainApp.class, "syntop.bxml"); window.open(display); // See if a tree string has been specified String treeSpecification = properties.get("treespec"); if (treeSpecification != null) { window.setTreeSpecificationText(treeSpecification); } window.applyTreeSpecificationText(); // See if an output file has been specified String outputSVGfile = properties.get("svgfile"); if (outputSVGfile != null) { window.makeSVGfile(outputSVGfile); } // See if quitting has been specified if (properties.containsKey("terminate")) { shutdown(false); } }
@Override public boolean shutdown(boolean optional) { if (window != null) { window.close(); } return false; }