use of org.eclipse.draw2d.geometry.Insets in project whole by wholeplatform.
the class EntityLabel method getPreferredSize.
// TODO end
@Override
public Dimension getPreferredSize(int wHint, int hHint) {
if (prefSize == null) {
Dimension d = calculateLabelSize(getTextSize());
Insets insets = getInsets();
prefSize = new BaselinedDimension(d, insets.left, getAscent(), false);
prefSize.expand(insets.getWidth(), insets.getHeight());
if (getLayoutManager() != null)
prefSize.union(getLayoutManager().getPreferredSize(this, wHint, hHint));
}
return prefSize;
}
use of org.eclipse.draw2d.geometry.Insets in project whole by wholeplatform.
the class PickControlFigure method createBorder.
protected AbstractBorder createBorder(final boolean isHorizontal) {
return new AbstractBorder() {
private final Insets /*static*/
INSETS = new Insets(10, 10, 20, 10);
public Insets getInsets(IFigure figure) {
return INSETS;
}
public void paint(IFigure figure, Graphics graphics, Insets insets) {
Rectangle rect = getPaintRectangle(figure, insets).resize(-1, -1);
graphics.setForegroundColor(ColorConstants.lightGray);
// graphics.setLineStyle(SWT.LINE_CUSTOM);
// graphics.setLineDash(new int[] {8,3});
graphics.drawRoundRectangle(rect, 10, 10);
}
};
}
use of org.eclipse.draw2d.geometry.Insets in project whole by wholeplatform.
the class SequenceFigure method createBorder.
protected AbstractBorder createBorder(final boolean isHorizontal) {
return new AbstractBorder() {
private final Insets /*static*/
INSETS = new Insets(10, 20, 10, 20);
public Insets getInsets(IFigure figure) {
return INSETS;
}
public void paint(IFigure figure, Graphics graphics, Insets insets) {
Rectangle rect = getPaintRectangle(figure, insets).resize(-1, -1);
graphics.setForegroundColor(ColorConstants.lightGray);
// graphics.setLineStyle(SWT.LINE_CUSTOM);
// graphics.setLineDash(new int[] {8,3});
graphics.drawRoundRectangle(rect, 10, 10);
}
};
}
use of org.eclipse.draw2d.geometry.Insets in project whole by wholeplatform.
the class SwitchControlFigure method createBorder.
protected AbstractBorder createBorder(final boolean isHorizontal) {
return new AbstractBorder() {
private final Insets /*static*/
INSETS = new Insets(10, 10, 10, 10);
public Insets getInsets(IFigure figure) {
return INSETS;
}
public void paint(IFigure figure, Graphics graphics, Insets insets) {
Rectangle rect = getPaintRectangle(figure, insets).resize(-1, -1);
graphics.setForegroundColor(ColorConstants.lightGray);
// graphics.setLineStyle(SWT.LINE_CUSTOM);
// graphics.setLineDash(new int[] {8,3});
graphics.drawRoundRectangle(rect, 10, 10);
}
};
}
use of org.eclipse.draw2d.geometry.Insets in project whole by wholeplatform.
the class AbstractStyledBorder method getInsets.
public Insets getInsets(IFigure figure) {
Insets insets = getInsets();
int lw = getLineWidth();
return new Insets(lw).add(insets);
}
Aggregations