Package org.eclipse.draw2d.graph

Examples of org.eclipse.draw2d.graph.Node


   * org.eclipse.draw2d.graph.Subgraph, java.util.Map)
   */
  @SuppressWarnings("unchecked")
  public void contributeNodesToGraph(CompoundDirectedGraph graph, Subgraph s,
      Map map) {
    Node n = new Node(this, s);
    n.outgoingOffset = 9;
    n.incomingOffset = 9;
    n.width = getFigure().getPreferredSize().width + 5;
    n.height = getFigure().getPreferredSize().height;
    if (getModel() instanceof IEndState)
      n.setPadding(new Insets(0, 40, 10, 40));
    else if (getModel() instanceof IActionElement
        || getModel() instanceof IAttributeMapper
        || getModel() instanceof IIf
        || getModel() instanceof IExceptionHandler)
      n.setPadding(new Insets(0, 5, 5, 0));
    else
      n.setPadding(new Insets(0, 50, 50, 50));
    map.put(this, n);
    graph.nodes.add(n);

  }
View Full Code Here


    for (int i = 0; i < getChildren().size(); i++) {
      AbstractStatePart part = (AbstractStatePart) getChildren().get(i);
      if (!(part.getModel() instanceof IActionElement && !(part
          .getModel() instanceof IExceptionHandler))) {
        // part.applyGraphResults(graph, map);
        Node n = (Node) map.get(part);
        Dimension dim = part.getFigure().getPreferredSize();
        part.getFigure().setBounds(
            new Rectangle(n.x, n.y + 5, n.width, dim.height));
      }
    }
View Full Code Here

   * @param map
   * @param model
   * @return
   */
  private Node getNode(Object model, Map map) {
    Node node = null;
    Iterator iter = map.values().iterator();
    while (iter.hasNext()) {
      Object obj = (Object) iter.next();
      if (obj instanceof Node) {
        Node tempNode = (Node) obj;
        if (model
            .equals(((AbstractStatePart) tempNode.data).getModel())) {
          node = tempNode;
          break;
        }
View Full Code Here

   * org.eclipse.draw2d.graph.Subgraph, java.util.Map)
   */
  @SuppressWarnings("unchecked")
  public void contributeNodesToGraph(CompoundDirectedGraph graph, Subgraph s,
      Map map) {
    Node n = new Node(this, s);
    n.outgoingOffset = 9;
    n.incomingOffset = 9;
    n.width = getFigure().getPreferredSize().width + 5;
    n.height = getFigure().getPreferredSize().height;
    n.setPadding(new Insets(0, 5, 5, 9));
    map.put(this, n);
    graph.nodes.add(n);

  }
View Full Code Here

TOP

Related Classes of org.eclipse.draw2d.graph.Node

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.