|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdsto.dfc.swing.controls.JTextFieldEditorAdapter
public class JTextFieldEditorAdapter
Adapts a JTextField to the TableCellEditor and TreeCellEditor interfaces. Supports use of a ValueConverter and the Objects.convertValue () method to provide auto data conversion to/from text and the form used by the model.
| Constructor Summary | |
|---|---|
JTextFieldEditorAdapter(JTextField textField)
Create an adapter with no data conversion (ie text is copied directly to model). |
|
JTextFieldEditorAdapter(JTextField textField,
Class valueClass)
Create an adapter that converts data from text field to values of a given type. |
|
JTextFieldEditorAdapter(JTextField textField,
Class valueClass,
ValueConverter converter)
Create an adapter that converts data from text field to values of a given type. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
|
void |
addCellEditorListener(CellEditorListener l)
|
void |
cancelCellEditing()
|
protected void |
fireEditingCanceled(ChangeEvent e)
|
protected void |
fireEditingStopped(ChangeEvent e)
|
void |
focusGained(FocusEvent e)
|
void |
focusLost(FocusEvent e)
|
Object |
getCellEditorValue()
|
int |
getClickCountToEdit()
|
Component |
getTableCellEditorComponent(JTable table,
Object value,
boolean isSelected,
int row,
int column)
|
Component |
getTreeCellEditorComponent(JTree tree,
Object value,
boolean isSelected,
boolean expanded,
boolean leaf,
int row)
|
Class |
getValueClass()
|
boolean |
isCellEditable(EventObject e)
|
void |
removeCellEditorListener(CellEditorListener l)
|
void |
setClickCountToEdit(int newValue)
|
void |
setValueClass(Class newValueClass)
|
boolean |
shouldSelectCell(EventObject e)
|
Component |
startEditor(Object value)
|
boolean |
stopCellEditing()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JTextFieldEditorAdapter(JTextField textField)
public JTextFieldEditorAdapter(JTextField textField,
Class valueClass)
textField - The text field to use for editing.valueClass - The class of value to return to the model.
public JTextFieldEditorAdapter(JTextField textField,
Class valueClass,
ValueConverter converter)
textField - The text field to use for editing.valueClass - The class of value to return to the model.converter - The converter instance to use for conversion
to/from text and the model form.| Method Detail |
|---|
public Class getValueClass()
public void setValueClass(Class newValueClass)
public int getClickCountToEdit()
public void setClickCountToEdit(int newValue)
public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic void focusGained(FocusEvent e)
focusGained in interface FocusListenerpublic void focusLost(FocusEvent e)
focusLost in interface FocusListenerpublic Component startEditor(Object value)
public Component getTableCellEditorComponent(JTable table,
Object value,
boolean isSelected,
int row,
int column)
getTableCellEditorComponent in interface TableCellEditor
public Component getTreeCellEditorComponent(JTree tree,
Object value,
boolean isSelected,
boolean expanded,
boolean leaf,
int row)
getTreeCellEditorComponent in interface TreeCellEditorpublic Object getCellEditorValue()
getCellEditorValue in interface CellEditorpublic boolean isCellEditable(EventObject e)
isCellEditable in interface CellEditorpublic boolean shouldSelectCell(EventObject e)
shouldSelectCell in interface CellEditorpublic boolean stopCellEditing()
stopCellEditing in interface CellEditorpublic void cancelCellEditing()
cancelCellEditing in interface CellEditorpublic void removeCellEditorListener(CellEditorListener l)
removeCellEditorListener in interface CellEditorpublic void addCellEditorListener(CellEditorListener l)
addCellEditorListener in interface CellEditorprotected void fireEditingCanceled(ChangeEvent e)
protected void fireEditingStopped(ChangeEvent e)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||