Examples of TreeNode


Examples of echopointng.tree.TreeNode

     * Makes sure that the specified node is redrawed
     * @param node The node which children have changed
     */
    public void nodeChanged(DefaultMutableTreeNode node) {
        if (node != null) {
            TreeNode parentNode = node.getParent();
            //TreeNode parentNode = (TreeNode)this.getTreeTableModel().getRoot();
            if (parentNode != null) {
                if (node instanceof TrPositionTreeNode) {
                    node.setUserObject(((TrPositionTreeNode) node).getPosition().getPosNumber());
                }
                if (logger.isDebugEnabled()) {
                    logger.debug("Redrawing node " + node.getUserObject() + " " + parentNode.getIndex(node));
                }
                //((TblMTrPositions)this.getTreeTableModel()).nodeStructureChanged(parentNode);
                int[] indices = new int[1];
                indices[0] = parentNode.getIndex(node);
                ((TblMTrPositions) this.getTreeTableModel()).nodesChanged(parentNode, indices);
                this.checkRootVisible();
            }
        }
    }
View Full Code Here

Examples of edu.zzuli.common.TreeNode

    paramMap.put("JGBH", jgbh);
    List<Map<String, Object>> listMap = this.baseDaoEntity.queryForList(sql,paramMap);
    List<TreeNode> listTreeNode = new ArrayList<TreeNode>();
    for(Map map:listMap) {
      String id = (String)map.get("JGBH");
      TreeNode node = new TreeNode(id,(String)map.get("JGMC"),(String)map.get("SJJG"));
      listTreeNode.add(node);
    }
    return listTreeNode;
  }
View Full Code Here

Examples of ee.ut.goblin.views.TreeNode

  /* (non-Javadoc)
   * @see org.eclipse.core.internal.jobs.InternalJob#run(org.eclipse.core.runtime.IProgressMonitor)
   */
  protected IStatus run(IProgressMonitor monitor) {
    TreeNode root = new TreeNode("");

    File it = new File(proj.getLocation().addTrailingSeparator() + "goblin.xml");
    if (! it.canRead())
      return new Status(IStatus.ERROR, "ee.ut.goblin", 97, "Can't read analysis file.", null);
   
    DefaultHandler handler = new XMLHandler(root);
    SAXParserFactory factory = SAXParserFactory.newInstance();
   
    try {
      // Parse the input
      SAXParser saxParser = factory.newSAXParser();
      saxParser.parse(it, handler);
    } catch (Throwable t) {
      return new Status(IStatus.ERROR, "ee.ut.goblin", 96, t.getMessage(), t);
    }
   
    TreeAnalysisMap tam  = new TreeAnalysisMap((TreeAnalysis) root.getChildren()[0]);
 
    try {
      proj.setSessionProperty(GoblinPlugin.RESULT_NAME, tam);
    } catch (CoreException e) {
      return new Status(IStatus.ERROR, "ee.ut.goblin", 95, e.getMessage(), e);
View Full Code Here

Examples of eu.planets_project.pp.plato.model.tree.TreeNode

    }

    @Test
    public void testImportXML()  {
        ObjectiveTree t = new TreeLoader().load("data/trees/pdfa.xml");
        TreeNode n = t.getRoot();
        assert "PDF/A".equals(n.getName());
        assert n instanceof Node;
        Node node = (Node) n;
        assert node.getChildren().size() == 4;
        assert node.getChildren().get(1).getWeight()==0.15;
    }
View Full Code Here

Examples of eu.scape_project.planning.model.tree.TreeNode

     * Resets the transformer of all leaves to the default transformer.
     *
     * @see eu.scape_project.planning.IdentifyRequirements.workflow.IdentifyRequirementsAction#resetTransformers()
     */
    private void resetTransformers() {
        TreeNode root = plan.getTree().getRoot();
        for (Leaf leaf : root.getAllLeaves()) {
            /*
             * maybe the scaletype is not set yet -> leaf.setDefaultTransformer
             * has to handle null-values itself
             */
            if ((leaf.getScale() == null) || (leaf.getScale().isDirty())) {
View Full Code Here

Examples of haikuvm.bench.from.darjeeling.testvm.classes.TreeNode

    synchronized(lock)
    {
            Darjeeling.assertTrue(testBase+0, true);
            byte numbers[] = new byte[] { 21,6,36,76,7,97,94,30,90,86,13,80,84,79,28,55,36,95,23 };
     
      TreeNode rootNode = new TreeNode(numbers[0]);
     
      for (int i=1; i<numbers.length; i++)
      {
        rootNode.insert(new TreeNode(numbers[i]));
      }
     
      // should leave tree intact since we have a ref to the rootnode
      // in the current frame
      recurseTree(rootNode, (short)0, numbers);
View Full Code Here

Examples of javax.swing.tree.TreeNode

    ArrayList<Component> subcircs = new ArrayList<Component>();
    for (Component comp : circuitState.getCircuit().getNonWires()) {
      if (comp.getFactory() instanceof SubcircuitFactory) {
        subcircs.add(comp);
      } else {
        TreeNode toAdd = model.mapComponentToNode(comp);
        if (toAdd != null) {
          newChildren.add(toAdd);
        }
      }
    }
View Full Code Here

Examples of javax.swing.tree.TreeNode

    /**
     * returns true if this node is locked, or one of its parents
     */
    public boolean isLocked() {
      if (locked) return true;
      TreeNode tn = getParent();
      if (tn==null) return false;
      if (tn instanceof SourceNode) return ((SourceNode)tn).isLocked();
      return false;
    }
View Full Code Here

Examples of javax.swing.tree.TreeNode

                        if (((oldAlias == null) && (alias != null)) || ((oldAlias != null) && (alias == null))
                                || ((oldAlias != null) && (!oldAlias.equals(alias)))) {
                            di.alias = alias;
                            ((DataSource) o).notifyListenersForInfoChange(di);
                            tfAlias.getDocument().removeDocumentListener(this);
                            TreeNode tn = (TreeNode) ( filteredSourceTree.getSourceTree().getSelectionPath().getLastPathComponent());
                            ((DefaultTreeModel) ( filteredSourceTree.getSourceTree().getModel())).nodeChanged(tn);
                            tfAlias.getDocument().addDocumentListener(this);
                            tfAlias.requestFocus();
                        }
                    }
View Full Code Here

Examples of javax.swing.tree.TreeNode

      TreePath[] paths = getSelectionPaths();

      if (paths.length > 0){
          res = true;
          for(int i=0;i<paths.length && res; i++){
              TreeNode node = (TreeNode)paths[i].getLastPathComponent();
              res &=  rootNode.isNodeChild(node);
          }
      }
      return res;
  }
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.