/** * Resets the desktop to its baseline state and clears registered help modules and property * groups. */ public void reset() { FrameworkUtil.setAppName(null); try { desktop.activate(false); desktop.clear(); helpModules.clear(); helpSets.clear(); desktop.afterInitialize(false); HelpUtil.removeViewer(); propertyGroups.clear(); registerPropertyGroup("CAREWEB.CONTROLS"); registeredStyles.destroyChildren(); plugins.clear(); } catch (Exception e) {} }
/** * Loads a layout from the specified resource. * * @param resource The layout resource to load. * @throws Exception Unspecified exception. */ public void loadLayout(String resource) throws Exception { layout = LayoutParser.parseResource(resource); FrameworkUtil.setAppName(layout.getName()); if (layout.isEmpty()) { DialogUtil.showError(LBL_NO_LAYOUT); } else { buildUI(layout); } }