Package org.eclipse.draw2d.geometry

Examples of org.eclipse.draw2d.geometry.Insets


  return child != null && parent != null;
}

public void execute() {
  if (rect != null) {
    Insets expansion = getInsets();
    if (!rect.isEmpty())
      rect.expand(expansion);
    else {
      rect.x -= expansion.left;
      rect.y -= expansion.top;
View Full Code Here


  redo();
}

private Insets getInsets() {
  if (child instanceof LED || child instanceof Circuit)
    return new Insets(2, 0, 2, 0);
  return new Insets();
}
View Full Code Here

* @author Christian Dupuis
*/
public class CompartmentBorder extends AbstractBorder {

  public Insets getInsets(IFigure figure) {
    return new Insets(1, 0, 0, 0);
  }
View Full Code Here

   * @param figure The figure this border belongs to
   * @return This border's insets
   */
  @Override
  public Insets getInsets(IFigure figure) {
    return new Insets(getWidth(), getWidth(), getWidth() + getShadowWidth(),
              getWidth() + getShadowWidth());
  }
View Full Code Here

    add(contents);
  }

  protected void createInnerBeans(Bean bean) {
    contents.setLayoutManager(new ToolbarLayout());
    contents.setBorder(new MarginBorder(new Insets(8, 11, 8, 8)));
    for (Bean innerBean : bean.getInnerBeans()) {
      contents.add(new BeanFigure(innerBean));
    }
  }
View Full Code Here

      me.insets.top = ((SubgraphFigure) getFigure()).getHeader().getPreferredSize().height + 5;
      me.insets.left = 5;
      me.insets.right = 5;
      me.insets.bottom = 15;
    }
    me.innerPadding = new Insets(0, 0, 0, 4);
    map.put(this, me);
    graph.nodes.add(me);

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

    n.incomingOffset = getAnchorOffset();
    Dimension hint = getFigureHint();
    n.width = hint.width;
    n.height = hint.height;
    if (graph.getDirection() == PositionConstants.EAST) {
      n.setPadding(new Insets(8, 10, 12, 10));
    }
    else {
      n.setPadding(new Insets(10, 8, 10, 12));
    }
    map.put(this, n);
    graph.nodes.add(n);

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

        me.insets.top = tagHeight;
        me.insets.left = 0;
        me.insets.bottom = tagHeight;
      }
    }
    me.innerPadding = new Insets(0);
    if (graph.getDirection() == PositionConstants.EAST) {
      me.setPadding(new Insets(6, 8, 6, 8));
    }
    else {
      me.setPadding(new Insets(8, 6, 8, 6));
    }
    map.put(this, me);
    graph.nodes.add(me);

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

      me.insets.top = ((SubgraphFigure) getFigure()).getHeader().getPreferredSize().height + 5;
      me.insets.left = 5;
      me.insets.right = 5;
      me.insets.bottom = 15;
    }
    me.innerPadding = new Insets(0, 0, 6, 4);
    map.put(this, me);
    graph.nodes.add(me);

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

    Node n = new Node(this, s);
    Dimension hint = getConnectionFigure().getPreferredSize();
    n.width = hint.width;
    n.height = hint.height;
    if (graph.getDirection() == PositionConstants.EAST) {
      n.setPadding(new Insets(8, 10, 12, 10));
    }
    else {
      n.setPadding(new Insets(10, 8, 10, 12));
    }
    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.