|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdsto.dfc.swing.forms.BasicFormEditorEventSource
dsto.dfc.swing.forms.AbstractFormEditor
dsto.dfc.swing.forms.JListFormEditor
public class JListFormEditor
Displays a java.util.List value in a JList component. Default behaviour
is to create a ListModelAdapter to display the
list - override createListModel(java.util.List) to change this.
| Field Summary | |
|---|---|
protected boolean |
directEdit
|
protected List |
editorValue
|
protected JList |
list
|
| Fields inherited from class dsto.dfc.swing.forms.AbstractFormEditor |
|---|
converter, description |
| Constructor Summary | |
|---|---|
JListFormEditor(JList list)
|
|
| Method Summary | |
|---|---|
void |
commitEdits()
Commit any changes not already committed into the value of this editor (eg a text editor will attempt to perform any uncommitted text conversions at this point). |
protected ListModel |
createListModel(List itemList)
Called to create a list model for a list. |
void |
dispose()
Dispose of the object (unregister listeners, close open resources etc). |
protected void |
disposeModel()
|
Component |
getEditorComponent()
Get the component, if any, that acts as a UI for this editor. |
Object |
getEditorValue()
Get the current value from the form editor. |
boolean |
isDirectEdit()
True if the editor directly edits the value passed in with setValue (). |
void |
setDirectEdit(boolean newValue)
Set whether the editor edits value directly |
void |
setEditorValue(Object value)
Sets the value to be displayed/edited by the form editor. |
| Methods inherited from class dsto.dfc.swing.forms.AbstractFormEditor |
|---|
getEditorDescription, getPreferredValueType, setEditorDescription |
| Methods inherited from class dsto.dfc.swing.forms.BasicFormEditorEventSource |
|---|
addFormEditorListener, clone, fireEditComitted, fireEditCommitRequested, fireEditCommitted, removeFormEditorListener, setFormEditorEventSource |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface dsto.dfc.swing.forms.FormEditor |
|---|
addFormEditorListener, removeFormEditorListener |
| Field Detail |
|---|
protected JList list
protected List editorValue
protected boolean directEdit
| Constructor Detail |
|---|
public JListFormEditor(JList list)
| Method Detail |
|---|
public void dispose()
Disposable
dispose in interface Disposableprotected void disposeModel()
public Component getEditorComponent()
FormEditor
getEditorComponent in interface FormEditorgetEditorComponent in class AbstractFormEditorpublic boolean isDirectEdit()
FormEditor
isDirectEdit in interface FormEditorisDirectEdit in class AbstractFormEditorpublic void setDirectEdit(boolean newValue)
newValue - public Object getEditorValue()
FormEditor
getEditorValue in interface FormEditorgetEditorValue in class AbstractFormEditor
public void setEditorValue(Object value)
throws IllegalFormatException
FormEditor
setEditorValue in interface FormEditorsetEditorValue in class AbstractFormEditorvalue - The value to display.
IllegalFormatException - if the value was not in the
correct format for display by this editor. The source specified
by the exception should be this FormEditor instance or a child.protected ListModel createListModel(List itemList)
ListModelAdapter - subclasses may override
this.
public void commitEdits()
throws IllegalFormatException
FormEditor
commitEdits in interface FormEditorcommitEdits in class AbstractFormEditorIllegalFormatException - if the commit failed because of
an illegal input or other error. The source specified by the
exception should be the FormEditor instance that caused the error
(ie either this editor or a child).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||