Search in sources :

Example 6 with EntityFigure

use of org.whole.lang.ui.figures.EntityFigure in project whole by wholeplatform.

the class ToolbarActionsFigure method createActionRow.

// TODO remove
protected EntityFigure createActionRow(int paneIndex) {
    EntityFigure row = new EntityFigure(new RowLayout().withSpacing(4));
    row.add(createFoldingToggle(paneIndex));
    row.add(createContentPane(paneIndex));
    return row;
}
Also used : IEntityFigure(org.whole.lang.ui.figures.IEntityFigure) EntityFigure(org.whole.lang.ui.figures.EntityFigure) RowLayout(org.whole.lang.ui.layout.RowLayout)

Example 7 with EntityFigure

use of org.whole.lang.ui.figures.EntityFigure in project whole by wholeplatform.

the class RepetitionPart method createFigure.

protected IFigure createFigure() {
    return new TypeNameValueTableRowFigure() {

        @Override
        protected IEntityFigure createValueFigure(int paneIndex) {
            EntityFigure row = new EntityFigure(new RowLayout());
            row.add(createContentPane(paneIndex));
            row.add(LabelFactory.createSymbolMediumContentLighter("\u2026"));
            row.addContentLight(" ordered");
            return row;
        }
    };
}
Also used : TypeNameValueTableRowFigure(org.whole.lang.ui.figures.TypeNameValueTableRowFigure) IEntityFigure(org.whole.lang.ui.figures.IEntityFigure) EntityFigure(org.whole.lang.ui.figures.EntityFigure) RowLayout(org.whole.lang.ui.layout.RowLayout)

Example 8 with EntityFigure

use of org.whole.lang.ui.figures.EntityFigure in project whole by wholeplatform.

the class UnboundedPart method createFigure.

protected IFigure createFigure() {
    EntityFigure figure = new EntityFigure(new RowLayout());
    figure.addContent("maxOccurs");
    figure.addContentLight("=");
    figure.addContentLighter("\"");
    figure.addIdentifier("unbounded");
    figure.addContentLighter("\"");
    return figure;
}
Also used : EntityFigure(org.whole.lang.ui.figures.EntityFigure) RowLayout(org.whole.lang.ui.layout.RowLayout)

Example 9 with EntityFigure

use of org.whole.lang.ui.figures.EntityFigure in project whole by wholeplatform.

the class FreeformRootPart method createFigure.

protected IFigure createFigure() {
    return new EntityFigure() {

        {
            setLayoutManager(new EntityXYLayout());
            setOpaque(false);
        }

        // FIXME workaround
        public int getIndent() {
            return getInsets().left;
        }

        public int getAscent() {
            return getPreferredSize().height / 2;
        }

        public static final int MINIMUM_SIZE = 600;

        public Dimension getPreferredSize(int wHint, int hHint) {
            Dimension size = super.getPreferredSize(wHint, hHint);
            size.width = Math.max(size.width, MINIMUM_SIZE);
            size.height = Math.max(size.height, MINIMUM_SIZE);
            return size;
        }
    };
}
Also used : EntityFigure(org.whole.lang.ui.figures.EntityFigure) Dimension(org.eclipse.draw2d.geometry.Dimension) EntityXYLayout(org.whole.lang.ui.layout.EntityXYLayout)

Example 10 with EntityFigure

use of org.whole.lang.ui.figures.EntityFigure in project whole by wholeplatform.

the class AttributeDownFigure method initFigure.

@Override
protected void initFigure() {
    initContentPanes(3);
    EntityFigure headerFigure = new EntityFigure(new RowLayout().withSpacing(8));
    headerFigure.add(createContentPane(0));
    // headerFigure.addParenthesis(" (");
    headerFigure.add(createContentPane(1));
    // headerFigure.addParenthesis(")");
    EntityFigure shapeFigure0 = new EntityFigure(new UnderColumnLayout().withSpacing(4).withMarginLeft(12).withMinorAlignment(Alignment.CENTER));
    shapeFigure0.add(headerFigure);
    shapeFigure0.add(createContentPane(2));
    add(shapeFigure = shapeFigure0);
}
Also used : UnderColumnLayout(org.whole.lang.ui.layout.UnderColumnLayout) EntityFigure(org.whole.lang.ui.figures.EntityFigure) RowLayout(org.whole.lang.ui.layout.RowLayout)

Aggregations

EntityFigure (org.whole.lang.ui.figures.EntityFigure)20 RowLayout (org.whole.lang.ui.layout.RowLayout)13 IEntityFigure (org.whole.lang.ui.figures.IEntityFigure)6 IFigure (org.eclipse.draw2d.IFigure)5 EntityButton (org.whole.lang.ui.figures.EntityButton)4 Graphics (org.eclipse.draw2d.Graphics)3 Dimension (org.eclipse.draw2d.geometry.Dimension)2 IEntity (org.whole.lang.model.IEntity)2 EntityLabel (org.whole.lang.ui.figures.EntityLabel)2 ColumnLayout (org.whole.lang.ui.layout.ColumnLayout)2 EntityXYLayout (org.whole.lang.ui.layout.EntityXYLayout)2 TableRowLayout (org.whole.lang.ui.layout.TableRowLayout)2 MarginBorder (org.eclipse.draw2d.MarginBorder)1 Point (org.eclipse.draw2d.geometry.Point)1 Rectangle (org.eclipse.draw2d.geometry.Rectangle)1 RootFragment (org.whole.lang.commons.model.RootFragment)1 FeatureDescriptor (org.whole.lang.reflect.FeatureDescriptor)1 FeatureDescriptorEnum (org.whole.lang.reflect.FeatureDescriptorEnum)1 CompositeFigure (org.whole.lang.ui.figures.CompositeFigure)1 EntityToggle (org.whole.lang.ui.figures.EntityToggle)1