Examples of GraphCellEditor


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

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

Examples of org.jgraph.graph.GraphCellEditor

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

Examples of org.jgraph.graph.GraphCellEditor

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

Examples of org.jgraph.graph.GraphCellEditor

  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;
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.