Package org.eclipse.draw2d

Examples of org.eclipse.draw2d.Figure


  }
 
  @Override
  public void render()
  {
    Figure f = new FreeformLayer();
    f.setBorder(new MarginBorder(3));
    f.setLayoutManager(new FreeformLayout());
    setFigure(f);   
  }
View Full Code Here


  installEditPolicy(EditPolicy.LAYOUT_ROLE, new LogicFlowEditPolicy());
  installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new ContainerHighlightEditPolicy());
}

protected IFigure createFigure() {
  Figure figure = new Figure();
  figure.setLayoutManager(new FlowLayout());
  figure.setBorder(new LogicFlowBorder());
  figure.setOpaque(true);
  return figure;
View Full Code Here

* Returns a Figure to represent this.
*
* @return  Figure.
*/
protected IFigure createFigure() {
  Figure f = new FreeformLayer();
//  f.setBorder(new GroupBoxBorder("Diagram"));
  f.setLayoutManager(new FreeformLayout());
  f.setBorder(new MarginBorder(5));
  return f;
}
View Full Code Here

    setLayoutManager(layout);
    setBorder(new ShadowedLineBorder(ColorConstants.black, 1, 4));
    setOpaque(true);

    // Prepare child figures
    this.contents = new Figure();
    label = createLabel(bean);
    add(label);
    if (bean.hasConstructorArguments()) {
      constructorArgumentFigure = createConstructorArguments(bean);
      add(constructorArgumentFigure);
View Full Code Here

 
  public static final int MARGIN_SIZE = 10;
 
  @Override
  protected IFigure createFigure() {
    Figure panel = new ScalableFreeformLayeredPane();
    panel.setBackgroundColor(ColorConstants.listBackground);
    panel.setLayoutManager(new XYLayout());
    panel.setBorder(new MarginBorder(MARGIN_SIZE));
    
    ConnectionLayer cLayer = (ConnectionLayer) getLayer(CONNECTION_LAYER);
        cLayer.setAntialias(SWT.ON);
   
    return panel;
View Full Code Here

    installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, null);
  }

  @Override
  protected IFigure createFigure() {
    Figure f = new FreeformLayer() {
      @Override
      public void setBounds(Rectangle rect) {
        int x = bounds.x, y = bounds.y;

        boolean resize = (rect.width != bounds.width) || (rect.height != bounds.height), translate = (rect.x != x)
            || (rect.y != y);

        if (isVisible() && (resize || translate)) {
          erase();
        }
        if (translate) {
          int dx = rect.x - x;
          int dy = rect.y - y;
          primTranslate(dx, dy);
        }
        bounds.width = rect.width;
        bounds.height = rect.height;
        if (resize || translate) {
          fireFigureMoved();
          fireCoordinateSystemChanged();
          repaint();
        }
      }
    };

    delegatingLayoutManager = new DelegatingLayoutManager(this);
    f.setLayoutManager(delegatingLayoutManager);
    f.setOpaque(true);
    ConnectionLayer cLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
    cLayer.setAntialias(SWT.ON);

    FanRouter fanRouter = new FanRouter();
    fanRouter.setSeparation(20);
View Full Code Here

  protected IFigure header;

  public SubgraphFigure(IFigure header, IFigure footer, int direction) {
    this.direction = direction;
    contents = new Figure();
    contents.setLayoutManager(new DummyLayout());
    add(this.header = header);
    add(contents);
    add(this.footer = footer);
  }
View Full Code Here

    installEditPolicy(EditPolicy.CONTAINER_ROLE,
        new StateContainerEditPolicy());
  }

  protected IFigure createFigure() {
    Figure f = new Figure() {

      public void setBounds(Rectangle rect) {
        int x = bounds.x, y = bounds.y;

        boolean resize = (rect.width != bounds.width)
            || (rect.height != bounds.height), translate = (rect.x != x)
            || (rect.y != y);

        if (isVisible() && (resize || translate))
          erase();
        if (translate) {
          int dx = rect.x - x;
          int dy = rect.y - y;
          primTranslate(dx, dy);
        }
        bounds.width = rect.width;
        bounds.height = rect.height;
        if (resize || translate) {
          fireFigureMoved();
          repaint();
        }
      }
    };

    f.setLayoutManager(new GraphLayoutManager(this));

    //addFlowRootLabel(f);

    return f;
  }
View Full Code Here

     *
     * @param footer
     * @param header
     */
    public SubgraphFigure(IFigure header, IFigure footer) {
        contents = new Figure();
        contents.setLayoutManager(new DummyLayout());
        add(contents);
        add(this.header = header);
        add(this.footer = footer);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.draw2d.Figure

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.