| javax.swing.JTextField snow.sortabletable.NumberTableCellEditor
NumberTableCellEditor | public class NumberTableCellEditor extends JTextField implements TableCellEditor,ActionListener(Code) | | our own table cell editor (based on DefaultCellEditor) using a textfield
keeping the types passed (Integer, Float, Double)
selet all when focused, nicer behaviour.
|
selectAllWhenFocused | boolean selectAllWhenFocused(Code) | | |
NumberTableCellEditor | public NumberTableCellEditor()(Code) | | |
actionPerformed | public void actionPerformed(ActionEvent e)(Code) | | called when enter is pressed
|
addCellEditorListener | public void addCellEditorListener(CellEditorListener l)(Code) | | Adds a listener to the list that's notified when the editor stops, or cancels editing.
|
cancelCellEditing | public void cancelCellEditing()(Code) | | Tells the editor to cancel editing and not accept any partially edited value.
|
getCellEditorValue | public Object getCellEditorValue()(Code) | | Returns the value contained in the editor.
|
getTableCellEditorComponent | public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)(Code) | | |
isCellEditable | public boolean isCellEditable(EventObject anEvent)(Code) | | Asks the editor if it can start editing using anEvent.
anEvent is in the invoking component coordinate system.
The editor can not assume the Component returned by getCellEditorComponent
is installed. This method is intended for the use of client to avoid
the cost of setting up and installing the editor component if editing
is not possible. If editing can be started this method returns true.
|
removeCellEditorListener | public void removeCellEditorListener(CellEditorListener l)(Code) | | Removes a listener from the list that's notified
|
shouldSelectCell | public boolean shouldSelectCell(EventObject anEvent)(Code) | | Returns true if the editing cell should be selected, false otherwise.
Typically, the return value is true, because is most cases the editing cell
should be selected. However, it is useful to return false to keep the
selection from changing for some types of edits. eg.
A table that contains a column of check boxes, the user might want to
be able to change those checkboxes without altering the selection.
(See Netscape Communicator for just such an example) Of course, it is
up to the client of the editor to use the return value, but it
doesn't need to if it doesn't want to.
|
stopCellEditing | public boolean stopCellEditing()(Code) | | Tells the editor to stop editing and accept any partially edited
value as the value of the editor.
true if editing was stopped; false otherwise |
|
|