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

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





    public GraphZone getNodeAt(double x,double y){
    GraphicNode node;
    GeneralPath shape;
    for (ListIterator i=graph.getModel().getNodeIterator();i.hasNext();){
      node=(GraphicNode)i.next();
      shape=((NetworkRenderer)graphRenderer).getShape(node);
      if (shape!=null&&shape.contains(x,y)){
View Full Code Here


    }


    protected Shape getBarShadowBounds(double x,double y){
    //if (state!=BAR_MOVE) return null;
    GraphicNode node=(GraphicNode)selected;
      GeneralPath shape=getShape(node);
      return shape.createTransformedShape(AffineTransform.getTranslateInstance(x-x0,y-y0));
    }
View Full Code Here

    }



    protected void setLinkOrigin(){
      GraphicNode node=(GraphicNode)selected;
      Point2D center= ((NetworkRenderer)((NetworkUI)ui).getGraphRenderer()).getCenter(node);
    x0link=center.getX();
    y0link=center.getY();

    }
View Full Code Here

    }

    protected boolean switchOnLinkCreation(double x, double y){
      if (state!=BAR_SELECTION) return false;
    GraphicNode node=(GraphicNode)selected;
    GeneralPath shape=getShape(node);
    if (shape==null) return false;
    return (shape.contains(x,y));
    }
View Full Code Here

        }
        if (state!=savedState){
          if (savedState==BAR_SELECTION){
            NetworkUI nui=(NetworkUI)ui;
            List changes=nui.getEditorChange();
            GraphicNode node=nui.getEditorNode();
            nui.editNode(null);
            if (changes!=null) for (Iterator i=changes.iterator();i.hasNext();){
              FieldChange change=(FieldChange)i.next();
              try {
              nui.getGraph().getCache().getModel().setFieldValue(change.getField(),node.getNode(), this, change.getValue(), null,NodeModel.NORMAL);
            } catch (FieldParseException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
            }
            }
View Full Code Here

  public static GraphicNode getNodeFromCacheRow(int row,int rowMultiple,NodeModelCache cache) {
    return (GraphicNode) cache.getElementAt(row/rowMultiple);
  }
  public static Node getNodeInRow(int row,int rowMultiple,NodeModelCache cache) {
    GraphicNode gnode = getNodeFromCacheRow(row,rowMultiple,cache);
    if (gnode == null)
      return null;
    return gnode.getNode();

  }
View Full Code Here

  }

  public TableCellEditor getCellEditor(int row, int column) {
    SpreadSheetModel model=(SpreadSheetModel) getModel();
    Field field = model.getFieldInColumn(column + 1);
    GraphicNode node=model.getNode(row);
    if (field != null && (field.isDynamicOptions() || field.hasFilter())) {
      return new SimpleComboBoxEditor(new DefaultComboBoxModel(field.getOptions(node.getNode().getImpl())));
    } else {
      return super.getCellEditor(row, column);
    }
  }
View Full Code Here

          SpreadSheetColumnModel columnModel = (SpreadSheetColumnModel) getColumnModel();
          Field field = ((SpreadSheetModel) getModel()).getFieldInNonTranslatedColumn(col + 1);
          SpreadSheetModel model = (SpreadSheetModel) getModel();
          if (field.isNameField()) {
            // if (col == columnModel.getNameIndex()) {
            GraphicNode node = model.getNode(row);
            if (isOnIcon(e)) {
              if (model.getCellProperties(node).isCompositeIcon()) {
                finishCurrentOperations();
                selection.getRowSelection().clearSelection();
                boolean change = true;
                if (!node.isFetched()) // for subprojects
                  change = node.fetch();
                if (change)
                  model.changeCollapsedState(row);
                e.consume(); // prevent dbl click treatment below

                // because editor may have already been
View Full Code Here

    nodeMap.clear();
  }
 
  public void insertDependency(GraphicDependency dependency){
    //System.out.println("insertDependency");
      GraphicNode preValue=(GraphicNode)dependency.getPredecessor();
      GraphicNode sucValue=(GraphicNode)dependency.getSuccessor();
      Node pre=(Node)nodeMap.get(preValue);
      if (pre==null){
          pre=new Node(preValue);
          nodeMap.put(preValue,pre);
      }
View Full Code Here

      pre.addSuccessor(suc);
      suc.addPredecessor(pre);
  }
  public void removeDependency(GraphicDependency dependency){
    //System.out.println("removeDependency");
      GraphicNode preValue=(GraphicNode)dependency.getPredecessor();
      GraphicNode sucValue=(GraphicNode)dependency.getSuccessor();
      Node pre=(Node)nodeMap.get(preValue);
      Node suc=(Node)nodeMap.get(sucValue);
      if (pre==null||suc==null)return;
     
      pre.removeSuccessor(suc);
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.