use of org.talend.commons.ui.utils.workbench.gef.SimpleHtmlFigure in project tdi-studio-se by Talend.
the class NodeLabelEditPart method createFigure.
/*
* (non-Javadoc)
*
* @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
*/
@Override
public IFigure createFigure() {
String text = ((NodeLabel) getModel()).getLabelText();
SimpleHtmlFigure htmlFig = new SimpleHtmlFigure();
htmlFig.setText(text);
if (((NodeLabel) getModel()).isActivate()) {
(htmlFig).setAlpha(-1);
} else {
(htmlFig).setAlpha(NodeLabel.ALPHA_VALUE);
}
((NodeLabel) getModel()).setLabelSize(htmlFig.getPreferredSize());
return htmlFig;
}
Aggregations