use of org.eclipse.wst.xsd.ui.internal.adt.typeviz.design.figures.BoxFigure in project webtools.sourceediting by eclipse.
the class TopLevelFieldEditPart method refreshVisuals.
protected void refreshVisuals() {
IField field = (IField) getModel();
BoxFigure boxFigure = (BoxFigure) getFigure();
Label label = boxFigure.getNameLabel();
label.setText(field.getName());
if (field.isAbstract()) {
if (italicFont == null) {
Font font = label.getFont();
italicFont = getItalicFont(font);
}
if (italicFont != null) {
label.setFont(italicFont);
}
} else {
label.setFont(label.getParent().getFont());
}
super.refreshVisuals();
}
use of org.eclipse.wst.xsd.ui.internal.adt.typeviz.design.figures.BoxFigure in project webtools.sourceediting by eclipse.
the class BoxEditPart method createFigure.
protected IFigure createFigure() {
BoxFigure figure = new BoxFigure();
LineBorder boxLineBorder = new LineBorder(1);
figure.setBorder(boxLineBorder);
ToolbarLayout toolbarLayout = new ToolbarLayout();
toolbarLayout.setStretchMinorAxis(true);
figure.setLayoutManager(toolbarLayout);
// we should organize ITreeElement and integrate it with the facade
if (getModel() instanceof ITreeElement) {
figure.getNameLabel().setIcon(((ITreeElement) getModel()).getImage());
}
return figure;
}
use of org.eclipse.wst.xsd.ui.internal.adt.typeviz.design.figures.BoxFigure in project webtools.sourceediting by eclipse.
the class BoxEditPart method removeFeedback.
public void removeFeedback() {
BoxFigure boxFigure = (BoxFigure) figure;
LineBorder boxFigureLineBorder = (LineBorder) boxFigure.getBorder();
boxFigureLineBorder.setWidth(1);
boxFigureLineBorder.setColor(ColorConstants.black);
boxFigure.getHeadingFigure().setSelected(false);
figure.repaint();
super.removeFeedback();
}
use of org.eclipse.wst.xsd.ui.internal.adt.typeviz.design.figures.BoxFigure in project webtools.sourceediting by eclipse.
the class BoxEditPart method addFeedback.
public void addFeedback() {
BoxFigure boxFigure = (BoxFigure) figure;
LineBorder boxFigureLineBorder = (LineBorder) boxFigure.getBorder();
boxFigureLineBorder.setWidth(2);
boxFigureLineBorder.setColor(ColorConstants.darkBlue);
boxFigure.getHeadingFigure().setSelected(true);
figure.repaint();
super.addFeedback();
}
Aggregations