Package com.projity.pm.graphic.model.cache

Examples of com.projity.pm.graphic.model.cache.GraphicNode$CacheIntervalConsumer


    filterBadBranches(list, false);
  }
  private boolean filterBadBranches(List list,boolean cut){
    boolean keep=false;
    for (Iterator i=list.iterator();i.hasNext();){
      GraphicNode gnode=(GraphicNode)i.next();
      boolean cutBranch=cut|gnode.isFiltered();
      if (!gnode.isSummary()||(!gnode.isFiltered()&&gnode.getChildren().size()==0)||filterBadBranches(gnode.getChildren(),cutBranch)||!gnode.isFiltered()) keep=true;
      else i.remove();
    }
    return keep;
  }
View Full Code Here


    }
    return gnodes;
  }
  public List searchNode(Object impl){
    LinkedList gnodes=new LinkedList();
    GraphicNode gnode;
    for (Iterator i=getCache().getIterator();i.hasNext();){
      gnode=(GraphicNode)i.next();
      if (gnode.getNode().getImpl()==impl){
        gnodes.add(gnode);
        break;
      }
    }
    return gnodes;
View Full Code Here

      }
  }

  protected static GraphicNode createGroupWithName(int level,NodeGroup group,String name){
    Node node=NodeFactory.getInstance().createGroup(group,name);
    GraphicNode gnode=new GraphicNode(node,level);
    gnode.setComposite(true);
    gnode.setSummary(true);
    gnode.setCollapsed(false);
    return gnode;
  }
View Full Code Here

    private void groupList(List list,List destList,ListIterator groupIterator,Node parentGroup,NodeTransformer composition, boolean preserveHierarchy){
      NodeGroup group=(NodeGroup)groupIterator.next();
      NodeSorter sorter=group.getSorter();
      GraphicNodeComparator gcomp=new GraphicNodeComparator(sorter,composition);
      sorter.sortList(list,gcomp,preserveHierarchy);
      GraphicNode last=null;
      List nodes=null;
      GraphicNode current;
      for (ListIterator i=list.listIterator();i.hasNext();){
        current=(GraphicNode)i.next();
        if (last==null){
          nodes=new LinkedList();
        }else if (gcomp.compare(last,current)!=0){
View Full Code Here

      handleGroup(destList,groupIterator,parentGroup,group,last,nodes,composition,preserveHierarchy);
      }
      groupIterator.previous();
    }
    private void handleGroup(List destList,ListIterator groupIterator,Node parentGroup,NodeGroup group,GraphicNode last, List nodes,NodeTransformer composition, boolean preserveHierarchy){
    GraphicNode groupNode=createGroup(groupIterator.nextIndex(),group,group.getSorter(),last.getNode());
    destList.add(groupNode);
    model.addRelationship(parentGroup,groupNode.getNode());
    if (groupIterator.hasNext()){
      groupList(nodes,destList,groupIterator,groupNode.getNode(),composition,preserveHierarchy);
    }
    else{
      for (Iterator j=nodes.iterator();j.hasNext();)
        model.addRelationship(groupNode.getNode(),((GraphicNode)j.next()).getNode());
      destList.addAll(nodes);
    }
    }
View Full Code Here


    private void placeVoidNodes(List list){
      ListIterator i=list.listIterator();
      while (i.hasNext()){
          GraphicNode gnode=(GraphicNode)i.next();
          //if (!gnode.isGroup()){ //Already disabled if sorters or groupers are working
            placeVoidNodes(i,gnode.getNode());
          //}
      }
      placeVoidNodes(i,(Node)refCache.getModel().getRoot());
    }
View Full Code Here

    private void placeVoidNodes(ListIterator i,Node node){
        Node current;
          for (Enumeration e=node.children();e.hasMoreElements();){
              current=(Node)e.nextElement();
            if (current.isVoid()){
              GraphicNode gcurrent=refCache.getGraphicNode(current);
              i.add(gcurrent);
            }
          }
    }
View Full Code Here

//
//
//    }

    private void removeVoids(List list){
      GraphicNode current;
        for (ListIterator i=list.listIterator();i.hasNext();){
            current=(GraphicNode)i.next();
            if (current.isVoid()){
              i.remove();
            }
        }
    }
View Full Code Here

              i.remove();
            }
        }
    }
    private void removeEndVoids(List list){
      GraphicNode current;
        for (ListIterator i=list.listIterator(list.size());i.hasPrevious();){
            current=(GraphicNode)i.previous();
            if (current.isVoid()){
              i.remove();
            }else break;
        }
    }
View Full Code Here

            }else break;
        }
    }

    private void removeSummaries(List list){
      GraphicNode current;
        for (ListIterator i=list.listIterator();i.hasNext();){
            current=(GraphicNode)i.next();
            if (current.isSummary()){
              i.remove();
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.projity.pm.graphic.model.cache.GraphicNode$CacheIntervalConsumer

Copyright © 2018 www.massapicom. 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.