|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The JCCellEditor
interface allows objects to specify
custom cell editors.
A cell editor is essentially an AWT component, but the cell editor interface adds functions that allow the container to initialize, commit, or cancel the edit.
Special note: If an editor contains multiple AWT components, it
is important that all key events migrate to the component
returned by getComponent()
. Most containers listen for key
events on this component in order to determine whether to
traverse or cancel.
Method Summary | |
void |
cancelCellEditing()
Cancels the edit. |
Object |
getCellEditorValue()
Returns the value contained in the editor. |
Component |
getComponent()
Returns the actual component that will be used to do the editing. |
com.klg.jclass.cell.JCKeyModifier[] |
getReservedKeys()
Retrieves the keys that the editor would like to reserve for itself. |
void |
initialize(AWTEvent ev,
com.klg.jclass.cell.JCCellInfo info,
Object o)
The container calls initialize() before the edit starts to
let the editor know what kind of event started the edit
(via the AWTEvent object). |
boolean |
isModified()
Determines whether any changes have been made. |
boolean |
stopCellEditing()
Terminates editing, accepting any partially-edited value as the value of the editor. |
Methods inherited from interface com.klg.jclass.cell.JCCellEditorEventSource |
addCellEditorListener, removeCellEditorListener |
Method Detail |
public void initialize(AWTEvent ev, com.klg.jclass.cell.JCCellInfo info, Object o)
initialize()
before the edit starts to
let the editor know what kind of event started the edit
(via the AWTEvent
object).
info.getDrawingArea()
.
Implementors must handle null AWTEvent
s.
ev
- event that initiated the edit operationinfo
- cell that displays information for the editoro
- item to be editedpublic Component getComponent()
JCCellEditor
will extend an Swing component and
implement the JCCellEditor
interface, so
getComponent()
usually returns 'this'.
public Object getCellEditorValue()
public boolean stopCellEditing()
false
if editing was not
stopped; this is useful for value-validating editors that cannot accept invalid
edits.
true
if editing was stoppedpublic boolean isModified()
JCCellEditor
's
isModified()
method to determine whether any changes have
been made.
public void cancelCellEditing()
cancel()
. JCCellEditor.cancel()
should never be called from within a
cell editor.
public com.klg.jclass.cell.JCKeyModifier[] getReservedKeys()
Most editors can simply return null
.
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |