use of org.eclipse.wst.xsd.ui.internal.design.figures.HyperLinkLabel 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;
}
Aggregations