private void initTree() { treeRoot = new JRoot(wrapper); treeRoot.setFlatPackages(isFlattenPackage); treeModel.setRoot(treeRoot); reloadTree(); }
@Override public void executionStarted(DataSourceApi dataSource, ExecuteQueryPayload payload) { GraphPanel.this.dataSource = dataSource; entityDetailsTreeModel.setRoot(null); }
public void clearFlows() { summary = null; model.setRoot(null); }
@Override public void setRoot(N node) { model.setRoot(node); }
public JTreeComponentController(DefaultTreeModel model) { this.model = model; model.setRoot(root); }
public DefaultTreeModel createModel() { summary = new SummaryNode(); model = new DefaultTreeModel(summary); model.setRoot(summary); return model; }
public void setCertificateRootNode(DefaultMutableTreeNode rootNode) { this.certificateTreeModel.setRoot(rootNode); certificateTree.setModel(certificateTreeModel); }
/** * Creates the model with a basic root */ public DefaultTreeModel createModel() { summary = new SummaryNode(); model = new DefaultTreeModel(summary); model.setRoot(summary); return model; }
/** * This method initializes treeModel * * @return javax.swing.tree.DefaultTreeModel */ private DefaultTreeModel getTreeModel() { if (treeModel == null) { treeModel = new DefaultTreeModel(getRootNode()); treeModel.setRoot(getRootNode()); } return treeModel; }
/** * Causes the tree to be reloaded. Note that this will collapse * all expanded paths. */ public void reload() { // Reload the tree nodeMap.clear(); // TODO: getRoots needs to be changed - the user might have specified specific roots Set<N> roots = provider.getRoots(); OWLObjectTreeRootNode<N> rootNode = new OWLObjectTreeRootNode<N>(this, roots); ((DefaultTreeModel) getModel()).setRoot(rootNode); }
/** * Causes the tree to be reloaded. Note that this will collapse * all expanded paths. */ public void reload() { // Reload the tree nodeMap.clear(); // TODO: getRoots needs to be changed - the user might have specified specific roots Set<N> roots = provider.getRoots(); OWLObjectTreeRootNode<N> rootNode = new OWLObjectTreeRootNode<N>(this, roots); ((DefaultTreeModel) getModel()).setRoot(rootNode); }
public void showRelationshipData(GraphRelationship relationship, VisualItem item, MouseEvent e) { PatchedDefaultMutableTreeNode root = UiHelper.relationshipToTreeNode( relationship.getRepresentation(), relationship, dataSource); entityDetailsTreeModel.setRoot(root); Enumeration childs = root.children(); while (childs.hasMoreElements()) { PatchedDefaultMutableTreeNode treeNode = (PatchedDefaultMutableTreeNode) childs.nextElement(); entityDetailsTree.expandPath(new TreePath(treeNode.getPath())); } }
public void showNodeData(GraphNode node, VisualItem item, MouseEvent e) { PatchedDefaultMutableTreeNode root = UiHelper.nodeToTreeNode(node.getRepresentation(), node, dataSource); entityDetailsTreeModel.setRoot(root); Enumeration childs = root.children(); while (childs.hasMoreElements()) { PatchedDefaultMutableTreeNode treeNode = (PatchedDefaultMutableTreeNode) childs.nextElement(); entityDetailsTree.expandPath(new TreePath(treeNode.getPath())); } }
public CatalogTree(final LeafSelectionListener leafSelectionListener, AppContext appContext, UIContext uiContext) { this.appContext = appContext; this.uiContext = uiContext; jTree = new JTree(); jTree.setRootVisible(false); ((DefaultTreeModel) jTree.getModel()).setRoot(CatalogTreeUtils.createRootNode()); CatalogTreeUtils.addCellRenderer(jTree); addWillExpandListener(); CatalogTreeUtils.addTreeSelectionListener(jTree, leafSelectionListener); }
/** * Causes the tree to be reloaded. Note that this will collapse * all expanded paths except for the current selection. */ public void reload() { N currentSelection = getSelectedOWLObject(); // Reload the tree nodeMap.clear(); // TODO: getRoots needs to be changed - the user might have specified specific roots Set<N> roots = provider.getRoots(); OWLObjectTreeRootNode<N> rootNode = new OWLObjectTreeRootNode<>(this, roots); ((DefaultTreeModel) getModel()).setRoot(rootNode); setSelectedOWLObject(currentSelection); }
private void update(XmlTreeNode root) { if (root!=null) { root = (XmlTreeNode)root.cloneWithChildren(); } model.setRoot(root); if (root!=null) { root.setSorted(isSorted()); } refresh(); }