com.alee.utils.swing
Class WebDefaultCellEditor<C extends javax.swing.JComponent>

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

public class WebDefaultCellEditor<C extends javax.swing.JComponent>
extends javax.swing.AbstractCellEditor
implements javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor

User: mgarin Date: 31.10.12 Time: 16:24

See Also:
Serialized Form

Nested Class Summary
protected  class WebDefaultCellEditor.EditorDelegate<T>
           
 
Field Summary
protected  int clickCountToStart
           
static java.lang.String COMBOBOX_CELL_EDITOR
           
protected  WebDefaultCellEditor.EditorDelegate delegate
           
protected  C editorComponent
           
 
Fields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList
 
Constructor Summary
WebDefaultCellEditor()
           
WebDefaultCellEditor(javax.swing.JCheckBox checkBox)
           
WebDefaultCellEditor(javax.swing.JComboBox comboBox)
           
WebDefaultCellEditor(javax.swing.JTextField textField)
           
 
Method Summary
 void cancelCellEditing()
           
 java.lang.Object getCellEditorValue()
           
 int getClickCountToStart()
           
 java.awt.Component getComponent()
           
 java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
           
 java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree, java.lang.Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
           
 boolean isCellEditable(java.util.EventObject anEvent)
           
 void setClickCountToStart(int count)
           
 boolean shouldSelectCell(java.util.EventObject anEvent)
           
 boolean 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

COMBOBOX_CELL_EDITOR

public static final java.lang.String COMBOBOX_CELL_EDITOR
See Also:
Constant Field Values

editorComponent

protected C extends javax.swing.JComponent editorComponent

delegate

protected WebDefaultCellEditor.EditorDelegate delegate

clickCountToStart

protected int clickCountToStart
Constructor Detail

WebDefaultCellEditor

public WebDefaultCellEditor()

WebDefaultCellEditor

public WebDefaultCellEditor(javax.swing.JTextField textField)

WebDefaultCellEditor

public WebDefaultCellEditor(javax.swing.JCheckBox checkBox)

WebDefaultCellEditor

public WebDefaultCellEditor(javax.swing.JComboBox comboBox)
Method Detail

getComponent

public java.awt.Component getComponent()

setClickCountToStart

public void setClickCountToStart(int count)

getClickCountToStart

public int getClickCountToStart()

getCellEditorValue

public java.lang.Object getCellEditorValue()
Specified by:
getCellEditorValue in interface javax.swing.CellEditor

isCellEditable

public boolean isCellEditable(java.util.EventObject anEvent)
Specified by:
isCellEditable in interface javax.swing.CellEditor
Overrides:
isCellEditable in class javax.swing.AbstractCellEditor

shouldSelectCell

public boolean shouldSelectCell(java.util.EventObject anEvent)
Specified by:
shouldSelectCell in interface javax.swing.CellEditor
Overrides:
shouldSelectCell in class javax.swing.AbstractCellEditor

stopCellEditing

public boolean stopCellEditing()
Specified by:
stopCellEditing in interface javax.swing.CellEditor
Overrides:
stopCellEditing in class javax.swing.AbstractCellEditor

cancelCellEditing

public void cancelCellEditing()
Specified by:
cancelCellEditing in interface javax.swing.CellEditor
Overrides:
cancelCellEditing in class javax.swing.AbstractCellEditor

getTreeCellEditorComponent

public java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree,
                                                     java.lang.Object value,
                                                     boolean isSelected,
                                                     boolean expanded,
                                                     boolean leaf,
                                                     int row)
Specified by:
getTreeCellEditorComponent in interface javax.swing.tree.TreeCellEditor

getTableCellEditorComponent

public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
                                                      java.lang.Object value,
                                                      boolean isSelected,
                                                      int row,
                                                      int column)
Specified by:
getTableCellEditorComponent in interface javax.swing.table.TableCellEditor