Package org.eclipse.draw2d.graph

Examples of org.eclipse.draw2d.graph.CompoundDirectedGraph


   * @see org.eclipse.draw2d.LayoutManager#layout(org.eclipse.draw2d.IFigure)
   */
  @Override
  public void layout(IFigure container) {
    try {
      CompoundDirectedGraph graph = new CompoundDirectedGraph();
      graph.setDirection(direction);

      part.addNodes(graph.nodes);
      part.addEdges(graph.edges);

      CompoundDirectedGraphLayout layout = new CompoundDirectedGraphLayout();
View Full Code Here


    return true;
  }

  @Override
  public void execute(ICustomContext context) {
    final CompoundDirectedGraph graph = mapDiagramToGraph();
    graph.setDefaultPadding(new Insets(PADDING));
    new CompoundDirectedGraphLayout().visit(graph);
    mapGraphCoordinatesToDiagram(graph);
  }
View Full Code Here

   * @return CompoundDirectedGraph that can be layouted
   */
  private CompoundDirectedGraph mapDiagramToGraph() {
    Map<AnchorContainer, Node> shapeToNode = new HashMap<AnchorContainer, Node>();
    Diagram d = getDiagram();
    CompoundDirectedGraph dg = new CompoundDirectedGraph();
    EdgeList edgeList = new EdgeList();
    NodeList nodeList = new NodeList();
    EList<Shape> children = d.getChildren();
    for (Shape shape : children) {
      Node node = new Node();
View Full Code Here

    return true;
  }

  @Override
  public void execute(ICustomContext context) {
    final CompoundDirectedGraph graph = mapDiagramToGraph();
    graph.setDefaultPadding(new Insets(PADDING));
    CompoundDirectedGraphLayout layout = new CompoundDirectedGraphLayout();
    int direction = PreferenceManager.getInstance().loadPreferenceAsInt(PreferencesConstants.EDITOR_LAYOUT_ORIENTATION);
    graph.setDirection(direction);
    layout.visit(graph);
    mapGraphCoordinatesToDiagram(graph);
  }
View Full Code Here


  private CompoundDirectedGraph mapDiagramToGraph() {
    Map<AnchorContainer, Node> shapeToNode = new HashMap<AnchorContainer, Node>();
    Diagram d = getDiagram();
    CompoundDirectedGraph dg = new CompoundDirectedGraph();
    EdgeList edgeList = new EdgeList();
    NodeList nodeList = new NodeList();
    EList<Shape> children = d.getChildren();
    for (Shape shape : children) {
      Node node = new Node();
View Full Code Here

    GraphAnimation.recordInitialState(container);
    if (GraphAnimation.playbackState(container)) {
      return;
    }

    CompoundDirectedGraph graph = new CompoundDirectedGraph();
    if (direction == PositionConstants.EAST) {
      graph.setDirection(direction);
    }
    Map<AbstractGraphicalEditPart, Object> partsToNodes = new HashMap<AbstractGraphicalEditPart, Object>();
    diagram.contributeNodesToGraph(graph, null, partsToNodes);
    diagram.contributeEdgesToGraph(graph, partsToNodes);
    new CompoundDirectedGraphLayout().visit(graph);
View Full Code Here

    public void layout(IFigure container) {
        GraphAnimation.recordInitialState(container);
        if (GraphAnimation.playbackState(container))
            return;

        CompoundDirectedGraph graph = new CompoundDirectedGraph();
        graph.setDirection(PositionConstants.SOUTH);
        Map partsToNodes = new HashMap();
        diagram.contributeNodesToGraph(graph, null, partsToNodes);
        diagram.contributeEdgesToGraph(graph, partsToNodes);
        new CompoundDirectedGraphLayout().visit(graph);
        diagram.applyGraphResults(graph, partsToNodes);
View Full Code Here

TOP

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

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.