Examples of TreePath


Examples of javax.swing.tree.TreePath

   
    public void collapseAll() {
        if (top == null) return;
        try {
            setSelected(top);
            tree.collapsePath(new TreePath(top.getPath()));
        } catch (Exception e) {
            logger.error(e, e);
        }

    }  
View Full Code Here

Examples of javax.swing.tree.TreePath

        DefaultMutableTreeNode child;
        for (int i = 0; i < size; i++) {
            try {
                child = (DefaultMutableTreeNode) parent.getChildAt(i);
                collapseChildren(child);
                tree.collapsePath(new TreePath(child.getPath()));
            } catch (Exception e) {
                logger.error("An error occurred while collapsing leafs of " + parent, e);
            }
           
            tree.addTreeSelectionListener(this);
View Full Code Here

Examples of javax.swing.tree.TreePath

        DefaultMutableTreeNode child;
        for (int i = 0; i < size; i++) {
            try {
                child = (DefaultMutableTreeNode) parent.getChildAt(i);
                expandChildren(child);
                tree.expandPath(new TreePath(child.getPath()));
            } catch (Exception e) {
                logger.error("An error occurred while expanding leafs of " + parent, e);
            }
        }
       
View Full Code Here

Examples of javax.swing.tree.TreePath

   
    private void expandAll(DefaultMutableTreeNode node) {
        if (top == null) return;
       
        try {
            tree.expandPath(new TreePath(top.getPath()));
        } catch (Exception e) {
            logger.error(e, e);
        }
    }
View Full Code Here

Examples of org.apache.hadoop.tools.rumen.TreePath

    final LoggedNetworkTopology topoWithIps = new ClusterTopologyReader(new Path(
        rootInputDir, "topo-with-numeric-ips.json"), conf).get();
    final LoggedNetworkTopology topoWithoutIps = new ClusterTopologyReader(new Path(
        rootInputDir, "topo-without-numeric-ips.json"), conf).get();
    try {
      topoWithIps.deepCompare(topoWithoutIps, new TreePath(null, "<root>"));
      Assert.fail("Expecting two topologies to differ");
    } catch (DeepInequalityException e) {
    }
    SimulatorEngine.removeIpHosts(topoWithIps);
    try {
      topoWithIps.deepCompare(topoWithoutIps, new TreePath(null, "<root>"));
    } catch (DeepInequalityException e) {
      Assert.fail("Expecting two topologies to be equal");
    }
  }
View Full Code Here

Examples of org.apache.myfaces.custom.tree.model.TreePath

        if (getCreated() && Boolean.parseBoolean(expandRoot)) {
            // component was created, so expand the root node
            TreeModel model = tree.getModel(context);

            if (model != null) {
                tree.expandPath(new TreePath(new Object[] { model.getRoot() }),
                        context);
            }
        }

        tree.addToModelListeners();
View Full Code Here

Examples of org.apache.myfaces.tobago.model.TreePath

      tree.setRowIndex(rowIndex);
      if (!tree.isRowAvailable()) {
        break;
      }

      final TreePath path = tree.getPath();

      if (selectedState.isSelected(path)) {
        selectedValue.append(rowIndex);
        selectedValue.append(",");
      }
View Full Code Here

Examples of org.eclipse.jface.viewers.TreePath

        refreshSelectedPath();
    }

    private void refreshSelectedPath() {
        if (selectedPath != null) {
            TreePath treePath = contentProvider.findPath(selectedPath);
            if (treePath != null) {
                viewer.setSelection(new TreeSelection(treePath), true);
            }
            else {
                viewer.setSelection(TreeSelection.EMPTY);
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.utils.TreePath

          log.trace(MessageFormat.format("did not match {0} with text \"{1}\", using matcher: {2}", ClassUtils.simpleClassName(item), text, StringDescription.toString(this))); //$NON-NLS-1$
      }

      if (log.isTraceEnabled() && (item instanceof Widget)) {
        PathGenerator pathGenerator = new PathGenerator();
        TreePath path = pathGenerator.getPath((Widget) item);
        int segmentCount = path.getSegmentCount();

        String prefix = ""; //$NON-NLS-1$
        for (int i = 0; i < segmentCount - 1; i++)
          prefix += "    "; //$NON-NLS-1$
        prefix += "+---"; //$NON-NLS-1$
View Full Code Here

Examples of org.openfaces.component.table.TreePath

    public List<String> getDynamicColumns1() {
        return dynamicColumns1;
    }

    public boolean isHighlightedByNodePath() {
        TreePath path = (TreePath) Faces.var("nodePath");
        TreePath pathToCompare = new TreePath(treeTableItem, new TreePath(treeTableItemChild, new TreePath(treeTableItemRoot, null)));
        return path.equals(pathToCompare);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.