if (stopEditingInCompleteEditing
&& editingComponent != null
&& editDialog != null) {
Component oldComponent = editingComponent;
Object oldCell = editingCell;
GraphCellEditor oldEditor = cellEditor;
Object newValue = oldEditor.getCellEditorValue();
Rectangle editingBounds = graph.getCellBounds(editingCell);
boolean requestFocus =
(graph != null
&& (graph.hasFocus() || editingComponent.hasFocus()));
editingCell = null;
editingComponent = null;
if (messageStop)
oldEditor.stopCellEditing();
else if (messageCancel)
oldEditor.cancelCellEditing();
editDialog.dispose();
if (requestFocus)
graph.requestFocus();
if (messageGraph) {
Map map = GraphConstants.createMap();
GraphConstants.setValue(map, map.get("value"));
Map nested = new Hashtable();
nested.put(oldCell, map);
graphLayoutCache.edit(nested, null, null, null);
}
updateSize();
// Remove Editor Listener
if (oldEditor != null && cellEditorListener != null)
oldEditor.removeCellEditorListener(cellEditorListener);
cellEditor = null;
editDialog = null;
}
}