List of usage examples for javax.swing.tree TreeModel getRoot
public Object getRoot();
From source file:org.openengsb.ui.admin.testClient.TestClient.java
public TestClient(ServiceId jumpToService) { this();//w w w.jav a 2 s .c o m serviceList.getTreeState().collapseAll(); TreeModel treeModel = serviceList.getModelObject(); DefaultMutableTreeNode serviceNode = findService((DefaultMutableTreeNode) treeModel.getRoot(), jumpToService); expandAllUntilChild(serviceNode); serviceList.getTreeState().selectNode(serviceNode, true); call.setService(jumpToService); populateMethodList(); }
From source file:org.pentaho.reporting.designer.core.ReportDesignerFrame.java
private void createSamplesMenu() { final XulMenupopup samplesPopup = context.getView().getXulComponent("help-samples-popup", XulMenupopup.class);// NON-NLS if (samplesPopup == null) { return;/*from w ww.ja v a 2 s. com*/ } for (final XulComponent childNode : new ArrayList<XulComponent>(samplesPopup.getChildNodes())) { samplesPopup.removeChild(childNode); } final TreeModel treeModel = SamplesTreeBuilder.getSampleTreeModel(); final Object root = treeModel.getRoot(); try { insertReports(treeModel, root, samplesPopup); } catch (XulException e) { logger.warn("Failed to initialize sample menu", e); } }