use of com.archimatetool.editor.diagram.figures.ITextFigure in project archi by archimatetool.
the class AbstractDiagramEditor method refreshFiguresWithLabelFeature.
/**
* Refresh all figures with label features
*/
protected void refreshFiguresWithLabelFeature() {
for (Object editPart : getGraphicalViewer().getEditPartRegistry().values()) {
if (editPart instanceof GraphicalEditPart) {
IFigure figure = ((GraphicalEditPart) editPart).getFigure();
Object model = ((GraphicalEditPart) editPart).getModel();
// If it is a text figure and has a label render feature update text
if (model instanceof IDiagramModelComponent && TextRenderer.getDefault().hasFormatExpression((IDiagramModelComponent) model) && figure instanceof ITextFigure) {
((ITextFigure) figure).setText();
}
}
}
}
Aggregations