javax.swing.tree

Class DefaultTreeCellEditor

Implemented Interfaces:
ActionListener, CellEditor, EventListener, TreeCellEditor, TreeSelectionListener

public class DefaultTreeCellEditor
extends Object
implements ActionListener, TreeCellEditor, TreeSelectionListener

DefaultTreeCellEditor

Nested Class Summary

class
DefaultTreeCellEditor.DefaultTextField
DefaultTextField
class
DefaultTreeCellEditor.EditorContainer
EditorContainer

Field Summary

protected Color
borderSelectionColor
borderSelectionColor
protected boolean
canEdit
canEdit
protected Component
editingComponent
editingComponent
protected Container
editingContainer
editingContainer
protected Icon
editingIcon
editingIcon
protected Font
font
font
protected TreePath
lastPath
lastPath
protected int
lastRow
lastRow
protected int
offset
offset
protected TreeCellEditor
realEditor
realEditor
protected DefaultTreeCellRenderer
renderer
renderer
protected Timer
timer
timer
protected JTree
tree
tree

Constructor Summary

DefaultTreeCellEditor(JTree value0, DefaultTreeCellRenderer value1)
Constructor DefaultTreeCellEditor
DefaultTreeCellEditor(JTree value0, DefaultTreeCellRenderer value1, TreeCellEditor value2)
Constructor DefaultTreeCellEditor

Method Summary

void
actionPerformed(ActionEvent value0)
actionPerformed
void
addCellEditorListener(CellEditorListener listener)
Adds a CellEditorListener object to this editor.
protected boolean
canEditImmediately(EventObject value0)
canEditImmediately
void
cancelCellEditing()
cancelCellEditing
protected Container
createContainer()
createContainer
protected TreeCellEditor
createTreeCellEditor()
createTreeCellEditor
protected void
determineOffset(JTree value0, Object value1, boolean value2, boolean value3, boolean value4, int value5)
determineOffset
Color
getBorderSelectionColor()
getBorderSelectionColor
CellEditorListener[]
getCellEditorListeners()
Returns all added CellEditorListener objects to this editor.
Object
getCellEditorValue()
getCellEditorValue
Font
getFont()
getFont
Component
getTreeCellEditorComponent(JTree value0, Object value1, boolean value2, boolean value3, boolean value4, int value5)
getTreeCellEditorComponent
protected boolean
inHitRegion(int value0, int value1)
inHitRegion
boolean
isCellEditable(EventObject value0)
isCellEditable
protected void
prepareForEditing()
prepareForEditing
void
removeCellEditorListener(CellEditorListener listener)
Removes a CellEditorListener object.
void
setBorderSelectionColor(Color value0)
setBorderSelectionColor
void
setFont(Font value0)
setFont
protected void
setTree(JTree value0)
setTree
boolean
shouldSelectCell(EventObject value0)
shouldSelectCell
protected boolean
shouldStartEditingTimer(EventObject value0)
shouldStartEditingTimer
protected void
startEditingTimer()
startEditingTimer
boolean
stopCellEditing()
stopCellEditing
void
valueChanged(TreeSelectionEvent value0)
valueChanged

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

borderSelectionColor

protected Color borderSelectionColor
borderSelectionColor


canEdit

protected boolean canEdit
canEdit


editingComponent

protected Component editingComponent
editingComponent


editingContainer

protected Container editingContainer
editingContainer


editingIcon

protected Icon editingIcon
editingIcon


font

protected Font font
font


lastPath

protected TreePath lastPath
lastPath


lastRow

protected int lastRow
lastRow


offset

protected int offset
offset


realEditor

protected TreeCellEditor realEditor
realEditor


renderer

protected DefaultTreeCellRenderer renderer
renderer


timer

protected Timer timer
timer


tree

protected JTree tree
tree

Constructor Details

DefaultTreeCellEditor

public DefaultTreeCellEditor(JTree value0,
                             DefaultTreeCellRenderer value1)
Constructor DefaultTreeCellEditor

Parameters:
value0 - TODO
value1 - TODO


DefaultTreeCellEditor

public DefaultTreeCellEditor(JTree value0,
                             DefaultTreeCellRenderer value1,
                             TreeCellEditor value2)
