Package org.jgraph.graph

Examples of org.jgraph.graph.GraphCell


  protected JGraphpadVertexTool createVertexTool(String name, Object defaultValue,
  int shape, ImageIcon icon, boolean postEdit) {
    JGraphpadVertexTool vertextTool = null

    Object userObject = createVertexUserObject(defaultValue);
    GraphCell vertex = createVertex(userObject);
    if (shape >= 0) {
      JGraphpadGraphConstants.setVertexShape(vertex.getAttributes(),
                                             shape);
    } else {
      vertex.getAttributes().remove(GraphConstants.BORDERCOLOR);
      vertex.getAttributes().remove(GraphConstants.BORDER);
    }
    if (icon != null) {
      GraphConstants.setIcon(vertex.getAttributes(), icon);
    }
    if (postEdit) {
      vertextTool = new JGraphpadVertexTool(name, vertex) {
        protected void execute(JGraph graph, Object cell) {
          super.execute(graph, cell);
View Full Code Here


   * @param offsets
   *            The points defining the port locations.
   */
  protected void addPorts(MutableTreeNode parent, Point2D[] offsets) {
    for (int i = 0; i < offsets.length; i++) {
      GraphCell port = createPort(parent, createPortUserObject(null));
      configurePort(port, offsets[i]);
    }
  }
View Full Code Here

          move(tempCell.getChildren().toArray(), dx, dy, changes,
              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) {
View Full Code Here

  public GraphCell[] createAll(CreationMap[] maps) {
    Vector<GraphCell> result = new Vector<GraphCell>();
    for (int i = 0; i < maps.length; i++) {
      if (maps[i] != null) {
        GraphCell element = create(maps[i], false, true);
        result.add(element);
      }
    }
    GraphCell[] resultArray = result.toArray(new GraphCell[] {});
    getGraph().getGraphLayoutCache().insert(resultArray);
View Full Code Here

TOP

Related Classes of org.jgraph.graph.GraphCell

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.