org.jgraph.graph.DefaultGraphCellEditor Class Reference

Inheritance diagram for org.jgraph.graph.DefaultGraphCellEditor:

org.jgraph.graph.GraphCellEditor org.jgraph.event.GraphSelectionListener List of all members.

Public Member Functions

 DefaultGraphCellEditor ()
 DefaultGraphCellEditor (GraphCellEditor editor)
void setBorderSelectionColor (Color newColor)
Color getBorderSelectionColor ()
void setFont (Font font)
Font getFont ()
Component getGraphCellEditorComponent (JGraph graph, Object cell, boolean isSelected)
Object getCellEditorValue ()
boolean isCellEditable (EventObject event)
boolean shouldSelectCell (EventObject event)
boolean stopCellEditing ()
void cancelCellEditing ()
void addCellEditorListener (CellEditorListener l)
void removeCellEditorListener (CellEditorListener l)
void valueChanged (GraphSelectionEvent e)
void actionPerformed (ActionEvent e)

Protected Member Functions

void setGraph (JGraph newGraph)
boolean shouldStartEditingTimer (EventObject event)
boolean canEditImmediately (EventObject event)
boolean inHitRegion (double x, double y)
void determineOffset (JGraph graph, Object value, boolean isSelected)
void prepareForEditing ()
Container createContainer ()
GraphCellEditor createGraphCellEditor ()

Protected Attributes

GraphCellEditor realEditor
Container editingContainer
transient Component editingComponent
boolean canEdit
transient int offsetX
transient int offsetY
transient JGraph graph
transient Object lastCell
Color borderSelectionColor
transient Icon editingIcon
Font font

Private Member Functions

void writeObject (ObjectOutputStream s) throws IOException
void readObject (ObjectInputStream s) throws IOException, ClassNotFoundException

Classes

class  DefaultTextField
class  EditorContainer

Constructor & Destructor Documentation

org.jgraph.graph.DefaultGraphCellEditor.DefaultGraphCellEditor  ) 
 

Constructs a DefaultTreeCellEditor object for a JGraph using the specified renderer and a default editor. (Use this constructor for normal editing.)

org.jgraph.graph.DefaultGraphCellEditor.DefaultGraphCellEditor GraphCellEditor  editor  ) 
 

Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and the specified editor. (Use this constructor for specialized editing.)

Parameters:
editor a TreeCellEditor object


Member Function Documentation

void org.jgraph.graph.DefaultGraphCellEditor.actionPerformed ActionEvent  e  ) 
 

Messaged when the timer fires, this will start the editing session.

void org.jgraph.graph.DefaultGraphCellEditor.addCellEditorListener CellEditorListener  l  ) 
 

Adds the CellEditorListener.

void org.jgraph.graph.DefaultGraphCellEditor.cancelCellEditing  ) 
 

Messages cancelCellEditing to the realEditor and removes it from this instance.

boolean org.jgraph.graph.DefaultGraphCellEditor.canEditImmediately EventObject  event  )  [protected]
 

Returns true if manas.event is null, or it is a MouseEvent with a click count > 2 and inHitRegion returns true.

Container org.jgraph.graph.DefaultGraphCellEditor.createContainer  )  [protected]
 

Creates the container to manage placement of editingComponent.

GraphCellEditor org.jgraph.graph.DefaultGraphCellEditor.createGraphCellEditor  )  [protected]
 

This is invoked if a TreeCellEditor is not supplied in the constructor. It returns a TextField editor.

void org.jgraph.graph.DefaultGraphCellEditor.determineOffset JGraph  graph,
Object  value,
boolean  isSelected
[protected]
 

Color org.jgraph.graph.DefaultGraphCellEditor.getBorderSelectionColor  ) 
 

Returns the color the border is drawn.

Object org.jgraph.graph.DefaultGraphCellEditor.getCellEditorValue  ) 
 

Returns the value currently being edited.

Font org.jgraph.graph.DefaultGraphCellEditor.getFont  ) 
 

Gets the font used for editing.

Returns:
the editing Font
See also:
setFont

Component org.jgraph.graph.DefaultGraphCellEditor.getGraphCellEditorComponent JGraph  graph,
Object  cell,
boolean  isSelected
 

Configures the editor. Passed onto the realEditor.

