Package org.eclipse.draw2d

Examples of org.eclipse.draw2d.Figure


  /**
   * @generated
   */
  protected IFigure createFocusFeedbackFigure() {
    return new Figure() {

      protected void paintFigure(Graphics graphics) {
        graphics.drawFocus(getBounds().getResized(-1, -1));
      }
    };
View Full Code Here


  /**
   * @generated
   */
  protected IFigure createFocusFeedbackFigure() {
    return new Figure() {

      protected void paintFigure(Graphics graphics) {
        graphics.drawFocus(getBounds().getResized(-1, -1));
      }
    };
View Full Code Here

  /**
   * @generated
   */
  protected IFigure createFocusFeedbackFigure() {
    return new Figure() {

      protected void paintFigure(Graphics graphics) {
        graphics.drawFocus(getBounds().getResized(-1, -1));
      }
    };
View Full Code Here

  /**
   * @generated
   */
  protected IFigure createFocusFeedbackFigure() {
    return new Figure() {

      protected void paintFigure(Graphics graphics) {
        graphics.drawFocus(getBounds().getResized(-1, -1));
      }
    };
View Full Code Here

  /**
   * @generated
   */
  protected IFigure createFocusFeedbackFigure() {
    return new Figure() {

      protected void paintFigure(Graphics graphics) {
        graphics.drawFocus(getBounds().getResized(-1, -1));
      }
    };
View Full Code Here

     * (non-Javadoc)
     *
     * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
     */
    protected IFigure createFigure() {
        Figure f = new FreeformLayer();
        f.setBorder(new MarginBorder(3));
        f.setLayoutManager(new FreeformLayout());

        // Create the static router for the connection layer
        ConnectionLayer connLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
        connLayer.setConnectionRouter(new ShortestPathConnectionRouter(f));

View Full Code Here

    private static final int SPACING = 2;
    public void layout(IFigure container) {
      List elements = container.getChildren();
      ImageFigure icon = (ImageFigure)elements.get(0);
      Label text = (Label)elements.get(1);
      Figure removeButton = (Figure)elements.get(2);
      Figure addButton = (Figure)elements.get(3);
     
      Rectangle containerBounds = container.getBounds();
      int x = containerBounds.x + SPACING;
      int y = containerBounds.y;
      int height = containerBounds.height;
     
      Dimension size = icon.getPreferredSize();
      Rectangle bounds = new Rectangle(x, y, size.width, height);
      icon.setBounds(bounds);
     
      size = removeButton.getPreferredSize();
      x = (containerBounds.x + containerBounds.width) - size.width;
      bounds = new Rectangle(x, y, size.width, height);
      removeButton.setBounds(bounds);

      size = addButton.getPreferredSize();
      x = x - size.width;
      bounds = new Rectangle(x, y, size.width, height);
      addButton.setBounds(bounds);

      x = icon.getBounds().x + icon.getBounds().width;
      x = x + SPACING;
      int width = containerBounds.width - (icon.getBounds().width + removeButton.getBounds().width + addButton.getBounds().width);
      bounds = new Rectangle(x, y, width, height);
      text.setBounds(bounds);
    }
View Full Code Here

  protected TrayContainerFigure createMainFigure() {
    return new TrayContainerFigure();
  }
 
  protected IFigure createTitleFigure() {
    return new Figure();
  }
View Full Code Here

  protected IFigure createTitleFigure() {
    return new Figure();
  }
 
  protected IFigure createChildrenFigure() {
    Figure result = new Figure();
    result.setLayoutManager(new ToolbarLayout());
    return result;
  }
View Full Code Here

  /**
   * @generated
   */
  protected IFigure createFocusFeedbackFigure() {
    return new Figure() {

      protected void paintFigure(Graphics graphics) {
        graphics.drawFocus(getBounds().getResized(-1, -1));
      }
    };
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.