Examples of HorizontalShift


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

        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) {
                Object selectedElement = ((IStructuredSelection) event.getSelection()).getFirstElement();
                if (selectedElement instanceof EntityConnectionData) {
View Full Code Here

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

    };

    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)) {
    directedGraphLayoutAction = new LayoutAction(this.workbenchPart, algorithm) {

      /**
       * @see org.eclipse.jface.action.Action#getId()
       */
      @Override
      public String getId() {
        return DIRECTED_GRAPH_LAYOUT_ACTION_ID;
      }

      /**
       * @see org.eclipse.jface.action.Action#getText()
       */
      @Override
      public String getText() {
        return DIRECTED_GRAPH_LAYOUT_ACTION_ID;
      }
    };

    gridLayoutAction = new LayoutAction(this.workbenchPart, new GridLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING)) {

      /**
       * @see org.eclipse.jface.action.Action#getId()
       */
      @Override
      public String getId() {
        return GRID_LAYOUT_ACTION_ID;
      }

      /**
       * @see org.eclipse.jface.action.Action#getText()
       */
      @Override
      public String getText() {
        return GRID_LAYOUT_ACTION_ID;
      }
    };

    horizontalLayoutAction = new LayoutAction(this.workbenchPart, new HorizontalLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING)) {

      /**
       * @see org.eclipse.jface.action.Action#getId()
       */
      @Override
      public String getId() {
        return HORIZONTAL_LAYOUT_ACTION_ID;
      }

      /**
       * @see org.eclipse.jface.action.Action#getText()
       */
      @Override
      public String getText() {
        return HORIZONTAL_LAYOUT_ACTION_ID;
      }
    };

    verticalLayoutAction = new LayoutAction(this.workbenchPart, new VerticalLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING)) {

      /**
       * @see org.eclipse.jface.action.Action#getId()
       */
      @Override
      public String getId() {
        return VERTICAL_LAYOUT_ACTION_ID;
      }

      /**
       * @see org.eclipse.jface.action.Action#getText()
       */
      @Override
      public String getText() {
        return VERTICAL_LAYOUT_ACTION_ID;
      }
    };

    horizontalShiftLayoutAction = new LayoutAction(this.workbenchPart, new HorizontalShift(LayoutStyles.NO_LAYOUT_NODE_RESIZING)) {

      /**
       * @see org.eclipse.jface.action.Action#getId()
       */
      @Override
 
View Full Code Here

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

  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

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

        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) {
                Object selectedElement = ((IStructuredSelection) event.getSelection()).getFirstElement();
                if (selectedElement instanceof EntityConnectionData) {
View Full Code Here

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

    public void run()
    {
        if ( isChecked() )
        {
            graphView.getViewer().setLayoutAlgorithm(
                    new HorizontalShift( LayoutStyles.NO_LAYOUT_NODE_RESIZING ),
                    true );
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.