use of org.knime.core.node.workflow.AnnotationData in project knime-core by knime.
the class WorkflowAnnotationFigure method newContent.
@Override
public void newContent(final Annotation annotation) {
super.newContent(annotation);
AnnotationData data = annotation.getData();
Color bg = AnnotationEditPart.RGBintToColor(data.getBgColor());
setBackgroundColor(bg);
m_page.setBackgroundColor(bg);
// set border with specified annotation color
if (data.getBorderSize() > 0) {
Color col = AnnotationEditPart.RGBintToColor(data.getBorderColor());
m_page.setBorder(new LineBorder(col, data.getBorderSize()));
} else {
m_page.setBorder(null);
}
}
Aggregations