protected void completeEditing(boolean messageStop, boolean messageCancel,
boolean messageGraph) {
if (stopEditingInCompleteEditing && editingComponent != null) {
Component oldComponent = editingComponent;
Object oldCell = editingCell;
GraphCellEditor oldEditor = cellEditor;
boolean requestFocus = (graph != null && (graph.hasFocus() || SwingUtilities
.findFocusOwner(editingComponent) != null));
editingCell = null;
editingComponent = null;
if (messageStop)
oldEditor.stopCellEditing();
else if (messageCancel)
oldEditor.cancelCellEditing();
graph.remove(oldComponent);
if (requestFocus)
graph.requestFocus();
if (messageGraph) {
Object newValue = oldEditor.getCellEditorValue();
graphLayoutCache.valueForCellChanged(oldCell, newValue);
}
updateSize();
// Remove Editor Listener
if (oldEditor != null && cellEditorListener != null)
oldEditor.removeCellEditorListener(cellEditorListener);
cellEditor = null;
}
}