|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.text.JTextComponent
javax.swing.JTextField
csheets.ui.sheet.CellEditor
public class CellEditor
The table editor used for editing cells in a spreadsheet.
| Nested Class Summary | |
|---|---|
protected class |
CellEditor.CancelAction
An action for cancelling editing of a cell. |
protected class |
CellEditor.StopAction
An action for stopping editing of a cell. |
| Nested classes/interfaces inherited from class javax.swing.JTextField |
|---|
JTextField.AccessibleJTextField |
| Nested classes/interfaces inherited from class javax.swing.text.JTextComponent |
|---|
JTextComponent.AccessibleJTextComponent, JTextComponent.KeyBinding |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static String |
CANCEL_COMMAND
The action command used for the cancel action |
static int |
CLICK_COUNT_TO_START
The required number of mouse clicks before editing starts |
| Fields inherited from class javax.swing.JTextField |
|---|
notifyAction |
| Fields inherited from class javax.swing.text.JTextComponent |
|---|
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
CellEditor(UIController uiController)
Creates a new cell editor. |
|
| Method Summary | |
|---|---|
void |
addCellEditorListener(CellEditorListener listener)
Adds a CellEditorListener to the listener list. |
void |
cancelCellEditing()
Invoked when editing is cancelled. |
CellEditorListener[] |
getCellEditorListeners()
Returns an array of all the CellEditorListeners added. |
Cell |
getCellEditorValue()
Returns the cell that is (or was) being edited. |
Component |
getTableCellEditorComponent(JTable table,
Object value,
boolean selected,
int row,
int column)
Stores the given cell in the editor. |
boolean |
isCellEditable(EventObject event)
Checks if the given event should cause editing to be resumed. |
void |
removeCellEditorListener(CellEditorListener listener)
Removes a CellEditorListener from the listener list. |
void |
selectionChanged(SelectionEvent event)
Updates the text field with the content of the new active cell. |
boolean |
shouldSelectCell(EventObject event)
Returns true if the given event should cause the cell to be selected. |
boolean |
stopCellEditing()
Stops editing and updates the cell's content. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int CLICK_COUNT_TO_START
public static final String CANCEL_COMMAND
| Constructor Detail |
|---|
public CellEditor(UIController uiController)
uiController - the user interface controller| Method Detail |
|---|
public boolean stopCellEditing()
stopCellEditing in interface CellEditorpublic Cell getCellEditorValue()
getCellEditorValue in interface CellEditorpublic boolean isCellEditable(EventObject event)
isCellEditable in interface CellEditorevent - the event that was fired
public boolean shouldSelectCell(EventObject event)
shouldSelectCell in interface CellEditorevent - the event that was fired
public void cancelCellEditing()
cancelCellEditing in interface CellEditor
public Component getTableCellEditorComponent(JTable table,
Object value,
boolean selected,
int row,
int column)
getTableCellEditorComponent in interface TableCellEditortable - the table in which the cell is locatedvalue - the cell to editselected - whether the cell is selectedrow - the row in which the cell is locatedcolumn - the column in which the cell is locatedpublic void selectionChanged(SelectionEvent event)
selectionChanged in interface SelectionListenerevent - the selection event that was firedpublic void addCellEditorListener(CellEditorListener listener)
CellEditorListener to the listener list.
addCellEditorListener in interface CellEditorlistener - the new listener to be addedpublic void removeCellEditorListener(CellEditorListener listener)
CellEditorListener from the listener list.
removeCellEditorListener in interface CellEditorlistener - the listener to be removedpublic CellEditorListener[] getCellEditorListeners()
CellEditorListeners added.
CellEditorListeners added
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||