Implements org.jgraph.graph.GraphCellEditor.

boolean org.jgraph.graph.DefaultGraphCellEditor.inHitRegion double  x,
double  y
[protected]
 

Should return true if the passed in location is a valid mouse location to start editing from. This is implemented to return false if x is <= the width of the icon and icon gap displayed by the renderer. In other words this returns true if the user clicks over the text part displayed by the renderer, and false otherwise.

boolean org.jgraph.graph.DefaultGraphCellEditor.isCellEditable EventObject  event  ) 
 

If the realEditor returns true to this message, prepareForEditing is messaged and true is returned.

void org.jgraph.graph.DefaultGraphCellEditor.prepareForEditing  )  [protected]
 

Invoked just before editing is to start. Will add the editingComponent to the editingContainer.

void org.jgraph.graph.DefaultGraphCellEditor.readObject ObjectInputStream  s  )  throws IOException, ClassNotFoundException [private]
 

void org.jgraph.graph.DefaultGraphCellEditor.removeCellEditorListener CellEditorListener  l  ) 
 

Removes the previously added CellEditorListener l.

void org.jgraph.graph.DefaultGraphCellEditor.setBorderSelectionColor Color  newColor  ) 
 

Sets the color to use for the border.

void org.jgraph.graph.DefaultGraphCellEditor.setFont Font  font  ) 
 

Sets the font to edit with. null indicates the renderers font should be used. This will NOT override any font you have set in the editor the receiver was instantied with. If null for an editor was passed in a default editor will be created that will pick up this font.

Parameters:
font the editing Font
See also:
getFont

void org.jgraph.graph.DefaultGraphCellEditor.setGraph JGraph  newGraph  )  [protected]
 

Sets the tree currently editing for. This is needed to add a selection listener.

boolean org.jgraph.graph.DefaultGraphCellEditor.shouldSelectCell EventObject  event  ) 
 

Messages the realEditor for the return value.

boolean org.jgraph.graph.DefaultGraphCellEditor.shouldStartEditingTimer EventObject  event  )  [protected]
 

Returns true if manas.event is a MouseEvent and the click count is 1.

boolean org.jgraph.graph.DefaultGraphCellEditor.stopCellEditing  ) 
 

If the realEditor will allow editing to stop, the realEditor is removed and true is returned, otherwise false is returned.

void org.jgraph.graph.DefaultGraphCellEditor.valueChanged GraphSelectionEvent  e  ) 
 

Resets lastPath.

Implements org.jgraph.event.GraphSelectionListener.

void org.jgraph.graph.DefaultGraphCellEditor.writeObject ObjectOutputStream  s  )  throws IOException [private]
 


Member Data Documentation

Color org.jgraph.graph.DefaultGraphCellEditor.borderSelectionColor [protected]
 

True if the border selection color should be drawn.

boolean org.jgraph.graph.DefaultGraphCellEditor.canEdit [protected]
 

Internal Note, maybe isCellEditable return true. This is set in configure based on the path being edited and the selected selected path.

transient Component org.jgraph.graph.DefaultGraphCellEditor.editingComponent [protected]
 

Component used in editing, obtained from the editingContainer.

Container org.jgraph.graph.DefaultGraphCellEditor.editingContainer [protected]
 

Editing container, will contain the editorComponent.

transient Icon org.jgraph.graph.DefaultGraphCellEditor.editingIcon [protected]
 

Icon to use when editing.

Font org.jgraph.graph.DefaultGraphCellEditor.font [protected]
 

Font to paint with, null indicates font of renderer is to be used.

transient JGraph org.jgraph.graph.DefaultGraphCellEditor.graph [protected]
 

JTree instance listening too.

transient Object org.jgraph.graph.DefaultGraphCellEditor.lastCell [protected]
 

last path that was selected.

transient int org.jgraph.graph.DefaultGraphCellEditor.offsetX [protected]
 

Used in editing. Indicates position to place editingComponent.

transient int org.jgraph.graph.DefaultGraphCellEditor.offsetY [protected]
 

GraphCellEditor org.jgraph.graph.DefaultGraphCellEditor.realEditor [protected]
 

Editor handling the editing.


The documentation for this class was generated from the following file:
Generated on Sun May 28 19:13:14 2006 for Digimod by  doxygen 1.4.6-NO