|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jurvis.swing.table.JvTableEditorSelector
public class JvTableEditorSelector
A TableCellEditor that is used to select a registered
TableCellEditor based on the some criteria about the row
or column being edited. Typically the name of the column is used to
select the editor.
| Field Summary | |
|---|---|
protected static String |
COLUMN_PREFIX
|
protected TableCellEditor |
defaultEditor
|
protected TableCellEditor |
editor
|
protected HashMap |
editors
|
protected static String |
ROW_PREFIX
|
| Constructor Summary | |
|---|---|
JvTableEditorSelector()
Construct a JvTableEditorSelector using a
JTextField as the default editor. |
|
JvTableEditorSelector(TableCellEditor defaultEditor)
Construct a JvTableEditorSelector using the specified
TableCellEditor as the default editor. |
|
| Method Summary | |
|---|---|
void |
addCellEditorListener(CellEditorListener l)
|
void |
cancelCellEditing()
|
Object |
getCellEditorValue()
|
Component |
getTableCellEditorComponent(JTable table,
Object value,
boolean isSelected,
int row,
int column)
|
boolean |
isCellEditable(EventObject anEvent)
|
void |
registerByColumn(int columnIndex,
TableCellEditor editor)
Register an TableCellEditor to be used for editing the
specified column. |
void |
registerByName(String columnName,
TableCellEditor editor)
Register an TableCellEditor to be used for editing the
named column. |
void |
registerByRow(int rowIndex,
TableCellEditor editor)
Register an TableCellEditor to be used for editing the
specified row. |
void |
removeCellEditorListener(CellEditorListener l)
|
boolean |
shouldSelectCell(EventObject anEvent)
|
boolean |
stopCellEditing()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected HashMap editors
protected TableCellEditor defaultEditor
protected TableCellEditor editor
protected static final String COLUMN_PREFIX
protected static final String ROW_PREFIX
| Constructor Detail |
|---|
public JvTableEditorSelector()
JvTableEditorSelector using a
JTextField as the default editor.
public JvTableEditorSelector(TableCellEditor defaultEditor)
JvTableEditorSelector using the specified
TableCellEditor as the default editor.
defaultEditor - the default editor| Method Detail |
|---|
public void registerByName(String columnName,
TableCellEditor editor)
TableCellEditor to be used for editing the
named column.
columnName - the name of the columneditor - the table cell editor
public void registerByColumn(int columnIndex,
TableCellEditor editor)
TableCellEditor to be used for editing the
specified column.
columnIndex - the index of the columneditor - the table cell editor
public void registerByRow(int rowIndex,
TableCellEditor editor)
TableCellEditor to be used for editing the
specified row.
rowIndex - the index of the roweditor - the table cell editor
public Component getTableCellEditorComponent(JTable table,
Object value,
boolean isSelected,
int row,
int column)
getTableCellEditorComponent in interface TableCellEditorpublic Object getCellEditorValue()
getCellEditorValue in interface CellEditorpublic boolean stopCellEditing()
stopCellEditing in interface CellEditorpublic void cancelCellEditing()
cancelCellEditing in interface CellEditorpublic boolean isCellEditable(EventObject anEvent)
isCellEditable in interface CellEditorpublic void addCellEditorListener(CellEditorListener l)
addCellEditorListener in interface CellEditorpublic void removeCellEditorListener(CellEditorListener l)
removeCellEditorListener in interface CellEditorpublic boolean shouldSelectCell(EventObject anEvent)
shouldSelectCell in interface CellEditor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||