|
||||||||||
| 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.JPanel
dsto.dfc.swing.forms.FormPanel
public class FormPanel
A form editor container that hosts FormEditor's bound to properties
of the editor value. Use the addEditor method to bind child editors to properties of the
panel's editor value.
Also implements the Beans Customizer interface, with the setObject () method delegated to setEditorValue ().
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| 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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| 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 java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
FormPanel()
|
|
| Method Summary | |
|---|---|
void |
addEditor(String property,
FormEditor editor)
|
void |
addEditor(String property,
FormEditor editor,
ValueConverter converter)
Add an editor for a given property of the form value. |
void |
addFormEditorListener(FormEditorListener l)
|
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). |
void |
dispose()
Dispose of the object (unregister listeners, close open resources etc). |
void |
fireEditComitted()
Deprecated. Supports old typo, use fireEditCommitted instead. |
void |
fireEditCommitRequested()
|
void |
fireEditCommitted()
|
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'). |
Object |
getEditorValue()
Get the current value from the form editor. |
Class |
getPreferredValueType()
Default implementation: returns java.lang.Object to indicate no preferred type. |
boolean |
isDeferredCommit()
True if editor commit requests from child editors are deferred until commitEdits () is explicitly called on this form. |
boolean |
isDirectEdit()
True if the editor directly edits the value passed in with setValue (). |
boolean |
removeEditor(FormEditor editor)
Remove a bound form editor. |
void |
removeFormEditorListener(FormEditorListener l)
|
void |
setDeferredCommit(boolean newValue)
|
void |
setDirectEdit(boolean newValue)
|
void |
setEditorValue(Object newValue)
Sets the value to be displayed/edited by the form editor. |
void |
setObject(Object bean)
|
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.beans.Customizer |
|---|
addPropertyChangeListener, removePropertyChangeListener |
| Constructor Detail |
|---|
public FormPanel()
| Method Detail |
|---|
public void dispose()
Disposable
dispose in interface Disposablepublic void setObject(Object bean)
setObject in interface Customizerpublic Class getPreferredValueType()
getPreferredValueType in interface FormEditorpublic boolean isDeferredCommit()
Form
isDeferredCommit in interface Formpublic void setDeferredCommit(boolean newValue)
setDeferredCommit in interface Form
public void addEditor(String property,
FormEditor editor)
addEditor in interface Form
public void addEditor(String property,
FormEditor editor,
ValueConverter converter)
Form
addEditor in interface Formproperty - The property name.editor - The editor for the property.converter - The value converter that will be used to convert
values into the editor's format (determined by FormEditor.getPreferredValueType() and from the editor back to the
property value. May be null for no conversion.Form.removeEditor(dsto.dfc.swing.forms.FormEditor)public boolean removeEditor(FormEditor editor)
Form
removeEditor in interface FormForm.addEditor(java.lang.String, dsto.dfc.swing.forms.FormEditor)public String getEditorDescription()
FormEditor
getEditorDescription in interface FormEditorpublic boolean isDirectEdit()
FormEditor
isDirectEdit in interface FormEditorpublic void setDirectEdit(boolean newValue)
public void commitEdits()
throws IllegalFormatException
FormEditor
commitEdits in interface FormEditorIllegalFormatException - 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).
public void setEditorValue(Object newValue)
throws IllegalFormatException
FormEditor
setEditorValue in interface FormEditornewValue - 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 Object getEditorValue()
FormEditor
getEditorValue in interface FormEditorpublic Component getEditorComponent()
FormEditor
getEditorComponent in interface FormEditorpublic void addFormEditorListener(FormEditorListener l)
addFormEditorListener in interface FormEditorpublic void removeFormEditorListener(FormEditorListener l)
removeFormEditorListener in interface FormEditorpublic void fireEditComitted()
public void fireEditCommitted()
public void fireEditCommitRequested()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||