return createEditor(node, editControl, text, true);
}
private EditNodeBase createEditor(final NodeModel node, final EditedComponent parent, final String text,
final IEditControl editControl) {
final ZoomableLabel parentComponent;
final MainView mainView = (MainView) getComponent(node);
final NodeView nodeView = mainView.getNodeView();
if(EditedComponent.TEXT.equals(parent))
parentComponent = mainView;
else if(EditedComponent.DETAIL.equals(parent)) {
final JComponent component = nodeView.getContent(NodeView.DETAIL_VIEWER_POSITION);
if(component instanceof ZoomableLabel)
parentComponent = (ZoomableLabel) component;
else
parentComponent = null;
}
else
parentComponent = null;
if(parentComponent == null || ! parentComponent.isVisible()){
return null;
}
final EditNodeTextField textField = new EditNodeTextField(node, (ZoomableLabel) parentComponent, text, editControl);
if(EditedComponent.TEXT.equals(parent))
textField.setBackground (nodeView.getTextBackground());