use of org.knime.workbench.editor2.figures.NodeAnnotationFigure in project knime-core by knime.
the class AnnotationEditPart method performEdit.
/**
* Opens the editor to directoy edit the annotation in place.
*/
public void performEdit() {
final EditPart parent = getParent();
if (parent instanceof WorkflowRootEditPart) {
WorkflowRootEditPart wkfRootEdit = (WorkflowRootEditPart) parent;
if (wkfRootEdit.getWorkflowManager().isWriteProtected()) {
return;
}
}
if (m_directEditManager == null) {
m_directEditManager = new AnnotationEditManager(this, new StyledTextEditorLocator((NodeAnnotationFigure) getFigure()));
}
m_directEditManager.show();
}
use of org.knime.workbench.editor2.figures.NodeAnnotationFigure in project knime-core by knime.
the class AnnotationEditPart method nodeUIInformationChanged.
/**
* {@inheritDoc}
*/
@Override
public void nodeUIInformationChanged(final NodeUIInformationEvent evt) {
Annotation anno = getModel();
NodeAnnotationFigure annoFig = (NodeAnnotationFigure) getFigure();
annoFig.newContent(anno);
WorkflowRootEditPart parent = (WorkflowRootEditPart) getParent();
parent.setLayoutConstraint(this, getFigure(), new Rectangle(anno.getX(), anno.getY(), anno.getWidth(), anno.getHeight()));
refreshVisuals();
parent.refresh();
}
use of org.knime.workbench.editor2.figures.NodeAnnotationFigure in project knime-core by knime.
the class AnnotationEditPart method createFigure.
/**
* {@inheritDoc}
*/
@Override
protected IFigure createFigure() {
Annotation anno = getModel();
NodeAnnotationFigure f = new WorkflowAnnotationFigure(anno);
if (anno instanceof WorkflowAnnotation) {
f.setBounds(new Rectangle(anno.getX(), anno.getY(), anno.getWidth(), anno.getHeight()));
}
return f;
}
use of org.knime.workbench.editor2.figures.NodeAnnotationFigure in project knime-core by knime.
the class AnnotationEditPart method propertyChange.
/**
* {@inheritDoc}
*/
@Override
public void propertyChange(final PropertyChangeEvent p) {
if (p.getProperty().equals(PreferenceConstants.P_DEFAULT_NODE_LABEL) || p.getProperty().equals(PreferenceConstants.P_ANNOTATION_BORDER_SIZE)) {
NodeAnnotationFigure fig = (NodeAnnotationFigure) getFigure();
fig.newContent(getModel());
}
}
use of org.knime.workbench.editor2.figures.NodeAnnotationFigure in project knime-core by knime.
the class NodeAnnotationEditPart method createFigure.
/**
* {@inheritDoc}
*/
@Override
protected IFigure createFigure() {
Annotation anno = getModel();
NodeAnnotationFigure f = new NodeAnnotationFigure(anno);
return f;
}
Aggregations