Search in sources :

Example 1 with INotationStyling

use of org.whole.lang.ui.notations.styledtree.styling.INotationStyling in project whole by wholeplatform.

the class AdaptiveEntityPart method createFigure.

protected IFigure createFigure() {
    IEntityStyling entityStyling = getEntityStyling();
    INotationStyling notationStyling = entityStyling.getNotationStyling();
    switch(entityStyling.getKind()) {
        case DATA:
            switch(notationStyling.getEmbeddingStyle(stylingFactory, (IEntityPart) getParent(), getModelEntity())) {
                case TABLE_CELL:
                // TODO
                case NONE:
                default:
                    return new DataNodeFigure(entityStyling);
            }
        case SIMPLE:
            return new SimpleTableNodeWithBranchesFigure(true, entityStyling);
        case COMPOSITE:
        default:
            if (entityStyling.getLayoutStyle().equals(LayoutStyle.COMPOSITE_TABLE))
                return new CompositeTableFigure(entityStyling);
            else
                return new NodeWithCompositeBranchFigure(entityStyling);
    }
}
Also used : NodeWithCompositeBranchFigure(org.whole.lang.ui.notations.styledtree.figures.NodeWithCompositeBranchFigure) DataNodeFigure(org.whole.lang.ui.notations.styledtree.figures.DataNodeFigure) IEntityStyling(org.whole.lang.ui.notations.styledtree.styling.IEntityStyling) CompositeTableFigure(org.whole.lang.ui.notations.styledtree.figures.CompositeTableFigure) SimpleTableNodeWithBranchesFigure(org.whole.lang.ui.notations.styledtree.figures.SimpleTableNodeWithBranchesFigure) INotationStyling(org.whole.lang.ui.notations.styledtree.styling.INotationStyling)

Aggregations

CompositeTableFigure (org.whole.lang.ui.notations.styledtree.figures.CompositeTableFigure)1 DataNodeFigure (org.whole.lang.ui.notations.styledtree.figures.DataNodeFigure)1 NodeWithCompositeBranchFigure (org.whole.lang.ui.notations.styledtree.figures.NodeWithCompositeBranchFigure)1 SimpleTableNodeWithBranchesFigure (org.whole.lang.ui.notations.styledtree.figures.SimpleTableNodeWithBranchesFigure)1 IEntityStyling (org.whole.lang.ui.notations.styledtree.styling.IEntityStyling)1 INotationStyling (org.whole.lang.ui.notations.styledtree.styling.INotationStyling)1