Package org.jgraph.graph

Examples of org.jgraph.graph.AttributeMap$SerializablePoint2D


   * Returns the attributes for the specified cell. If the layout cache
   * returns a view for the cell then this method returns allAttributes,
   * otherwise the method returns model.getAttributes(cell).
   */
  public AttributeMap getAttributes(Object cell) {
    AttributeMap attrs;
    CellView cellView = getGraphLayoutCache().getMapping(cell, false);
    if (cellView != null) {
      attrs = cellView.getAllAttributes();
    } else {
      attrs = getModel().getAttributes(cell);
View Full Code Here


  private boolean Outgoing = false;
  private boolean Ingoing = false;

  public ReachabilityEdgeModel(Object to){
    super(to);
        AttributeMap attributes = getAttributes();
        GraphConstants.setMoveable(attributes, true);
        GraphConstants.setEditable(attributes, false);
        GraphConstants.setSizeable(attributes, false);
        GraphConstants.setDisconnectable(attributes, false);
        GraphConstants.setLabelPosition(attributes, new Point2D.Double(GraphConstants.PERMILLE*6/8, -20));
View Full Code Here

  private boolean highlight = false;
  private boolean grayscaled = true;
 
    public ReachabilityPlaceModel(Object o){
      super(o);
        AttributeMap attributes = getAttributes();
        GraphConstants.setMoveable(attributes, true);
        GraphConstants.setEditable(attributes, false);
        GraphConstants.setSizeable(attributes, false);
       // (x,y,w,h)
    GraphConstants.setBounds(attributes, new Rectangle2D.Double(0,0,80,20));
View Full Code Here

              true);
        }
      }
      if (toMove[i] instanceof GraphCell) {
        GraphCell noGroupElement = (GraphCell) toMove[i];
        AttributeMap tempMap = (AttributeMap) noGroupElement
            .getAttributes().clone();
        AttributeMap newMap = new AttributeMap();
        Rectangle2D bounds = GraphConstants.getBounds(tempMap);
        List<?> points = GraphConstants.getPoints(tempMap);
        if (bounds != null) {
          bounds = new Rectangle((int) bounds.getX() + dx,
              (int) bounds.getY() + dy, (int) bounds.getWidth(),
              (int) bounds.getHeight());
          AttributeMap changeMap = changes.get(noGroupElement);
          if (changeMap == null) {
            changeMap = new AttributeMap();
            changes.put(noGroupElement, changeMap);
          }
          changeMap.applyValue(GraphConstants.BOUNDS, bounds);
          // tempMap.applyValue(GraphConstants.BOUNDS, bounds);
          // noGroupElement.changeAttributes(tempMap);
        }
        if (points != null) {
          Vector<Point2D> newPoints = new Vector<Point2D>();
View Full Code Here

        super();
        this.setId("trigger" + creationMap.getId());
        this.setTriggertype(creationMap.getTriggerType());
        this.setOwnerId(creationMap.getId());

        AttributeMap attributes = getAttributes();
        GraphConstants.setOpaque(attributes, false);
        GraphConstants.setBorderColor(attributes, Color.black);
        GraphConstants.setMoveable(attributes, true);
        GraphConstants.setEditable(attributes, false);
        GraphConstants.setSizeable(attributes, false);
View Full Code Here

        return null;
    }

    public void setPosition(int x, int y)
    {
        AttributeMap map = getAttributes();
        GraphConstants.setBounds(map, new Rectangle(x, y, getWidth(), getHeight()));
        getAttributes().applyMap(map);
    }
View Full Code Here

    this.elementContext = new ElementContext();
    initAttributes();
  }
 
  public void setHighlighted(boolean highlighted){
    AttributeMap map = getAttributes();
    if(highlighted)
      GraphConstants.setLineColor(map, DEFAULT_HIGHLIGHTED_COLOR);
    else
      GraphConstants.setLineColor(map, DEFAULT_COLOR);
    updateLabel();
View Full Code Here

      GraphConstants.setLineColor(map, DEFAULT_COLOR);
    updateLabel();
  }

  public void initAttributes() {
    AttributeMap map = getAttributes();
    GraphConstants.setEditable(map, false);
    GraphConstants.setBendable(map, true);
    GraphConstants
        .setLineStyle(map, ConfigurationManager.getConfiguration()
            .isRoundRouting() ? GraphConstants.STYLE_BEZIER
View Full Code Here

    getAttributes().applyMap(map);
  }

  public void setLabelPosition(Point2D newLabelPos) {
    AttributeMap map = getAttributes();
    Point2D[] pos = { newLabelPos };
    GraphConstants.setExtraLabelPositions(map, pos);

    getAttributes().applyMap(map);
  }
View Full Code Here

   * Adds point c to the arc. Calculates the right position
   *
   * @param c
   */
  public void addPoint(Point2D c) {
    AttributeMap map = getAttributes();
    List<Object> points = GraphConstants.getPoints(map);
    if (points == null) {
      points = new Vector<Object>();
      Point2D[] currentPoints = getPoints();
      for (int i = 0; i < currentPoints.length; i++) {
View Full Code Here

TOP

Related Classes of org.jgraph.graph.AttributeMap$SerializablePoint2D

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.