Search in sources :

Example 11 with RowLayout

use of org.whole.lang.ui.layout.RowLayout in project whole by wholeplatform.

the class FeatureFigureWithAttributes method initFigure.

@Override
protected void initFigure() {
    initContentPanes(3);
    EntityFigure headerFigure = new EntityFigure(new RowLayout().withSpacing(4).withMarginLeft(12));
    headerFigure.add(createContentPane(0));
    headerFigure.add(createFoldingToggle(2));
    shapeFigure = new EntityFigure(new UnderLeftLayout().withSpacing(2));
    shapeFigure.add(headerFigure);
    shapeFigure.add(createContentPane(1));
    add(shapeFigure);
    add(createContentPane(2));
}
Also used : UnderLeftLayout(org.whole.lang.ui.layout.UnderLeftLayout) EntityFigure(org.whole.lang.ui.figures.EntityFigure) RowLayout(org.whole.lang.ui.layout.RowLayout)

Example 12 with RowLayout

use of org.whole.lang.ui.layout.RowLayout in project whole by wholeplatform.

the class FeatureReferenceFigure method initFigure.

@Override
protected void initFigure() {
    initContentPanes(1);
    EntityFigure headerFigure = new EntityFigure(new RowLayout().withSpacing(4).withMarginLeft(12));
    headerFigure.add(createContentPane(0));
    headerFigure.add(linkButton = new EntityButton(null));
    add(shapeFigure = headerFigure);
}
Also used : EntityFigure(org.whole.lang.ui.figures.EntityFigure) EntityButton(org.whole.lang.ui.figures.EntityButton) RowLayout(org.whole.lang.ui.layout.RowLayout)

Example 13 with RowLayout

use of org.whole.lang.ui.layout.RowLayout in project whole by wholeplatform.

the class TreeNotationUtils method createTitleFigure.

public static EntityFigure createTitleFigure(String title, Toggle toggle) {
    EntityFigure titleFigure = new EntityFigure(new RowLayout().withSpacing(4).withMargin(2, 4, 2, 12));
    if (toggle != null)
        titleFigure.add(toggle);
    titleFigure.addDeclaration(title);
    return titleFigure;
}
Also used : EntityFigure(org.whole.lang.ui.figures.EntityFigure) RowLayout(org.whole.lang.ui.layout.RowLayout)

Example 14 with RowLayout

use of org.whole.lang.ui.layout.RowLayout in project whole by wholeplatform.

the class TreeNotationUtils method createTitleFigureWithAlpha.

public static EntityFigure createTitleFigureWithAlpha(String title, Toggle toggle) {
    EntityFigure titleFigure = new EntityFigure(new RowLayout().withSpacing(4).withMargin(2, 4, 2, 12));
    if (toggle != null)
        titleFigure.add(toggle);
    EntityLabel label = new EntityLabel() {

        public Color getLocalForegroundColor() {
            return FigureConstants.declarationsColor;
        }

        public Font getLocalFont() {
            return FigureConstants.declarationsFont;
        }

        @Override
        protected void paintFigure(Graphics g) {
            int oldAlpha = g.getAlpha();
            g.setAlpha(60);
            super.paintFigure(g);
            g.setAlpha(oldAlpha);
        }
    };
    label.setText(title);
    titleFigure.add(label);
    return titleFigure;
}
Also used : Graphics(org.eclipse.draw2d.Graphics) EntityFigure(org.whole.lang.ui.figures.EntityFigure) RowLayout(org.whole.lang.ui.layout.RowLayout) EntityLabel(org.whole.lang.ui.figures.EntityLabel)

Aggregations

RowLayout (org.whole.lang.ui.layout.RowLayout)14 EntityFigure (org.whole.lang.ui.figures.EntityFigure)13 IEntityFigure (org.whole.lang.ui.figures.IEntityFigure)4 Graphics (org.eclipse.draw2d.Graphics)2 IFigure (org.eclipse.draw2d.IFigure)2 EntityButton (org.whole.lang.ui.figures.EntityButton)2 EntityLabel (org.whole.lang.ui.figures.EntityLabel)2 ColumnLayout (org.whole.lang.ui.layout.ColumnLayout)2 List (java.util.List)1 MarginBorder (org.eclipse.draw2d.MarginBorder)1 Point (org.eclipse.draw2d.geometry.Point)1 Rectangle (org.eclipse.draw2d.geometry.Rectangle)1 IEntity (org.whole.lang.model.IEntity)1 FeatureDescriptor (org.whole.lang.reflect.FeatureDescriptor)1 FeatureDescriptorEnum (org.whole.lang.reflect.FeatureDescriptorEnum)1 EntityToggle (org.whole.lang.ui.figures.EntityToggle)1 StringSeparatedCompositeRowFigure (org.whole.lang.ui.figures.StringSeparatedCompositeRowFigure)1 TypeNameValueTableRowFigure (org.whole.lang.ui.figures.TypeNameValueTableRowFigure)1 ICompositeEntityLayout (org.whole.lang.ui.layout.ICompositeEntityLayout)1 UnderColumnLayout (org.whole.lang.ui.layout.UnderColumnLayout)1