use of org.whole.lang.ui.figures.EntityLabel in project whole by wholeplatform.
the class XsiSimpleElementPart method createLabel.
protected EntityLabel createLabel() {
if (tagName == null)
tagName = MappingStrategyUtils.getElementNCName(getModelEntity());
EntityLabel label = LabelFactory.createContent(tagName);
label.setIcon(NotationImages.XML_TAG16);
return label;
}
use of org.whole.lang.ui.figures.EntityLabel in project whole by wholeplatform.
the class DataEntityTreeTableFigure method createDataFigure.
protected IEntityFigure createDataFigure() {
EntityLabel figure = LabelFactory.createLiteral();
figure.setBorder(new MarginBorder(1, 5, 1, 5));
return figure;
}
use of org.whole.lang.ui.figures.EntityLabel 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;
}
Aggregations