|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.kleopatra.forms.view.builder.AbstractForm
Convenience implementation of Form.
The component is created lazily in getFormComponent(). On first call this method will internally call
Field Summary | |
protected javax.swing.JComponent |
form
|
protected java.lang.Class |
formClass
|
protected java.lang.String |
formResource
|
Constructor Summary | |
protected |
AbstractForm()
|
|
AbstractForm(java.lang.String formResource,
java.lang.Class formClass)
|
Method Summary | |
protected abstract void |
bind(javax.swing.JComponent form)
called after the form is loaded. |
protected javax.swing.JComponent |
buildForm(java.lang.String resource)
|
void |
commit()
does nothing... |
protected void |
configure(javax.swing.JComponent form)
called after the form is loaded and the widgets are bound. |
void |
flush()
does nothing... |
protected java.lang.String |
getButtonResource()
resource for registering actions. |
javax.swing.JComponent |
getFormComponent()
returns the JComponent associated with the resource. |
java.lang.String |
getResource()
return the resource to load from. |
protected java.lang.Class |
getResourceClass()
returns an appropriate class to search the resource. |
java.lang.Object |
getTarget()
do nothing |
void |
registerActionAsHandler(java.lang.Object actionID,
javax.swing.Action action)
convenience to register a single action. |
void |
registerActionsAsHandlers(java.util.List actionIDs,
java.util.List actions)
a hook to register actions to buttons loaded by this form. |
void |
registerHandler(java.util.List actionIDs,
java.lang.Object handler)
a hook to register callback methods in an external handler to buttons loaded by this form. |
protected void |
setResource(java.lang.String resource,
java.lang.Class targetClass)
|
void |
setTarget(java.lang.Object data)
do nothing |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected javax.swing.JComponent form
protected java.lang.String formResource
protected java.lang.Class formClass
Constructor Detail |
protected AbstractForm()
public AbstractForm(java.lang.String formResource, java.lang.Class formClass)
Method Detail |
public javax.swing.JComponent getFormComponent()
getFormComponent
in interface Form
public java.lang.String getResource()
Form
PENDING: really needed to expose publicly? Used only in FormUtils as default title ...
getResource
in interface Form
public java.lang.Object getTarget()
getTarget
in interface Form
public void setTarget(java.lang.Object data)
setTarget
in interface Form
data
- public void commit()
commit
in interface Form
public void flush()
flush
in interface Form
public void registerHandler(java.util.List actionIDs, java.lang.Object handler)
Form
registerHandler
in interface Form
actionIDs
- a list of methods nameshandler
- the object implementing the methodspublic void registerActionsAsHandlers(java.util.List actionIDs, java.util.List actions)
Form
NOTE: it's the responsibility of the calling code to keep the two parameter lists in synch.
registerActionsAsHandlers
in interface Form
actionIDs
- a list of actionsactions
- a list of corresponding button idspublic void registerActionAsHandler(java.lang.Object actionID, javax.swing.Action action)
actionID
- action
- protected abstract void bind(javax.swing.JComponent form)
form
- protected void configure(javax.swing.JComponent form)
form
- protected void setResource(java.lang.String resource, java.lang.Class targetClass)
protected java.lang.Class getResourceClass()
protected java.lang.String getButtonResource()
protected javax.swing.JComponent buildForm(java.lang.String resource)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |