de.kleopatra.forms.view.builder
Interface Form

All Known Implementing Classes:
AbstractForm

public interface Form

Convenience "Form" to quickly get hold of a container with bound widgets. It's usable f.i. with FormUtils to add/show in a JFrame or with JFormDialog to add/show in a JDialog.

Main responsibilities

NOTE: this is work-very-much-in-progress and probably will change.

Version:
$Revision: 1.3 $ - $Date: 2004/09/28 11:04:38 $
Author:
(C) 2004 Jeanette Winzenburg, Berlin

Method Summary
 void commit()
           
 void flush()
           
 javax.swing.JComponent getFormComponent()
          return the built container.
 java.lang.String getResource()
          return the resource to load from.
 java.lang.Object getTarget()
          return the target data.
 void registerActionsAsHandlers(java.util.List actions, java.util.List actionIDs)
          a hook to register actions to buttons loaded by this form.
 void registerHandler(java.util.List list, java.lang.Object handler)
          a hook to register callback methods in an external handler to buttons loaded by this form.
 void setTarget(java.lang.Object target)
          set the target data.
 

Method Detail

getFormComponent

public javax.swing.JComponent getFormComponent()
return the built container.

Returns:
a component built from a layout resource.

getResource

public java.lang.String getResource()
return the resource to load from.

PENDING: really needed to expose publicly? Used only in FormUtils as default title ...

Returns:

setTarget

public void setTarget(java.lang.Object target)
set the target data.

Parameters:
target -

getTarget

public java.lang.Object getTarget()
return the target data.

Returns:

registerHandler

public void registerHandler(java.util.List list,
                            java.lang.Object handler)
a hook to register callback methods in an external handler to buttons loaded by this form.

Parameters:
list - a list of methods names
handler - the object implementing the methods

registerActionsAsHandlers

public void registerActionsAsHandlers(java.util.List actions,
                                      java.util.List actionIDs)
a hook to register actions to buttons loaded by this form.

NOTE: it's the responsibility of the calling code to keep the two parameter lists in synch.

Parameters:
actions - a list of actions
actionIDs - a list of corresponding button ids

commit

public void commit()

flush

public void flush()


Copyright © 2003, 2004 SwingEmpire Jeanette Winzenburg. All Rights Reserved.