com.dlsc.flexgantt.swing
Class DefaultTreeTableCellEditor

java.lang.Object
  extended by javax.swing.AbstractCellEditor
      extended by javax.swing.DefaultCellEditor
          extended by com.dlsc.flexgantt.swing.DefaultTreeTableCellEditor
All Implemented Interfaces:
ITreeTableCellEditor, java.io.Serializable, javax.swing.CellEditor, javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor
Direct Known Subclasses:
TreeTable.BooleanEditor, TreeTable.EnumEditor, TreeTable.NumberEditor

public class DefaultTreeTableCellEditor
extends javax.swing.DefaultCellEditor
implements ITreeTableCellEditor

A cell editor implementation that can be used for editing tree table cells and spreadsheet cells.

Since:
1.0
Author:
Dirk Lemmermann
See Also:
TreeTable.setCellEditor(Class, ITreeTableCellEditor), Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.DefaultCellEditor
javax.swing.DefaultCellEditor.EditorDelegate
 
Field Summary
 
Fields inherited from class javax.swing.DefaultCellEditor
clickCountToStart, delegate, editorComponent
 
Fields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList
 
Constructor Summary
DefaultTreeTableCellEditor(javax.swing.JCheckBox checkBox)
          Constructs a new cell editor.
DefaultTreeTableCellEditor(javax.swing.JComboBox comboBox)
          Constructs a new cell editor.
DefaultTreeTableCellEditor(javax.swing.JTextField textField)
          Constructs a new cell editor.
 
Method Summary
 java.awt.Component getTreeTableCellEditorComponent(TreeTable tree, java.lang.Object value, boolean selected, int row, int column)
          Returns the editor component that will be placed inside the cell so that the user can edit the cell's value.
 
Methods inherited from class javax.swing.DefaultCellEditor
cancelCellEditing, getCellEditorValue, getClickCountToStart, getComponent, getTableCellEditorComponent, getTreeCellEditorComponent, 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, cancelCellEditing, getCellEditorValue, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
 

Constructor Detail

DefaultTreeTableCellEditor

public DefaultTreeTableCellEditor(javax.swing.JTextField textField)
Constructs a new cell editor.

Parameters:
textField - the text field that will be used for editing the cell value
Since:
1.0

DefaultTreeTableCellEditor

public DefaultTreeTableCellEditor(javax.swing.JCheckBox checkBox)
Constructs a new cell editor.

Parameters:
checkBox - the checkbox that will be used for editing the cell value
Since:
1.0

DefaultTreeTableCellEditor

public DefaultTreeTableCellEditor(javax.swing.JComboBox comboBox)
Constructs a new cell editor.

Parameters:
comboBox - the combo box that will be used for editing the cell value
Since:
1.0
Method Detail

getTreeTableCellEditorComponent

public java.awt.Component getTreeTableCellEditorComponent(TreeTable tree,
                                                          java.lang.Object value,
                                                          boolean selected,
                                                          int row,
                                                          int column)
Description copied from interface: ITreeTableCellEditor
Returns the editor component that will be placed inside the cell so that the user can edit the cell's value.

Specified by:
getTreeTableCellEditorComponent in interface ITreeTableCellEditor
Parameters:
tree - the tree table component to which the editor component will be added
value - the current value shown in the tree table cell
selected - a flag that signals whether the row in which the cell is located is currently selected
row - the row in which the cell is located
column - the column in which the cell is located
Returns:
a component used for editing the value of the given tree table cell