|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dsto.dfc.swing.forms.BasicFormEditorEventSource dsto.dfc.swing.forms.AbstractFormEditor
public abstract class AbstractFormEditor
Utility base class for FormEditor's.
Field Summary | |
---|---|
protected ValueConverter |
converter
|
protected String |
description
|
Constructor Summary | |
---|---|
AbstractFormEditor()
|
|
AbstractFormEditor(String description,
ValueConverter converter)
|
|
AbstractFormEditor(ValueConverter converter)
|
Method Summary | |
---|---|
abstract 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). |
abstract Component |
getEditorComponent()
Get the component, if any, that acts as a UI for this editor. |
String |
getEditorDescription()
Get a short description of the value being edited for this editor (eg 'host name'). |
abstract Object |
getEditorValue()
Get the current value from the form editor. |
Class |
getPreferredValueType()
Default implementation: returns java.lang.Object to indicate no preferred type. |
abstract boolean |
isDirectEdit()
True if the editor directly edits the value passed in with setValue (). |
void |
setEditorDescription(String newValue)
|
abstract void |
setEditorValue(Object value)
Sets the value to be displayed/edited by the form editor. |
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 ValueConverter converter
protected String description
Constructor Detail |
---|
public AbstractFormEditor()
public AbstractFormEditor(ValueConverter converter)
public AbstractFormEditor(String description, ValueConverter converter)
Method Detail |
---|
public String getEditorDescription()
FormEditor
getEditorDescription
in interface FormEditor
public void setEditorDescription(String newValue)
public Class getPreferredValueType()
getPreferredValueType
in interface FormEditor
public abstract boolean isDirectEdit()
FormEditor
isDirectEdit
in interface FormEditor
public abstract void setEditorValue(Object value) throws IllegalFormatException
FormEditor
setEditorValue
in interface FormEditor
value
- 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.public abstract Object getEditorValue()
FormEditor
getEditorValue
in interface FormEditor
public abstract Component getEditorComponent()
FormEditor
getEditorComponent
in interface FormEditor
public abstract void commitEdits() throws IllegalFormatException
FormEditor
commitEdits
in interface FormEditor
IllegalFormatException
- 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 |