use of org.whole.lang.ui.figures.StringSeparatedCompositeColumnFigure in project whole by wholeplatform.
the class CartesianProductPart method createFigure.
protected IFigure createFigure() {
IFigure figure = new StringSeparatedCompositeColumnFigure("\u00d7", 10);
figure.setBorder(new RoundBracketsBorder());
return figure;
}
use of org.whole.lang.ui.figures.StringSeparatedCompositeColumnFigure in project whole by wholeplatform.
the class PointwiseProductPart method createFigure.
protected IFigure createFigure() {
// \u2219
IFigure figure = new StringSeparatedCompositeColumnFigure("\u2022", 10);
figure.setBorder(new RoundBracketsBorder());
return figure;
}
use of org.whole.lang.ui.figures.StringSeparatedCompositeColumnFigure in project whole by wholeplatform.
the class GrammarBasedUIUtils method createCompositeFigure.
public static IEntityFigure createCompositeFigure(IEntity entity) {
ILanguageKit lk = entity.wGetLanguageKit();
EntityDescriptorEnum edEnum = lk.getEntityDescriptorEnum();
FeatureDescriptorEnum fdEnum = lk.getFeatureDescriptorEnum();
IEntity configuration = Matcher.findAncestor(edEnum.valueOf("CompositePart"), entity);
IEntity multiline = configuration.wGet(fdEnum.valueOf("multiline"));
boolean isMultiline = EntityUtils.safeBooleanValue(multiline, false);
IEntity columns = configuration.wGet(fdEnum.valueOf("columns"));
int columnsNum = EntityUtils.safeIntValue(columns, 0);
IEntity separator = configuration.wGet(fdEnum.valueOf("separator"));
IEntityFigure entityFigure;
if (EntityUtils.isNotResolver(separator)) {
String separatorText = GrammarBasedUIUtils.calculateSeparator(separator);
CompositeFigure compositeFigure = isMultiline ? new StringSeparatedCompositeColumnFigure(separatorText, 10) : new StringSeparatedCompositeRowFigure(separatorText, 10);
if (isMultiline)
compositeFigure.getLayoutManager().withMinorAlignment(Alignment.LEADING);
entityFigure = compositeFigure;
} else if (columnsNum > 0) {
TableFigure tableFigure = new TableFigure(columnsNum);
tableFigure.setBorder(CompositePlaceHolderBorder.OPTIONAL_VERTICAL);
entityFigure = tableFigure;
} else
entityFigure = new CompositeFigure(!isMultiline, true);
return entityFigure;
}
use of org.whole.lang.ui.figures.StringSeparatedCompositeColumnFigure in project whole by wholeplatform.
the class ProductTypePart method createFigure.
protected IFigure createFigure() {
StringSeparatedCompositeColumnFigure f = new StringSeparatedCompositeColumnFigure();
f.setBorder(new RoundBracketsBorder());
return f;
}
Aggregations