Search in sources :

Example 11 with ITreeElement

use of org.eclipse.wst.xsd.ui.internal.adt.outline.ITreeElement 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;
}
Also used : ToolbarLayout(org.eclipse.draw2d.ToolbarLayout) IStructureFigure(org.eclipse.wst.xsd.ui.internal.adt.design.figures.IStructureFigure) LineBorder(org.eclipse.draw2d.LineBorder) ITreeElement(org.eclipse.wst.xsd.ui.internal.adt.outline.ITreeElement)

Aggregations

ITreeElement (org.eclipse.wst.xsd.ui.internal.adt.outline.ITreeElement)11 ArrayList (java.util.ArrayList)9 List (java.util.List)9 Iterator (java.util.Iterator)3 IADTObject (org.eclipse.wst.xsd.ui.internal.adt.facade.IADTObject)3 XSDModelGroup (org.eclipse.xsd.XSDModelGroup)3 XSDWildcard (org.eclipse.xsd.XSDWildcard)3 LineBorder (org.eclipse.draw2d.LineBorder)2 ToolbarLayout (org.eclipse.draw2d.ToolbarLayout)2 XSDAttributeGroupDefinition (org.eclipse.xsd.XSDAttributeGroupDefinition)2 XSDAttributeUse (org.eclipse.xsd.XSDAttributeUse)2 XSDComplexTypeDefinition (org.eclipse.xsd.XSDComplexTypeDefinition)2 XSDElementDeclaration (org.eclipse.xsd.XSDElementDeclaration)2 XSDModelGroupDefinition (org.eclipse.xsd.XSDModelGroupDefinition)2 XSDParticle (org.eclipse.xsd.XSDParticle)2 XSDParticleContent (org.eclipse.xsd.XSDParticleContent)2 XSDSimpleTypeDefinition (org.eclipse.xsd.XSDSimpleTypeDefinition)2 XSDTypeDefinition (org.eclipse.xsd.XSDTypeDefinition)2 EList (org.eclipse.emf.common.util.EList)1 IStructureFigure (org.eclipse.wst.xsd.ui.internal.adt.design.figures.IStructureFigure)1