JGraph X 0.15.0.3


com.mxgraph.swing.view
Class mxCellEditor

java.lang.Object
  extended by com.mxgraph.swing.view.mxCellEditor
All Implemented Interfaces:
mxICellEditor

public class mxCellEditor
extends Object
implements mxICellEditor


Field Summary
static int DEFAULT_MIN_HEIGHT
           
static int DEFAULT_MIN_WIDTH
           
static double DEFAULT_MINIMUM_EDITOR_SCALE
           
protected  Object editingCell
           
protected  JEditorPane editorPane
          Holds the editor for HTML editing.
protected  mxGraphComponent graphComponent
           
protected  KeyAdapter keyListener
           
protected  double minimumEditorScale
          Defines the minimum scale to be used for the editor.
protected  int minimumHeight
           
protected  int minimumWidth
           
protected  boolean returnEnabled
          Specifies if the enter keystroke should stop editing and accept the new value.
protected  JScrollPane scrollPane
           
protected  JTextArea textArea
          Holds the editor for plain text editing.
protected  EventObject trigger
           
 
Constructor Summary
mxCellEditor(mxGraphComponent graphComponent)
           
 
Method Summary
 String getCurrentValue()
           
 Object getEditingCell()
          Returns the cell that is currently being edited.
 Component getEditor()
          Returns the current editor or null if no editing is in progress.
 Rectangle getEditorBounds(mxCellState state)
           
 String getInitialValue(mxCellState state)
           
 double getMinimumEditorScale()
           
 int getMinimumHeight()
           
 int getMinimumWidth()
           
 boolean isReturnEnabled()
           
 void setMinimumEditorScale(double minimumEditorScale)
           
 void setMinimumHeight(int minimumHeight)
           
 void setMinimumWidth(int minimumWidth)
           
 void setReturnEnabled(boolean returnEnabled)
           
 void startEditing(Object cell, EventObject trigger)
          Starts editing the given cell.
 void stopEditing(boolean cancel)
          Stops the current editing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MIN_WIDTH

public static int DEFAULT_MIN_WIDTH

DEFAULT_MIN_HEIGHT

public static int DEFAULT_MIN_HEIGHT

DEFAULT_MINIMUM_EDITOR_SCALE

public static double DEFAULT_MINIMUM_EDITOR_SCALE

graphComponent

protected mxGraphComponent graphComponent

returnEnabled

protected boolean returnEnabled
Specifies if the enter keystroke should stop editing and accept the new value. Default is false.


minimumEditorScale

protected double minimumEditorScale
Defines the minimum scale to be used for the editor. Set this to 0 if the font size in the editor


minimumWidth

protected int minimumWidth

minimumHeight

protected int minimumHeight

editingCell

protected transient Object editingCell

trigger

protected transient EventObject trigger

scrollPane

protected transient JScrollPane scrollPane

textArea

protected transient JTextArea textArea
Holds the editor for plain text editing.


editorPane

protected transient JEditorPane editorPane
Holds the editor for HTML editing.


keyListener

protected transient KeyAdapter keyListener
Constructor Detail

mxCellEditor

public mxCellEditor(mxGraphComponent graphComponent)
Method Detail

setReturnEnabled

public void setReturnEnabled(boolean returnEnabled)

isReturnEnabled

public boolean isReturnEnabled()

getEditor

public Component getEditor()
Returns the current editor or null if no editing is in progress.


getEditorBounds

public Rectangle getEditorBounds(mxCellState state)

getInitialValue

public String getInitialValue(mxCellState state)

getCurrentValue

public String getCurrentValue()

startEditing

public void startEditing(Object cell,
                         EventObject trigger)
Description copied from interface: mxICellEditor
Starts editing the given cell.

Specified by:
startEditing in interface mxICellEditor

stopEditing

public void stopEditing(boolean cancel)
Description copied from interface: mxICellEditor
Stops the current editing.

Specified by:
stopEditing in interface mxICellEditor

getEditingCell

public Object getEditingCell()
Description copied from interface: mxICellEditor
Returns the cell that is currently being edited.

Specified by:
getEditingCell in interface mxICellEditor

getMinimumEditorScale

public double getMinimumEditorScale()
Returns:
the minimumEditorScale

setMinimumEditorScale

public void setMinimumEditorScale(double minimumEditorScale)
Parameters:
minimumEditorScale - the minimumEditorScale to set

getMinimumWidth

public int getMinimumWidth()
Returns:
the minimumWidth

setMinimumWidth

public void setMinimumWidth(int minimumWidth)
Parameters:
minimumWidth - the minimumWidth to set

getMinimumHeight

public int getMinimumHeight()
Returns:
the minimumHeight

setMinimumHeight

public void setMinimumHeight(int minimumHeight)
Parameters:
minimumHeight - the minimumHeight to set

JGraph X 0.15.0.3


Copyright (c) 2008 Gaudenz Alder. All rights reserved.