use of org.eclipse.wst.xsd.ui.internal.adt.design.figures.IStructureFigure in project webtools.sourceediting by eclipse.
the class XSDEditPartFactory method createStructureFigure.
public IStructureFigure createStructureFigure(Object model) {
IStructureFigure figure = delegate.createStructureFigure(model);
if (model instanceof XSDBaseAdapter) {
XSDConcreteComponent comp = (XSDConcreteComponent) ((XSDBaseAdapter) model).getTarget();
boolean isReadOnly = ((XSDBaseAdapter) model).isReadOnly();
figure.getNameLabel().setIcon(XSDCommonUIUtils.getUpdatedImage(comp, ((XSDBaseAdapter) model).getImage(), isReadOnly));
}
return figure;
}
use of org.eclipse.wst.xsd.ui.internal.adt.design.figures.IStructureFigure in project webtools.sourceediting by eclipse.
the class FieldFigure method editPartAttached.
public void editPartAttached(EditPart owner) {
StructureEditPart structureEditPart = null;
for (EditPart parent = owner.getParent(); parent != null; parent = parent.getParent()) {
if (parent instanceof StructureEditPart) {
structureEditPart = (StructureEditPart) parent;
break;
}
}
RowLayout rowLayout = (RowLayout) rowFigure.getLayoutManager();
IStructureFigure typeFigure = structureEditPart.getStructureFigure();
Assert.isTrue(typeFigure instanceof StructureFigure, "Expected object of type StructureFigure");
rowLayout.setColumnData(((StructureFigure) typeFigure).getColumnData());
}
use of org.eclipse.wst.xsd.ui.internal.adt.design.figures.IStructureFigure in project webtools.sourceediting by eclipse.
the class CompartmentFigure method editPartAttached.
public void editPartAttached(EditPart owner) {
StructureEditPart structureEditPart = null;
for (EditPart parent = owner.getParent(); parent != null; parent = parent.getParent()) {
if (parent instanceof StructureEditPart) {
structureEditPart = (StructureEditPart) parent;
break;
}
}
RowLayout rowLayout = (RowLayout) rowFigure.getLayoutManager();
IStructureFigure typeFigure = structureEditPart.getStructureFigure();
Assert.isTrue(typeFigure instanceof StructureFigure, "Expected object of type StructureFigure");
rowLayout.setColumnData(((StructureFigure) typeFigure).getColumnData());
}
use of org.eclipse.wst.xsd.ui.internal.adt.design.figures.IStructureFigure in project webtools.sourceediting by eclipse.
the class TypeVizFigureFactory method createStructureFigure.
public IStructureFigure createStructureFigure(Object model) {
StructureFigure figure = new StructureFigure();
figure.setBorder(new LineBorder(1));
ToolbarLayout toolbarLayout = new ToolbarLayout();
toolbarLayout.setStretchMinorAxis(true);
figure.setLayoutManager(toolbarLayout);
if (model instanceof ITreeElement) {
figure.getNameLabel().setIcon(((ITreeElement) model).getImage());
}
// we should organize ITreeElement and integrate it with the facade
return figure;
}
Aggregations