com.alee.laf.tree
Class WebTreeCellEditor<C extends javax.swing.JComponent>

java.lang.Object
  extended by javax.swing.AbstractCellEditor
      extended by com.alee.utils.swing.WebDefaultCellEditor<C>
          extended by com.alee.laf.tree.WebTreeCellEditor<C>
All Implemented Interfaces:
java.io.Serializable, javax.swing.CellEditor, javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor
Direct Known Subclasses:
DictionariesTreeEditor, SampleTreeCellEditor, WebFileTreeCellEditor

public class WebTreeCellEditor<C extends javax.swing.JComponent>
extends WebDefaultCellEditor<C>

This class provides a styled default cell editor for trees.

Author:
Mikle Garin
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.alee.utils.swing.WebDefaultCellEditor
WebDefaultCellEditor.EditorDelegate<T>
 
Field Summary
protected  boolean autoUpdateLeadingIcon
          Whether should update editor's leading icon automatically when it is possible or not.
 
Fields inherited from class com.alee.utils.swing.WebDefaultCellEditor
clickCountToStart, COMBOBOX_CELL_EDITOR, delegate, editorComponent
 
Fields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList
 
Constructor Summary
WebTreeCellEditor()
          Constructs default tree cell editor with a text field as editor.
WebTreeCellEditor(WebCheckBox checkBox)
          Constructs tree cell editor with a specified check box as editor.
WebTreeCellEditor(WebComboBox comboBox)
          Constructs tree cell editor with a specified combo box as editor.
WebTreeCellEditor(WebTextField textField)
          Constructs tree cell editor with a specified text field as editor.
 
Method Summary
 java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree, java.lang.Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
          Returns custom tree cell editor component.
 
Methods inherited from class com.alee.utils.swing.WebDefaultCellEditor
cancelCellEditing, getCellEditorValue, getClickCountToStart, getComponent, getTableCellEditorComponent, isCellEditable, setClickCountToStart, shouldSelectCell, stopCellEditing
 
Methods inherited from class javax.swing.AbstractCellEditor
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.CellEditor
addCellEditorListener, removeCellEditorListener
 

Field Detail

autoUpdateLeadingIcon

protected boolean autoUpdateLeadingIcon
Whether should update editor's leading icon automatically when it is possible or not.

Constructor Detail

WebTreeCellEditor

public WebTreeCellEditor()
Constructs default tree cell editor with a text field as editor.


WebTreeCellEditor

public WebTreeCellEditor(WebTextField textField)
Constructs tree cell editor with a specified text field as editor.

Parameters:
textField - editor textfield

WebTreeCellEditor

public WebTreeCellEditor(WebCheckBox checkBox)
Constructs tree cell editor with a specified check box as editor.

Parameters:
checkBox - editor checkbox

WebTreeCellEditor

public WebTreeCellEditor(WebComboBox comboBox)
Constructs tree cell editor with a specified combo box as editor.

Parameters:
comboBox - editor combobox
Method Detail

getTreeCellEditorComponent

public java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree,
                                                     java.lang.Object value,
                                                     boolean isSelected,
                                                     boolean expanded,
                                                     boolean leaf,
                                                     int row)
Returns custom tree cell editor component.

Specified by:
getTreeCellEditorComponent in interface javax.swing.tree.TreeCellEditor
Overrides:
getTreeCellEditorComponent in class WebDefaultCellEditor<C extends javax.swing.JComponent>
Parameters:
tree - tree
value - cell value
isSelected - whether cell is selected or not
expanded - whether cell is expanded or not
leaf - whether cell is leaf or not
row - cell row index
Returns:
cell editor component