|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.java.swing.tree.DefaultTreeCellEditor
Warning: serialized objects of this class will not be compatible with future swing releases. The current serialization support is appropriate for short term storage or RMI between Swing1.0 applications. It will not be possible to load serialized Swing1.0 objects with future releases of Swing. The JDK1.2 release of Swing will be the compatibility baseline for the serialized form of Swing objects.
Inner Class Summary | |
DefaultTreeCellEditor.DefaultTextField
TextField used when no editor is supplied. |
|
DefaultTreeCellEditor.EditorContainer
Container responsible for placing the editingComponent. |
Field Summary | |
protected Color | borderSelectionColor
True if the border selection color should be drawn. |
protected boolean | canEdit
Should isCellEditable return true? |
protected Component | editingComponent
Component used in editing, obtained from the editingContainer. |
protected Container | editingContainer
Editing container, will contain the editorComponent. |
protected Icon | editingIcon
Icon to use when editing. |
protected Font | font
Font to paint with, null indicates font of renderer is to be used. |
protected TreePath | lastPath
last path that was selected. |
protected int | lastRow
Row that was last passed into getTreeCellEditorComponent. |
protected int | offset
Used in editing. |
protected TreeCellEditor | realEditor
Editor handling the editing. |
protected DefaultTreeCellRenderer | renderer
Renderer, used to get border and offsets from. |
protected Timer | timer
Used before starting the editing session. |
protected JTree | tree
JTree instance listening too. |
Constructor Summary | |
DefaultTreeCellEditor(JTree tree,
DefaultTreeCellRenderer renderer,
TreeCellEditor editor)
|
|
DefaultTreeCellEditor(JTree tree,
DefaultTreeCellRenderer renderer)
|
Method Summary | |
void | actionPerformed(ActionEvent e)
Messaged when the timer fires, this will start the editing session. |
void | addCellEditorListener(CellEditorListener l)
Adds the CellEditorListener. |
void | cancelCellEditing()
Messages cancelCellEditing to the realEditor and removes it from this instance. |
protected boolean | canEditImmediately(EventObject event)
Returns true if event is null, or it is a MouseEvent
with a click count > 2. |
protected Container | createContainer()
Creates the container to manage placement of editingComponent. |
protected TreeCellEditor | createTreeCellEditor()
This is invoked if a TreeCellEditor is not supplied in the constructor. |
protected void | determineOffset(JTree tree,
Object value,
boolean isSelected,
boolean expanded,
boolean leaf,
int row)
|
Color | getBorderSelectionColor()
Returns the color the border is drawn. |
Object | getCellEditorValue()
Returns the value currently being edited. |
Font | getFont()
|
Component | getTreeCellEditorComponent(JTree tree,
Object value,
boolean isSelected,
boolean expanded,
boolean leaf,
int row)
Configures the editor. |
protected boolean | inHitRegion(int x,
int y)
Returns true if x is inside the text region of
the renderer, not the icon part. |
boolean | isCellEditable(EventObject event)
If the realEditor returns true to this message, prepareForEditing is messaged and true is returned. |
protected void | prepareForEditing()
|
void | removeCellEditorListener(CellEditorListener l)
Removes the previously added CellEditorListener l. |
void | setBorderSelectionColor(Color newColor)
Sets the color to use for the border. |
void | setFont(Font font)
Sets the font to edit with. null indicates the renderers font should be used. |
protected void | setTree(JTree newTree)
Sets the tree currently editing for. |
boolean | shouldSelectCell(EventObject event)
Messages the realEditor for the return value. |
protected boolean | shouldStartEditingTimer(EventObject event)
Returns true if event is a MouseEvent and the click
count is 1. |
protected void | startEditingTimer()
Starts the editing timer. |
boolean | stopCellEditing()
If the realEditor will allow editing to stop, the realEditor is removed and true is returned, otherwise false is returned. |
void | valueChanged(TreeSelectionEvent e)
Resets lastPath. |
Methods inherited from class java.lang.Object | |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
Field Detail |
protected TreeCellEditor realEditor
protected DefaultTreeCellRenderer renderer
protected Container editingContainer
protected transient Component editingComponent
protected boolean canEdit
protected transient int offset
protected transient JTree tree
protected transient TreePath lastPath
protected transient Timer timer
protected transient int lastRow
protected Color borderSelectionColor
protected transient Icon editingIcon
protected Font font
Constructor Detail |
public DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer)
public DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer, TreeCellEditor editor)
Method Detail |
public void setBorderSelectionColor(Color newColor)
public Color getBorderSelectionColor()
public void setFont(Font font)
public Font getFont()
public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
public Object getCellEditorValue()
public boolean isCellEditable(EventObject event)
public boolean shouldSelectCell(EventObject event)
public boolean stopCellEditing()
public void cancelCellEditing()
public void addCellEditorListener(CellEditorListener l)
public void removeCellEditorListener(CellEditorListener l)
public void valueChanged(TreeSelectionEvent e)
public void actionPerformed(ActionEvent e)
protected void setTree(JTree newTree)
protected boolean shouldStartEditingTimer(EventObject event)
event
is a MouseEvent and the click
count is 1.protected void startEditingTimer()
protected boolean canEditImmediately(EventObject event)
event
is null, or it is a MouseEvent
with a click count > 2.protected boolean inHitRegion(int x, int y)
x
is inside the text region of
the renderer, not the icon part.protected void determineOffset(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
protected void prepareForEditing()
protected Container createContainer()
protected TreeCellEditor createTreeCellEditor()
|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |