use of org.eclipse.wst.xsd.ui.internal.design.layouts.FillLayout in project webtools.sourceediting by eclipse.
the class TopLevelComponentEditPart method createFigure.
protected IFigure createFigure() {
Figure typeGroup = new Figure() {
public void paint(Graphics graphics) {
super.paint(graphics);
if (hasFocus) {
try {
graphics.pushState();
Rectangle r = getBounds();
graphics.setXORMode(true);
graphics.drawFocus(r.x, r.y + 1, r.width - 1, r.height - 2);
} finally {
graphics.popState();
}
}
}
};
typeGroup.setLayoutManager(new ToolbarLayout());
labelHolder = new Figure();
FillLayout fillLayout = new FillLayout();
labelHolder.setLayoutManager(fillLayout);
typeGroup.add(labelHolder);
label = new HyperLinkLabel();
label.setOpaque(true);
label.setBorder(new MarginBorder(1, 2, 2, 5));
if (!isHighContrast)
label.setForegroundColor(ColorConstants.black);
labelHolder.add(label);
return typeGroup;
}
use of org.eclipse.wst.xsd.ui.internal.design.layouts.FillLayout in project webtools.sourceediting by eclipse.
the class XSDSchemaEditPart method createFigure.
protected IFigure createFigure() {
outer = new Figure();
outer.setBorder(new LineBorder(1));
FillLayout fillLayout = new FillLayout(4);
outer.setLayoutManager(fillLayout);
headingFigure = new HeadingFigure();
outer.add(headingFigure);
RectangleFigure line = new RectangleFigure() {
public Dimension getPreferredSize(int wHint, int hHint) {
Dimension d = super.getPreferredSize(wHint, hHint);
d.height = 1;
return d;
}
};
ToolbarLayout lineLayout = new ToolbarLayout(false);
lineLayout.setVertical(true);
lineLayout.setStretchMinorAxis(true);
line.setLayoutManager(lineLayout);
outer.add(line);
contentFigure = new Figure();
contentFigure.setBorder(new MarginBorder(4));
fillLayout = new FillLayout(4);
contentFigure.setLayoutManager(fillLayout);
outer.add(contentFigure);
return outer;
}
Aggregations