|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.AbstractCellEditor | +--org.scopemvc.view.swing.STextCellEditor
Base class for cell editors based on Swing's JTextComponent
. It
is validating editor - it means, that stopCellEditing
can return false
.
Difference between a Swing's and this cell editor is that Swing always
returns String value, whereas STextCellEditor
uses StringConvertor
to return object
of desired type.
Note: This editor fixes in unbelievable simple way Sun's editor unpleasant bug - when You start cell editing with keyboard, not mouse, the text field has no cursor (in 1.3.1 and 1.4 beta)
Field Summary | |
protected javax.swing.text.JTextComponent |
component
TODO: describe of the Field |
Fields inherited from class javax.swing.AbstractCellEditor |
changeEvent, listenerList |
Constructor Summary | |
STextCellEditor(StringConvertor inConvertor)
Creates new SDefaultCellRenderer |
Method Summary | |
void |
cancelCellEditing()
TODO: document the method |
protected javax.swing.text.JTextComponent |
createTextComponent()
TODO: document the method |
java.lang.Object |
getCellEditorValue()
Gets the cell editor value |
int |
getClickCountToStart()
ClickCountToStart controls the number of clicks required to start editing. |
StringConvertor |
getStringConvertor()
Gets the string convertor |
boolean |
isCellEditable(java.util.EventObject anEvent)
Editable for mause click events if click count is equals or greater then getClickCountToStart() . |
protected boolean |
isValidating()
Returns true. |
void |
setClickCountToStart(int count)
Specifies the number of clicks needed to start editing. |
protected void |
setValue(java.lang.Object inValue)
Sets value for editing. |
boolean |
stopCellEditing()
TODO: document the method |
Methods inherited from class javax.swing.AbstractCellEditor |
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener, shouldSelectCell |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected javax.swing.text.JTextComponent component
Constructor Detail |
public STextCellEditor(StringConvertor inConvertor) throws java.lang.IllegalArgumentException
inConvertor
- TODO: Describe the Parameter
java.lang.IllegalArgumentException
- TODO: Describe the ExceptionMethod Detail |
public final StringConvertor getStringConvertor()
public final java.lang.Object getCellEditorValue()
public final int getClickCountToStart()
public boolean isCellEditable(java.util.EventObject anEvent)
getClickCountToStart()
. For all other
event types returns true.
isCellEditable
in interface javax.swing.CellEditor
isCellEditable
in class javax.swing.AbstractCellEditor
anEvent
- TODO: Describe the Parameter
public final void setClickCountToStart(int count)
count
- an int specifying the number of clicks needed to start
editinggetClickCountToStart()
public final void cancelCellEditing()
cancelCellEditing
in interface javax.swing.CellEditor
cancelCellEditing
in class javax.swing.AbstractCellEditor
public final boolean stopCellEditing()
stopCellEditing
in interface javax.swing.CellEditor
stopCellEditing
in class javax.swing.AbstractCellEditor
protected boolean isValidating()
protected final void setValue(java.lang.Object inValue) throws java.lang.IllegalArgumentException
StringConvertor
. For use in inherited classes.
inValue
- The new value value
java.lang.IllegalArgumentException
- if converted cannot convert passed
value.protected javax.swing.text.JTextComponent createTextComponent()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |