use of org.whole.lang.ui.layout.RowLayout 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);
}
use of org.whole.lang.ui.layout.RowLayout in project whole by wholeplatform.
the class GrammarBasedUIUtils method createSequenceFigure.
public static IEntityFigure createSequenceFigure(IEntity entity, ContentPaneFigure contentPaneFigure, boolean embed) {
FeatureDescriptorEnum fdEnum = entity.wGetLanguageKit().getFeatureDescriptorEnum();
IEntity multiline = entity.wGet(fdEnum.valueOf("multiline"));
ICompositeEntityLayout layout = EntityUtils.safeBooleanValue(multiline, false) ? new ColumnLayout() : new RowLayout();
// TODO complete optional behavior
IEntity optional = entity.wGet(fdEnum.valueOf("optional"));
IEntityFigure figure;
if (embed) {
contentPaneFigure.setLayoutManager(layout.withSpacing(5));
figure = contentPaneFigure;
} else
figure = new EntityFigure(layout.withSpacing(5));
IEntity childFigures = entity.wGet(fdEnum.valueOf("figures"));
for (int i = 0, size = childFigures.wSize(); i < size; i++) addChildFigure(childFigures.wGet(i), contentPaneFigure, figure);
return figure;
}
use of org.whole.lang.ui.layout.RowLayout in project whole by wholeplatform.
the class AbstractStyledFigure method initFigure.
protected void initFigure() {
initContentPanes(2);
shapeFigure = new EntityFigure(new RowLayout().withSpacing(4));
shapeFigure.add(createContentPane(0));
shapeFigure.add(createFoldingToggle(1));
add(shapeFigure);
add(createContentPane(1));
}
use of org.whole.lang.ui.layout.RowLayout in project whole by wholeplatform.
the class FeatureFigure method initFigure.
@Override
protected void initFigure() {
initContentPanes(2);
shapeFigure = new EntityFigure(new RowLayout().withSpacing(4).withMarginLeft(12));
shapeFigure.add(createContentPane(0));
shapeFigure.add(createFoldingToggle(1));
add(shapeFigure);
// TODO add view tracking support (FIXME connections painting)
// EntityFigure trackingFigure = new EntityFigure(new MonoLayout().withMajorAlignment(Alignment.CENTER).withAutoresizeWeight(1f)).withViewportTracking(ViewportTracking.VERTICAL);
// trackingFigure.add(shapeFigure);
// add(trackingFigure);
add(createContentPane(1));
}
use of org.whole.lang.ui.layout.RowLayout in project whole by wholeplatform.
the class AttributeRightFigure 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 RowLayout().withSpacing(8).withMarginLeft(12));
shapeFigure0.add(headerFigure);
shapeFigure0.add(createContentPane(2));
add(shapeFigure = shapeFigure0);
}
Aggregations