Constructor DefaultTreeCellEditor

Parameters:
value0 - TODO
value1 - TODO
value2 - TODO

Method Details

actionPerformed

public void actionPerformed(ActionEvent value0)
actionPerformed
Specified by:
actionPerformed in interface ActionListener

Parameters:
value0 - TODO


addCellEditorListener

public void addCellEditorListener(CellEditorListener listener)
Adds a CellEditorListener object to this editor.
Specified by:
addCellEditorListener in interface CellEditor

Parameters:
listener - the listener to add


canEditImmediately

protected boolean canEditImmediately(EventObject value0)
canEditImmediately

Parameters:
value0 - TODO

Returns:
boolean


cancelCellEditing

public void cancelCellEditing()
cancelCellEditing
Specified by:
cancelCellEditing in interface CellEditor


createContainer

protected Container createContainer()
createContainer

Returns:
Container


createTreeCellEditor

protected TreeCellEditor createTreeCellEditor()
createTreeCellEditor

Returns:
TreeCellEditor


determineOffset

protected void determineOffset(JTree value0,
                               Object value1,
                               boolean value2,
                               boolean value3,
                               boolean value4,
                               int value5)
determineOffset

Parameters:
value0 - TODO
value1 - TODO
value2 - TODO
value3 - TODO
value4 - TODO
value5 - TODO


getBorderSelectionColor

public Color getBorderSelectionColor()
getBorderSelectionColor

Returns:
Color


getCellEditorListeners

public CellEditorListener[] getCellEditorListeners()
Returns all added CellEditorListener objects to this editor.

Returns:
an array of listeners

Since:
1.4


getCellEditorValue

public Object getCellEditorValue()
getCellEditorValue
Specified by:
getCellEditorValue in interface CellEditor

Returns:
Object


getFont

public Font getFont()
getFont

Returns:
Font


getTreeCellEditorComponent

public Component getTreeCellEditorComponent(JTree value0,
                                            Object value1,
                                            boolean value2,
                                            boolean value3,
                                            boolean value4,
                                            int value5)
getTreeCellEditorComponent
Specified by:
getTreeCellEditorComponent in interface TreeCellEditor

Parameters:
value0 - TODO
value1 - TODO
value2 - TODO
value3 - TODO
value4 - TODO
value5 - TODO

Returns:
Component


inHitRegion

protected boolean inHitRegion(int value0,
                              int value1)
inHitRegion

Parameters:
value0 - TODO
value1 - TODO

Returns:
boolean


isCellEditable

public boolean isCellEditable(EventObject value0)
isCellEditable
Specified by:
isCellEditable in interface CellEditor

Parameters:
value0 - TODO

Returns:
boolean


prepareForEditing

protected void prepareForEditing()
prepareForEditing


removeCellEditorListener

public void removeCellEditorListener(CellEditorListener listener)
Removes a CellEditorListener object.
Specified by:
removeCellEditorListener in interface CellEditor

Parameters:
listener - the listener to remove


setBorderSelectionColor

public void setBorderSelectionColor(Color value0)
setBorderSelectionColor

Parameters:
value0 - TODO


setFont

public void setFont(Font value0)
setFont

Parameters:
value0 - TODO


setTree

protected void setTree(JTree value0)
setTree

Parameters:
value0 - TODO


shouldSelectCell

public boolean shouldSelectCell(EventObject value0)
shouldSelectCell
Specified by:
shouldSelectCell in interface CellEditor

Parameters:
value0 - TODO

Returns:
boolean


shouldStartEditingTimer

protected boolean shouldStartEditingTimer(EventObject value0)
shouldStartEditingTimer

Parameters:
value0 - TODO

Returns:
boolean


startEditingTimer

protected void startEditingTimer()
startEditingTimer


stopCellEditing

public boolean stopCellEditing()
stopCellEditing
Specified by:
stopCellEditing in interface CellEditor

Returns:
boolean


valueChanged

public void valueChanged(TreeSelectionEvent value0)
valueChanged
Specified by:
valueChanged in interface TreeSelectionListener

Parameters:
value0 - TODO


DefaultTreeCellEditor.java -- Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.