|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--javax.swing.AbstractCellEditor
|
+--org.sape.carbon.services.console.AttributeCellEditor
This implementation of CellEditor suports the editing of basic data types. It supports CarbonBase enums as a dropdown list, arrays as tabular data, booleans as checkboxes and text fields for everything else.
Copyright 2002 Sapient
| Nested Class Summary | |
protected class |
AttributeCellEditor.EditorDelegate
The protected EditorDelegate class. |
| Field Summary | |
protected int |
clickCountToStart
An integer specifying the number of clicks needed to start editing. |
protected AttributeCellEditor.EditorDelegate |
delegate
The delegate class which handles all methods sent from the CellEditor. |
private boolean |
editable
true if the object may be altered |
protected JComponent |
editorComponent
The Swing component being edited. |
private Class |
type
The class type of the data being edited |
private Object |
value
The object value of the data |
| Fields inherited from class javax.swing.AbstractCellEditor |
changeEvent, listenerList |
| Constructor Summary | |
AttributeCellEditor(Class type,
Object value,
boolean editable)
Constructs a cell editor to handle the editing of values. |
|
| Method Summary | |
private JComponent |
buildComponent(Class type,
Object valuable,
boolean editable)
|
void |
cancelCellEditing()
Forwards the message from the CellEditor to
the delegate. |
Object |
getCellEditorValue()
Forwards the message from the CellEditor to
the delegate. |
int |
getClickCountToStart()
Returns the number of clicks needed to start editing. |
Component |
getComponent()
Returns a reference to the editor component. |
boolean |
isCellEditable(EventObject anEvent)
Forwards the message from the CellEditor to
the delegate. |
void |
setClickCountToStart(int count)
Specifies the number of clicks needed to start editing. |
boolean |
shouldSelectCell(EventObject anEvent)
Forwards the message from the CellEditor to
the delegate. |
boolean |
stopCellEditing()
Forwards the message from the CellEditor to
the delegate. |
| Methods inherited from class javax.swing.AbstractCellEditor |
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected JComponent editorComponent
protected AttributeCellEditor.EditorDelegate delegate
CellEditor.
protected int clickCountToStart
clickCountToStart is defined as zero, it
will not initiate until a click occurs.
private Class type
private Object value
private boolean editable
| Constructor Detail |
public AttributeCellEditor(Class type,
Object value,
boolean editable)
type - the class type of teh data being editedvalue - the value object that is editededitable - true if the value can be edited| Method Detail |
public Component getComponent()
Component
private JComponent buildComponent(Class type,
Object valuable,
boolean editable)
public void setClickCountToStart(int count)
count - an int specifying the number of clicks needed to start editinggetClickCountToStart()public int getClickCountToStart()
public Object getCellEditorValue()
CellEditor to
the delegate.
AttributeCellEditor.EditorDelegate.getCellEditorValue()public boolean isCellEditable(EventObject anEvent)
CellEditor to
the delegate.
isCellEditable in interface CellEditorisCellEditable in class AbstractCellEditorAttributeCellEditor.EditorDelegate.isCellEditable(EventObject)public boolean shouldSelectCell(EventObject anEvent)
CellEditor to
the delegate.
shouldSelectCell in interface CellEditorshouldSelectCell in class AbstractCellEditorAttributeCellEditor.EditorDelegate.shouldSelectCell(EventObject)public boolean stopCellEditing()
CellEditor to
the delegate.
stopCellEditing in interface CellEditorstopCellEditing in class AbstractCellEditorAttributeCellEditor.EditorDelegate.stopCellEditing()public void cancelCellEditing()
CellEditor to
the delegate.
cancelCellEditing in interface CellEditorcancelCellEditing in class AbstractCellEditorAttributeCellEditor.EditorDelegate.cancelCellEditing()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||