Examples of GraphicNode


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

      spreadsheetBounds=new Rectangle(spreadsheetBounds.x,spreadsheetBounds.y,printSpreadsheetBounds.width,printSpreadsheetBounds.height);
    }
//    System.out.println("spreadsheetBounds="+spreadsheetBounds);
    int row=row0;
    for (Iterator i=graphInfo.getCache().getIterator(row0);i.hasNext()&&row<=row1;row++){
      GraphicNode gnode=(GraphicNode)i.next();
      paintRow(g2, row, row0, h,col0,col1,gnode,spreadsheetBounds);
      h+=rowH;
    }
    paintColumnHeader(g2,col0,col1,spreadsheetBounds);
  }
View Full Code Here

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

    Rectangle2D ref=new Rectangle2D.Double(config.getPertXOffset(),config.getPertYOffset(),config.getPertCellWidth(),config.getPertCellHeight());
    int row=0;
    int col=-1;
    setEmpty();
    for (Iterator i=cache.getIterator();i.hasNext();){
        GraphicNode current=(GraphicNode)i.next();
        int currentCol=cache.getPertLevel(current)-1;
        if (currentCol<=col) row++;
        col=currentCol;
       
        TexturedShape texturedShape=findShape(current);
        if (texturedShape==null) continue;
        double centerX=origin.getX()+ref.getMaxX()*col+ref.getWidth()/2;
        double centerY=origin.getY()+ref.getMaxY()*row+ref.getHeight()/2;
        //System.out.println(centerX+"/"+centerY);
        GeneralPath shape=texturedShape.toGeneralPath(ref.getWidth(),ref.getHeight(),centerX-ref.getWidth()/2,centerY,null);
        current.setPertShape(shape,centerX,centerY);
        Rectangle cellBounds=network.scale(shape.getBounds());
        if (isEmpty())
        bounds.setBounds(cellBounds);
      else Rectangle.union(bounds,cellBounds,bounds);
    }
View Full Code Here

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

        if (i.hasPrevious())
          i.previous();
    }

    boolean found = false;
    GraphicNode gnode = null;
    Object obj;
    Node node;
    while (ctx.isForward() ? i.hasNext() : i.hasPrevious()) {
      gnode=(GraphicNode)(ctx.isForward() ? i.next() : i.previous());
      if (gnode.isVoid())
        continue;
      node = gnode.getNode();
      obj = node.getImpl();
      if (ctx.matches(obj)) {
        found = true;
        break;
      }
View Full Code Here

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




    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

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

    }


    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

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

    }



    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

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

    }

    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

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

        }
        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

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

  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

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

  }

  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
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.