Package com.jgraph.graph

Examples of com.jgraph.graph.GraphCellEditor


        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;
        }
    }
View Full Code Here


        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;
        }
    }
View Full Code Here

TOP

Related Classes of com.jgraph.graph.GraphCellEditor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.