|
|||||||||
| Home >> All >> org >> scopemvc >> view >> [ swing overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.scopemvc.view.swing
Class STextCellEditor

java.lang.Objectjavax.swing.AbstractCellEditor
org.scopemvc.view.swing.STextCellEditor
- All Implemented Interfaces:
- javax.swing.CellEditor, java.io.Serializable
- Direct Known Subclasses:
- STableTextCellEditor
- public abstract class STextCellEditor
- extends javax.swing.AbstractCellEditor
Base class for cell editors based on Swing's JTextComponent.
It is validating editor - it means, that stopCellEditing 55
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)
- Version:
- $Revision: 1.4 $ $Date: 2002/01/26 09:46:21 $
| Field Summary | |
private int |
clickCountToStart
|
protected javax.swing.text.JTextComponent |
component
|
private org.scopemvc.util.convertor.StringConvertor |
convertor
|
private static org.apache.commons.logging.Log |
LOG
|
private ValidationHelper |
validationHelper
|
private java.lang.Object |
value
|
| Fields inherited from class javax.swing.AbstractCellEditor |
changeEvent, listenerList |
| Constructor Summary | |
STextCellEditor(org.scopemvc.util.convertor.StringConvertor inConvertor)
Creates new SDefaultCellRenderer |
|
| Method Summary | |
void |
cancelCellEditing()
Stop editing the cell and do not accept any partial value that has been entered into the cell. |
protected javax.swing.text.JTextComponent |
createTextComponent()
|
java.lang.Object |
getCellEditorValue()
Returns the current value for the CellEditor. |
int |
getClickCountToStart()
ClickCountToStart controls the number of clicks required to start editing. |
org.scopemvc.util.convertor.StringConvertor |
getStringConvertor()
|
boolean |
isCellEditable(java.util.EventObject anEvent)
Editable for mause click events if click count is equals or greater then getClickCountToStart() 55 . |
protected boolean |
isValidating()
Returns true. |
private boolean |
obtainValue()
|
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()
Stop editing the cell and accept any partial value that has been entered into the cell. |
| 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 |
LOG
private static final org.apache.commons.logging.Log LOG
convertor
private org.scopemvc.util.convertor.StringConvertor convertor
component
protected javax.swing.text.JTextComponent component
validationHelper
private ValidationHelper validationHelper
value
private java.lang.Object value
clickCountToStart
private int clickCountToStart
| Constructor Detail |
STextCellEditor
public STextCellEditor(org.scopemvc.util.convertor.StringConvertor inConvertor) throws java.lang.IllegalArgumentException
- Creates new SDefaultCellRenderer
| Method Detail |
getStringConvertor
public final org.scopemvc.util.convertor.StringConvertor getStringConvertor()
createTextComponent
protected javax.swing.text.JTextComponent createTextComponent()
isValidating
protected boolean isValidating()
- Returns true.
obtainValue
private boolean obtainValue()
getCellEditorValue
public final java.lang.Object getCellEditorValue()
- Description copied from interface:
javax.swing.CellEditor - Returns the current value for the
CellEditor.
setValue
protected final void setValue(java.lang.Object inValue) throws java.lang.IllegalArgumentException
- Sets value for editing. Value is converted into String with
StringConvertor. For use in inherited classes.
cancelCellEditing
public final void cancelCellEditing()
- Description copied from class:
javax.swing.AbstractCellEditor - Stop editing the cell and do not accept any partial value that has
been entered into the cell.
stopCellEditing
public final boolean stopCellEditing()
- Description copied from class:
javax.swing.AbstractCellEditor - Stop editing the cell and accept any partial value that has been entered
into the cell.
setClickCountToStart
public final void setClickCountToStart(int count)
- Specifies the number of clicks needed to start editing.
getClickCountToStart
public final int getClickCountToStart()
- ClickCountToStart controls the number of clicks required to start
editing. Default value is 2.
isCellEditable
public boolean isCellEditable(java.util.EventObject anEvent)
- Editable for mause click events if click count is equals or greater
then getClickCountToStart() 55 .
For all other event types returns true.
|
|||||||||
| Home >> All >> org >> scopemvc >> view >> [ swing overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC