swingwtx.swing
Class DefaultCellEditor

java.lang.Object
  extended byswingwtx.swing.AbstractCellEditor
      extended byswingwtx.swing.DefaultCellEditor
All Implemented Interfaces:
CellEditor, TableCellEditor, TreeCellEditor

public class DefaultCellEditor
extends AbstractCellEditor
implements TableCellEditor, TreeCellEditor

Default editing class for JTree and JTable


Nested Class Summary
protected  class DefaultCellEditor.SWTEditor
          Handling class that maps details of the widget being used for editing.
 
Field Summary
protected  int clickCountToStart
           
protected  JComponent editorComponent
          The component being edited.
protected  DefaultCellEditor.SWTEditor handler
          The handling class
 
Fields inherited from class swingwtx.swing.AbstractCellEditor
listeners
 
Constructor Summary
DefaultCellEditor(JCheckBox checkBox)
           
DefaultCellEditor(JComboBox comboBox)
           
DefaultCellEditor(JTextField textField)
           
 
Method Summary
 void cancelCellEditing()
           
 java.lang.Object getCellEditorValue()
           
 int getClickCountToStart()
           
 Component getComponent()
           
 DefaultCellEditor.SWTEditor getHandler()
           
 Component getTableCellEditorComponent(JTable table, java.lang.Object value, boolean isSelected, int row, int column)
           
 Component getTreeCellEditorComponent(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 swingwtx.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 swingwtx.swing.CellEditor
addCellEditorListener, removeCellEditorListener
 

Field Detail

editorComponent

protected JComponent editorComponent
The component being edited.


clickCountToStart

protected int clickCountToStart

handler

protected DefaultCellEditor.SWTEditor handler
The handling class

Constructor Detail

DefaultCellEditor

public DefaultCellEditor(JTextField textField)

DefaultCellEditor

public DefaultCellEditor(JCheckBox checkBox)

DefaultCellEditor

public DefaultCellEditor(JComboBox comboBox)
Method Detail

getHandler

public DefaultCellEditor.SWTEditor getHandler()

getComponent

public Component getComponent()

setClickCountToStart

public void setClickCountToStart(int count)

getClickCountToStart

public int getClickCountToStart()

getCellEditorValue

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

isCellEditable

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

shouldSelectCell

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

stopCellEditing

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

cancelCellEditing

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

getTreeCellEditorComponent

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

getTableCellEditorComponent

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