public boolean isHtmlDisplayName(Object o) { Node n = Visualizer.findNode(o); if (n == null) { throw new IllegalStateException("TreeNode must be VisualizerNode but was: " + o + " of class " + o.getClass().getName()); } return null != n.getHtmlDisplayName(); }
/** Change table model. Sets rows (nodes) of table mmodel */ private void changeTableModel() { Node[] nodes = new Node[list.getModel().getSize()]; for (int i = 0; i < list.getModel().getSize(); i++) { nodes[i] = Visualizer.findNode(list.getModel().getElementAt(i)); } controlledTableView.setNodes(nodes); }
/** Utility method created by Enno Sandner. Is it needed? * I don't know (dstrupl). */ static Node secureFindNode(Object o) { assert o instanceof TreeNode : "Object " + o + " is instanceof TreeNode"; try { return Visualizer.findNode(o); } catch (ClassCastException e) { e.printStackTrace(); return null; } }
private CheckableNode getCheckCookie(Object o) { Node n = Visualizer.findNode(o); if (n == null) { throw new IllegalStateException("TreeNode must be VisualizerNode but was: " + o + " of class " + o.getClass().getName()); } return n.getLookup().lookup(CheckableNode.class); }
public String getTooltipText(Object o) { Node n = Visualizer.findNode(o); if (n == null) { throw new IllegalStateException("TreeNode must be VisualizerNode but was: " + o + " of class " + o.getClass().getName()); } return n.getShortDescription(); }
/** Change table model. Sets rows (nodes) of table mmodel */ private void changeTableModel() { Node[] nodes = new Node[list.getModel().getSize()]; for (int i = 0; i < list.getModel().getSize(); i++) { nodes[i] = Visualizer.findNode(list.getModel().getElementAt(i)); } controlledTableView.setNodes(nodes); }
/** Utility method created by Enno Sandner. Is it needed? * I don't know (dstrupl). */ static Node secureFindNode(Object o) { try { return Visualizer.findNode(o); } catch (ClassCastException e) { e.printStackTrace(); return null; } }
/** Utility method created by Enno Sandner. Is it needed? * I don't know (dstrupl). */ static Node secureFindNode(Object o) { try { return Visualizer.findNode(o); } catch (ClassCastException e) { e.printStackTrace(); return null; } }
public String getDisplayName(Object o) { Node n = Visualizer.findNode(o); if (n == null) { throw new IllegalStateException("TreeNode must be VisualizerNode but was: " + o + " of class " + o.getClass().getName()); } String text = n.getHtmlDisplayName(); if( null == text ) text = n.getDisplayName(); return text; }
@Override public void quickSearchConfirmed() { TreePath selectedTPath = getSelectionPath(); if (selectedTPath != null) { TreeNode selectedTNode = (TreeNode) selectedTPath.getLastPathComponent(); Node selectedNode = Visualizer.findNode(selectedTNode); performPreferredActionOnNodes(new Node[] { selectedNode }); } origSelectionPaths = null; searchResults.clear(); lastSearchText = null; }
@Override public String getColumnName(int column) { return (column == 0) ? Visualizer.findNode(tree.getModel().getRoot()).getDisplayName() : nodeTableModel.getColumnName(column - 1); }
protected final Node getNodeAt( int rowIndex ) { Node result = null; TreePath path = getLayout().getPathForRow(rowIndex); if (path != null) { result = Visualizer.findNode(path.getLastPathComponent()); } return result; } }
private static boolean testNodeInRow(Outline outline, Node node, int i) { int modelIndex = outline.convertRowIndexToModel(i); if (modelIndex != -1) { Object o = outline.getModel().getValueAt(modelIndex, 0); Node n = Visualizer.findNode(o); if (n == node) { return true; } } return false; }
/** * */ Node getNodeFromRow(int rowIndex) { int row = outline.convertRowIndexToModel(rowIndex); TreePath tp = outline.getLayoutCache().getPathForRow(row); if (tp == null) { return null; } return Visualizer.findNode(tp.getLastPathComponent()); }
public Node nodeForRow(int row) { int r = outline.convertRowIndexToModel(row); TreePath tp = outline.getLayoutCache().getPathForRow(r); return Visualizer.findNode(tp.getLastPathComponent()); } public String getShortDescription(int column) {
@Override public Node nodeForRow(int row) { int r = outline.convertRowIndexToModel(row); TreePath tp = outline.getLayoutCache().getPathForRow(r); return Visualizer.findNode(tp.getLastPathComponent()); }
public int getChildCount(java.lang.Object parent) { int superCnt = super.getChildCount(parent); int myCnt = 0; for (int i = 0; i < superCnt; i++) { Node n = Visualizer.findNode(super.getChild(parent, i)); if (!n.isLeaf()) { myCnt++; } } return myCnt; }
/** Implements <code>CellEditorListener</code> interface method. */ public void editingStopped(ChangeEvent e) { TreePath lastP = tree.getPathForRow(lastRow); if (lastP != null) { Node n = Visualizer.findNode(lastP.getLastPathComponent()); if ((n != null) && n.canRename()) { String newStr = (String) getCellEditorValue(); ViewUtil.nodeRename(n, newStr); } } }
public int getChildCount(java.lang.Object parent) { int superCnt = super.getChildCount (parent); int myCnt = 0; for (int i = 0; i < superCnt; i++) { Node n = Visualizer.findNode (super.getChild (parent, i)); if (!n.isLeaf ()) { myCnt++; } } return myCnt; }
public int getChildCount(java.lang.Object parent) { int superCnt = super.getChildCount (parent); int myCnt = 0; for (int i = 0; i < superCnt; i++) { Node n = Visualizer.findNode (super.getChild (parent, i)); if (!n.isLeaf ()) { myCnt++; } } return myCnt; }