ehsbe CommonsTM
Version 1.1.0rc3

com.ehsbe.commons.gui
Class JxTable.AutoSelectCellEditor

java.lang.Object
  extended by javax.swing.AbstractCellEditor
      extended by javax.swing.DefaultCellEditor
          extended by com.ehsbe.commons.gui.JxTable.AutoSelectCellEditor
All Implemented Interfaces:
Serializable, CellEditor, TableCellEditor, TreeCellEditor
Enclosing class:
JxTable

public class JxTable.AutoSelectCellEditor
extends DefaultCellEditor

Same as the default cell editor, but clickcount set to 0 and focus surrendering enabled. Since the default DefaultCellEditor from the Table is not accessible, we need to install this slightly modified version.

Version:
$Revision: 432 $
Author:
Jens Elkner
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.DefaultCellEditor
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
JxTable.AutoSelectCellEditor(JTextField textField)
          Default constructor.
 
Method Summary
 Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
          Implements TableCellEditor.
 
Methods inherited from class javax.swing.DefaultCellEditor
cancelCellEditing, getCellEditorValue, getClickCountToStart, getComponent, 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, removeCellEditorListener
 

Constructor Detail

JxTable.AutoSelectCellEditor

public JxTable.AutoSelectCellEditor(JTextField textField)
Default constructor. Enables surrendering focus on keystrokes.

Parameters:
textField -
Method Detail

getTableCellEditorComponent

public Component getTableCellEditorComponent(JTable table,
                                             Object value,
                                             boolean isSelected,
                                             int row,
                                             int column)
Implements TableCellEditor. Automatically selects the content of the component, if its selection state is true.

Specified by:
getTableCellEditorComponent in interface TableCellEditor
Overrides:
getTableCellEditorComponent in class DefaultCellEditor
Parameters:
table - the owner of the cell to edit
value - the object to edit
isSelected - selection state of the object
row - row, where the object is located
column - column, where the object is located
Returns:
the celleditor for the specified object

ehsbe CommonsTM
Version 1.1.0rc3

Copyright ©2005-2009 EHSBE, Walther-Rathenau-Str. 58, 39104 Magdeburg, Sachsen-Anhalt, Germany. All Rights Reserved.