A TreeCellEditor. You need to supply an instance of DefaultTreeCellRenderer so that the icons can be obtained. You can optionally supply a TreeCellEditor that will be layed out according to the icon in the DefaultTreeCellRenderer. If you do not supply a TreeCellEditor, a TextField will be used. Editing is started on a triple mouse click, or after a click, pause, click and a delay of 1200 milliseconds.
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 applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.
A TreeCellEditor. You need to supply an instance of DefaultTreeCellRenderer so that the icons can be obtained. You can optionally supply a TreeCellEditor that will be layed out according to the icon in the DefaultTreeCellRenderer. If you do not supply a TreeCellEditor, a TextField will be used. Editing is started on a triple mouse click, or after a click, pause, click and a delay of 1200 milliseconds. 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 applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.
(->default-tree-cell-editor tree renderer)
(->default-tree-cell-editor tree renderer editor)
Constructor.
Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and the specified editor. (Use this constructor for specialized editing.)
tree - a JTree object - javax.swing.JTree
renderer - a DefaultTreeCellRenderer object - javax.swing.tree.DefaultTreeCellRenderer
editor - a TreeCellEditor object - javax.swing.tree.TreeCellEditor
Constructor. Constructs a DefaultTreeCellEditor object for a JTree using the specified renderer and the specified editor. (Use this constructor for specialized editing.) tree - a JTree object - `javax.swing.JTree` renderer - a DefaultTreeCellRenderer object - `javax.swing.tree.DefaultTreeCellRenderer` editor - a TreeCellEditor object - `javax.swing.tree.TreeCellEditor`
(action-performed this e)
Messaged when the timer fires, this will start the editing session.
e - java.awt.event.ActionEvent
Messaged when the timer fires, this will start the editing session. e - `java.awt.event.ActionEvent`
(add-cell-editor-listener this l)
Adds the CellEditorListener.
l - the listener to be added - javax.swing.event.CellEditorListener
Adds the CellEditorListener. l - the listener to be added - `javax.swing.event.CellEditorListener`
(cancel-cell-editing this)
Messages cancelCellEditing to the realEditor and removes it from this instance.
Messages cancelCellEditing to the realEditor and removes it from this instance.
(cell-editable? this event)
If the realEditor returns true to this message, prepareForEditing is messaged and true is returned.
event - the event the editor should use to consider whether to begin editing or not - java.util.EventObject
returns: true if editing can be started - boolean
If the realEditor returns true to this message, prepareForEditing is messaged and true is returned. event - the event the editor should use to consider whether to begin editing or not - `java.util.EventObject` returns: true if editing can be started - `boolean`
(get-border-selection-color this)
Returns the color the border is drawn.
returns: the border selection color - java.awt.Color
Returns the color the border is drawn. returns: the border selection color - `java.awt.Color`
(get-cell-editor-listeners this)
Returns an array of all the CellEditorListeners added to this DefaultTreeCellEditor with addCellEditorListener().
returns: all of the CellEditorListeners added or an empty
array if no listeners have been added - javax.swing.event.CellEditorListener[]
Returns an array of all the CellEditorListeners added to this DefaultTreeCellEditor with addCellEditorListener(). returns: all of the CellEditorListeners added or an empty array if no listeners have been added - `javax.swing.event.CellEditorListener[]`
(get-cell-editor-value this)
Returns the value currently being edited.
returns: the value currently being edited - java.lang.Object
Returns the value currently being edited. returns: the value currently being edited - `java.lang.Object`
(get-font this)
Gets the font used for editing.
returns: the editing Font - java.awt.Font
Gets the font used for editing. returns: the editing Font - `java.awt.Font`
(get-tree-cell-editor-component this tree value is-selected expanded leaf row)
Configures the editor. Passed onto the realEditor.
tree - the JTree that is asking the editor to edit; this parameter can be null - javax.swing.JTree
value - the value of the cell to be edited - java.lang.Object
is-selected - true if the cell is to be rendered with selection highlighting - boolean
expanded - true if the node is expanded - boolean
leaf - true if the node is a leaf node - boolean
row - the row index of the node being edited - int
returns: the component for editing - java.awt.Component
Configures the editor. Passed onto the realEditor. tree - the JTree that is asking the editor to edit; this parameter can be null - `javax.swing.JTree` value - the value of the cell to be edited - `java.lang.Object` is-selected - true if the cell is to be rendered with selection highlighting - `boolean` expanded - true if the node is expanded - `boolean` leaf - true if the node is a leaf node - `boolean` row - the row index of the node being edited - `int` returns: the component for editing - `java.awt.Component`
(remove-cell-editor-listener this l)
Removes the previously added CellEditorListener.
l - the listener to be removed - javax.swing.event.CellEditorListener
Removes the previously added CellEditorListener. l - the listener to be removed - `javax.swing.event.CellEditorListener`
(set-border-selection-color this new-color)
Sets the color to use for the border.
new-color - the new border color - java.awt.Color
Sets the color to use for the border. new-color - the new border color - `java.awt.Color`
(set-font this 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 instantiated with. If null for an editor was passed in a default editor will be created that will pick up this font.
font - the editing Font - java.awt.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 instantiated with. If null for an editor was passed in a default editor will be created that will pick up this font. font - the editing Font - `java.awt.Font`
(should-select-cell? this event)
Messages the realEditor for the return value.
event - the event the editor should use to start editing - java.util.EventObject
returns: true if the editor would like the editing cell to be selected;
otherwise returns false - boolean
Messages the realEditor for the return value. event - the event the editor should use to start editing - `java.util.EventObject` returns: true if the editor would like the editing cell to be selected; otherwise returns false - `boolean`
(stop-cell-editing this)
If the realEditor will allow editing to stop, the realEditor is removed and true is returned, otherwise false is returned.
returns: true if editing was stopped; false otherwise - boolean
If the realEditor will allow editing to stop, the realEditor is removed and true is returned, otherwise false is returned. returns: true if editing was stopped; false otherwise - `boolean`
(value-changed this e)
Resets lastPath.
e - the event that characterizes the change. - javax.swing.event.TreeSelectionEvent
Resets lastPath. e - the event that characterizes the change. - `javax.swing.event.TreeSelectionEvent`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close