|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.swing.visuals.tableview.DefaultTableCellEditor
public class DefaultTableCellEditor
Default Table Cell Editor
Field Summary | |
---|---|
static java.lang.String |
RB_KEY
|
Constructor Summary | |
---|---|
DefaultTableCellEditor()
Contructs a DefaultTableCellEditor with a JTextField as the editing component. |
|
DefaultTableCellEditor(javax.swing.JCheckBox checkBox)
Constructs a DefaultTableCellEditor object that uses a check box. |
|
DefaultTableCellEditor(javax.swing.JComboBox comboBox)
Constructs a DefaultTableCellEditor object that uses a combo box. |
|
DefaultTableCellEditor(javax.swing.JTextField textField)
Constructs a DefaultCellEditor object that uses a text field. |
Method Summary | |
---|---|
java.lang.Object |
getCellEditorValue()
Returns the value contained within the editor. |
GenericErrorHandlerInterface |
getGenericErrorHandler()
Returns the error handler that the editor uses to handle various errors it catches when either it tries to construct the value to set on the model or validate the value. |
java.util.Locale |
getLocale()
Returns the Locale that is used on the transform and outputTransform for the editor. |
com.sas.util.transforms.TransformInterface |
getOutputTransform()
Returns the output transform used for converting the user enter string value to an Object that will be set on the model. |
java.awt.Component |
getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int column)
Sets an initial value for the editor. |
com.sas.util.transforms.TransformInterface |
getTransform()
Returns the TransformInterface that is used to convert the value from the model into text to be displayed in the editor. |
ValidationInterface |
getValidator()
Returns the validationInterface the editor uses to validate the value before setting the value on the model. |
void |
setGenericErrorHandler(GenericErrorHandlerInterface errorHandler)
Sets an error handler to be used on the editor, this errorhandler will be used to handle various errors the editor catches when trying to construct the value to set on the model or when it validates a value. |
void |
setLocale(java.util.Locale newLocale)
Sets the locale to use on the transform and outputTransform for the editor. |
void |
setOutputTransform(com.sas.util.transforms.TransformInterface newTransform)
Sets the new output transform to use for converting the user enter string value to a value (Class) that is to be set on the model. |
void |
setTransform(com.sas.util.transforms.TransformInterface newTransform)
Sets the new transform to use for converting values from the model into displayable text in the editor. |
void |
setValidator(ValidationInterface newValidator)
Sets an validator to be used on the editor, this validator will be used to validate whether a value is valid before the value is set on the model. |
boolean |
stopCellEditing()
Tells the editor to stop editing and accept any partially edited value as the value of the editor. |
Field Detail |
---|
public static final java.lang.String RB_KEY
Constructor Detail |
---|
public DefaultTableCellEditor()
JTextField
as the editing component.
public DefaultTableCellEditor(javax.swing.JCheckBox checkBox)
checkBox
- public DefaultTableCellEditor(javax.swing.JComboBox comboBox)
comboBox
- public DefaultTableCellEditor(javax.swing.JTextField textField)
textField
- Method Detail |
---|
public void setLocale(java.util.Locale newLocale)
newLocale
- the locale to usegetLocale()
public java.util.Locale getLocale()
setLocale(Locale)
public void setTransform(com.sas.util.transforms.TransformInterface newTransform)
newTransform
- the new transform to usegetTransform()
public com.sas.util.transforms.TransformInterface getTransform()
setTransform(TransformInterface)
public void setOutputTransform(com.sas.util.transforms.TransformInterface newTransform)
BaseTransforms
class to
determine the transform to use. Users only need to set an output transform
if the default transform returned from
BaseTransforms.defaultInstance.lookupTransform(String.class, table.getColumnClass(column))
is not the transform they want to use or if null is returned from the lookup call.
newTransform
- the new output transform to use for converting a string to
the value set on the modelgetOutputTransform()
,
BaseTransforms
public com.sas.util.transforms.TransformInterface getOutputTransform()
BaseTransforms
class to
determine the transform to use. Users only need to set an output transform
if the default transform returned from
BaseTransforms.defaultInstance.lookupTransform(String.class, table.getColumnClass(column))
is not the transform they want to use or if null is returned from the lookup call.
setOutputTransform(TransformInterface)
public GenericErrorHandlerInterface getGenericErrorHandler()
getGenericErrorHandler
in interface SupportsGenericErrorHandlerInterface
setGenericErrorHandler(GenericErrorHandlerInterface)
public void setGenericErrorHandler(GenericErrorHandlerInterface errorHandler)
setGenericErrorHandler
in interface SupportsGenericErrorHandlerInterface
errorHandler
- the new error handler interface to use to handle errors or null to remove
the current error handlergetGenericErrorHandler()
public ValidationInterface getValidator()
setValidator(ValidationInterface)
public void setValidator(ValidationInterface newValidator)
newValidator
- the new validation interface to use to validate the values before setting
the value on the model, or null to clear the validation interfacegetValidator()
public boolean stopCellEditing()
ValidationInterface
has been set
on the editor, it will get a chance to validate whether the value is valid
or not.
stopCellEditing
in interface javax.swing.CellEditor
stopCellEditing
in class javax.swing.DefaultCellEditor
public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
getTableCellEditorComponent
in interface javax.swing.table.TableCellEditor
getTableCellEditorComponent
in class javax.swing.DefaultCellEditor
table
- the JTable that is asking the editor to edit; can be nullvalue
- the value of the cell to be edited; it is up to the specific editor to interpret and
draw the value. For example, if value is the string "true", it could be
rendered as a string or it could be rendered as a check box that is checked. null is a valid valueisSelected
- true if the cell is to be rendered with highlightingrow
- the row of the cell being editedcolumn
- the column of the cell being edited
public java.lang.Object getCellEditorValue()
getCellEditorValue
in interface javax.swing.CellEditor
getCellEditorValue
in class javax.swing.DefaultCellEditor
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |