Package org.eclipse.zest.layouts.algorithms

Examples of org.eclipse.zest.layouts.algorithms.CompositeLayoutAlgorithm


        this.labelProvider = new IvyNodeLabelProvider(this.viewer);
        viewer.setLabelProvider(labelProvider);
        viewer.setContentProvider(contentProvider);
        viewer.setInput(null);
        viewer.setConnectionStyle(ZestStyles.CONNECTIONS_DIRECTED);
        viewer.setLayoutAlgorithm(new CompositeLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING,
                new LayoutAlgorithm[] { new DirectedGraphLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING),
                                        new HorizontalShift(LayoutStyles.NO_LAYOUT_NODE_RESIZING) }));

        viewer.addSelectionChangedListener(new ISelectionChangedListener() {
            public void selectionChanged(SelectionChangedEvent event) {
View Full Code Here


        return SPRING_LAYOUT_ACTION_ID;
      }

    };

    CompositeLayoutAlgorithm algorithm = new CompositeLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING, new LayoutAlgorithm[] {
        new DirectedGraphLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING),
        new HorizontalShift(LayoutStyles.NO_LAYOUT_NODE_RESIZING) });

    //    directedGraphLayoutAction = new LayoutAction(this.workbenchPart, new DirectedGraphLayoutAlgorithm(
    //        LayoutStyles.NO_LAYOUT_NODE_RESIZING)) {
View Full Code Here

    manager.add(graphSeparator);
  }
 
  private LayoutAlgorithm setLayout() {
    LayoutAlgorithm layout;
    layout = new CompositeLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING,
        new  LayoutAlgorithm[] {
          new TreeLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING),
          new HorizontalShift(LayoutStyles.NO_LAYOUT_NODE_RESIZING) });
    return layout;
  }
View Full Code Here

  protected Action createLayoutMenuAction(final String text, final LayoutAlgorithm layoutAlgorithm) {
    Action action = new Action(text, SWT.RADIO) {
      @Override
      public void run() {
        setChecked(true);
        viewer.setLayoutAlgorithm(new CompositeLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING,
            new LayoutAlgorithm[] { layoutAlgorithm,
            new BigHorizontalShift(LayoutStyles.NO_LAYOUT_NODE_RESIZING) }));
        viewer.getGraphControl().applyLayout();
      }
    };
View Full Code Here

       * @see org.eclipse.jface.action.Action#run()
       */
      @Override
      public void run() {
        if (isChecked()) {
          viewer.setLayoutAlgorithm(new CompositeLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING, //
              new LayoutAlgorithm[] { //
              new RadialLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING),
              new BigHorizontalShift(LayoutStyles.NO_LAYOUT_NODE_RESIZING), }));

        } else {
          viewer.setLayoutAlgorithm(new CompositeLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING /*
           * |
           * LayoutStyles
           * .
           * ENFORCE_BOUNDS
           */, //
View Full Code Here

        this.labelProvider = new IvyNodeLabelProvider(this.viewer);
        viewer.setLabelProvider(labelProvider);
        viewer.setContentProvider(contentProvider);
        viewer.setInput(null);
        viewer.setConnectionStyle(ZestStyles.CONNECTIONS_DIRECTED);
        viewer.setLayoutAlgorithm(new CompositeLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING,
                new LayoutAlgorithm[] { new DirectedGraphLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING),
                                        new HorizontalShift(LayoutStyles.NO_LAYOUT_NODE_RESIZING) }));

        viewer.addSelectionChangedListener(new ISelectionChangedListener() {
            public void selectionChanged(SelectionChangedEvent event) {
View Full Code Here

TOP

Related Classes of org.eclipse.zest.layouts.algorithms.CompositeLayoutAlgorithm

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.