Package org.jgraph.graph

Examples of org.jgraph.graph.AttributeMap$SerializablePoint2D


    }
    addPoint(c, index);
  }

  public Point2D[] getPoints() {
    AttributeMap map = getAttributes();
    List<Object> points = GraphConstants.getPoints(map);
    Point2D[] result = new Point2D[] {};
    if (points != null) {
      result = new Point2D[points.size()];
      for (int i = 0; i < points.size(); i++) {
View Full Code Here


    }
    return result;
  }

  public void setPoints(Point2D[] points) {
    AttributeMap map = getAttributes();
    List<Object> pointList = GraphConstants.getPoints(map);
    if (pointList != null) {
      while (pointList.size() > 2)
        pointList.remove(1);
      for (int i = points.length - 1; i >= 0; i--) {
View Full Code Here

//        {
//            setUserObject(creationMap.getName());
//        }
        this.m_ownerId = creationMap.getId();
//        setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);
        AttributeMap map = getAttributes();
        GraphConstants.setFont(map, DefaultStaticConfiguration.DEFAULT_LABEL_FONT);
//        GraphConstants.setOpaque(map, false);
        // GraphConstants.setBorderColor(map, Color.black);
        GraphConstants.setEditable(map, true);
        GraphConstants.setMoveable(map, true);
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

  /**
   * @param l
   */
  public void removePoint(Point2D l) {
    int pos = getPointPosition(l, 10);
    AttributeMap map = getAttributes();
    List<Object> points = GraphConstants.getPoints(map);
    points.remove(pos);
    GraphConstants.setPoints(map, points);
    getAttributes().applyMap(map);
    LoggerManager.debug(Constants.CORE_LOGGER, "Point removed");
View Full Code Here

        this.setId("transResource" + creationMap.getId());
        this.setOwnerId(creationMap.getId());
        this.transOrgUnitName = creationMap.getResourceOrgUnit();
        this.transRoleName = creationMap.getResourceRole();

        AttributeMap attrMap = getAttributes();
        GraphConstants.setOpaque(attrMap, false);
        GraphConstants.setBorderColor(attrMap, Color.black);
        GraphConstants.setEditable(attrMap, false);
        GraphConstants.setMoveable(attrMap, true);
        GraphConstants.setSizeable(attrMap, 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

    public GroupModel(AbstractPetriNetElementModel mainElement, NameModel name, Object[] additional, boolean ungroupable)
    {
        super();
        this.ungroupable = ungroupable;
        m_mainElement = mainElement;
        AttributeMap map = getAttributes();
        GraphConstants.setEditable(map, false);
        GraphConstants.setSizeable(map, false);
        GraphConstants.setChildrenSelectable(map, true);
        GraphConstants.setInset(map, 10);
        getAttributes().applyMap(map);
View Full Code Here

   
    public TransitionModel(CreationMap map)
    {
        super(map);
        toolSpecific = new Toolspecific(getId());
        AttributeMap attributes = getAttributes();
        GraphConstants.setMoveable(attributes, true);
        GraphConstants.setEditable(attributes, false);
        GraphConstants.setSizeable(attributes, false);
        setAttributes(attributes);
    }
View Full Code Here

    public AbstractPetriNetElementModel(CreationMap creationMap, Object userObject)
    {
        super(null);
        this.elementContext = new ElementContext();
        nameModel = new NameModel(creationMap);
        AttributeMap map = getAttributes();
        GraphConstants.setOpaque(map, false);
        if (creationMap.getReadOnly()) {
      GraphConstants.setBorderColor(map, new Color(125, 125, 125));
    } else {
      GraphConstants.setBorderColor(map, Color.BLACK);
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.