use of org.eclipse.wst.xsd.ui.internal.adt.typeviz.design.figures.HeadingFigure 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;
}
use of org.eclipse.wst.xsd.ui.internal.adt.typeviz.design.figures.HeadingFigure in project webtools.sourceediting by eclipse.
the class CategoryEditPart method createHeadingFigure.
protected void createHeadingFigure() {
headingFigure = new HeadingFigure();
outerPane.add(headingFigure);
headingFigure.getLabel().setText(((CategoryAdapter) getModel()).getText());
headingFigure.getLabel().setIcon(((CategoryAdapter) getModel()).getImage());
}
use of org.eclipse.wst.xsd.ui.internal.adt.typeviz.design.figures.HeadingFigure in project webtools.sourceediting by eclipse.
the class XSDSimpleTypeEditPart method refreshVisuals.
protected void refreshVisuals() {
XSDSimpleTypeDefinitionAdapter adapter = (XSDSimpleTypeDefinitionAdapter) getModel();
String name = adapter.getDisplayName();
HeadingFigure headingFigure = figure.getHeadingFigure();
headingFigure.setIsReadOnly(adapter.isReadOnly());
Label label = headingFigure.getLabel();
label.setText(name);
label.setIcon(XSDCommonUIUtils.getUpdatedImage(adapter.getXSDTypeDefinition(), adapter.getImage(), adapter.isReadOnly()));
}
Aggregations