Package org.eclipse.draw2d.geometry

Examples of org.eclipse.draw2d.geometry.Insets


*/
public class RoundedLineBorder extends LineBorder {

  @Override
  public Insets getInsets(IFigure figure) {
    return new Insets(5, 5, 5, 5);
  }
View Full Code Here


    }
  }

  private Rectangle getSelectionRectangle() {
    Rectangle bounds = getTextBounds();
    bounds.expand(new Insets(2, 2, 0, 0));
    translateToParent(bounds);
    bounds.intersect(getBounds());
    return bounds;
  }
View Full Code Here

    if (r.isEmpty()) {
      return;
    }

    Rectangle textLoc = new Rectangle(r.getTopLeft(), getTextExtents(figure));
    r.crop(new Insets(getTextExtents(figure).height / 2));
    paintEtchedBorder(g, r);

    textLoc.x += getInsets(figure).left;
    g.setFont(getFont(figure));
    g.setForegroundColor(getTextColor());
View Full Code Here

    /* (non-Javadoc)
     * @see org.eclipse.draw2d.LineBorder#getInsets(org.eclipse.draw2d.IFigure)
     */
    public Insets getInsets(IFigure figure) {
        return new Insets(getWidth(), getWidth(),
                getWidth() + getShadowWidth(), getWidth() + getShadowWidth());
    }
View Full Code Here

          .getPreferredSize().height + 5;
      me.insets.left = 5;
      me.insets.right = 5;
      me.insets.bottom = 15;
    }
    me.innerPadding = new Insets(0, 0, 0, 4);
    // me.setPadding(new Insets(10, 50, 50, 0));
    map.put(this, me);
    graph.nodes.add(me);

    for (int i = 0; i < getChildren().size(); i++) {
View Full Code Here

    n.outgoingOffset = 9;
    n.incomingOffset = 9;
    n.width = getFigure().getPreferredSize().width + 5;
    n.height = getFigure().getPreferredSize().height;
    if (getModel() instanceof IEndState)
      n.setPadding(new Insets(0, 40, 10, 40));
    else if (getModel() instanceof IActionElement
        || getModel() instanceof IAttributeMapper
        || getModel() instanceof IIf
        || getModel() instanceof IExceptionHandler)
      n.setPadding(new Insets(0, 5, 5, 0));
    else
      n.setPadding(new Insets(0, 50, 50, 50));
    map.put(this, n);
    graph.nodes.add(n);

  }
View Full Code Here

    private boolean selected;
   
    private Rectangle getSelectionRectangle() {
        Rectangle bounds = getTextBounds();
        bounds.expand(new Insets(1, 1, 1, 1));
        translateToParent(bounds);
        bounds.intersect(getBounds());
        return bounds;
    }
View Full Code Here

    Node n = new Node(this, s);
    n.outgoingOffset = 9;
    n.incomingOffset = 9;
    n.width = getFigure().getPreferredSize().width + 5;
    n.height = getFigure().getPreferredSize().height;
    n.setPadding(new Insets(0, 5, 5, 9));
    map.put(this, n);
    graph.nodes.add(n);

  }
View Full Code Here

TOP

Related Classes of org.eclipse.draw2d.geometry.Insets

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.