/** * Provide the standard Groovy <code>size()</code> method for <code>TreePath</code>. * * @param self a TreePath * @return the path count of the treePath * @since 1.6.4 */ public static int size(TreePath self) { return self.getPathCount(); }
private String getRowPathStr(TreePath trp) { String pathStr = ""; if (trp.getPathCount() > 1) { for (int i = 1; i < trp.getPathCount(); i++) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) trp.getPathComponent(i); TreeNodeUserObject userObject = (TreeNodeUserObject) node.getUserObject(); pathStr = pathStr + userObject.getOriginalName() + "/"; } } return pathStr; }
@Override public void removeSelectionPaths(TreePath[] paths) { for (int i = 0; i < paths.length; i++) { TreePath path = paths[i]; if (path.getPathCount() == 1) { super.removeSelectionPaths(new TreePath[]{path}); } else { toggleRemoveSelection(path); } } }
try { bar.setVisible(true); if (trp.getPathCount() > 1) { for (int i = 1; i < trp.getPathCount(); i++) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) trp.getPathComponent(i); TreeNodeUserObject userObject = (TreeNodeUserObject) node.getUserObject(); if (i == trp.getPathCount() - 1) { name = userObject.getOriginalName(); } else {
public int getPathCount() { return treePath.getPathCount(); }
public boolean isEmpty() { return treePath == null || treePath.getPathCount() == 0; }
for (parentIndex = tpath.getPathCount() - 1; parentIndex >= 0; parentIndex--)
int parentIndex = -1; if (tpath != null) { for (parentIndex = tpath.getPathCount() - 1; parentIndex >= 0; parentIndex--)
int parentIndex = -1; if (tpath != null) { for (parentIndex = tpath.getPathCount() - 1; parentIndex >= 0; parentIndex--)
int parentIndex = -1; if (tpath != null) { for (parentIndex = tpath.getPathCount() - 1; parentIndex >= 0; parentIndex--)
int parentIndex = -1; if (tpath != null) { for (parentIndex = tpath.getPathCount() - 1; parentIndex >= 0; parentIndex--)
int parentIndex = -1; if (tpath != null) { for (parentIndex = tpath.getPathCount() - 1; parentIndex >= 0; parentIndex--)
int parentIndex = -1; if (tpath != null) { for (parentIndex = tpath.getPathCount() - 1; parentIndex >= 0; parentIndex--)
int parentIndex = -1; if (tpath != null) { for (parentIndex = tpath.getPathCount() - 1; parentIndex >= 0; parentIndex--)
int parentIndex = -1; if (tpath != null) { for (parentIndex = tpath.getPathCount() - 1; parentIndex >= 0; parentIndex--)
int parentIndex = -1; if (tpath != null) { for (parentIndex = tpath.getPathCount() - 1; parentIndex >= 0; parentIndex--)
int parentIndex = -1; if (tpath != null) { for (parentIndex = tpath.getPathCount() - 1; parentIndex >= 0; parentIndex--)
int parentIndex = -1; if (tpath != null) { for (parentIndex = tpath.getPathCount() - 1; parentIndex >= 0; parentIndex--)
int parentIndex = -1; if (tpath != null) { for (parentIndex = tpath.getPathCount() - 1; parentIndex >= 0; parentIndex--)
int parentIndex = -1; if (tpath != null) { for (parentIndex = tpath.getPathCount() - 1; parentIndex >= 0; parentIndex--)