org.universAAL.ui.handler.gui.swing.formManagement
Class HierarchicalFormManager

Package class diagram package HierarchicalFormManager
java.lang.Object
  extended by org.universAAL.ui.handler.gui.swing.formManagement.HierarchicalFormManager
All Implemented Interfaces:
FormManager

public class HierarchicalFormManager
extends Object
implements FormManager

Hierarchical management of dialogs. This Manager will enable the access to parent dialogs in order to offer the possibility of displaying elements of a subdialog's parent, such as it's submits.

Author:
amedrano

Constructor Summary
HierarchicalFormManager()
           
 
Method Summary
 void adaptationParametersChanged(String dialogID, String changedProp, Object newVal)
          Callback for when the bus instructs some parameters have changed.
 void addDialog(UIRequest oe)
          Callback for incoming dialogs.
 void closeCurrentDialog()
          close the current dialog.
 Resource cutDialog(String dialogID)
          Callback for Handler.cutDialog(String).
protected  void disposeFrame()
          close current frame.
 void flush()
          to be called when the handler finishes.
 Collection getAllDialogs()
          Consult all the added dialogs that are not closed yet.
 UIRequest getCurrentDialog()
          get the Dialog Being currently displayed.
 Form getParentOf(String formURI)
          get the parent Form of a given formURI.
 void missingInput(Input input)
          This method is called when a Submit has detected there is a missing input it needs, therefore the model for that input should be notified (so the user knows).
protected  void renderFrame(UIRequest req)
          Render the frame.
 void setRenderer(Renderer renderer)
          Associate a Renderer to the FormManager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HierarchicalFormManager

public HierarchicalFormManager()
Method Detail

addDialog

public final void addDialog(UIRequest oe)
Callback for incoming dialogs. This method will model and render (if necessary) the Form.

Specified by:
addDialog in interface FormManager
Parameters:
oe - UIRequest that includes the dialog to show

getCurrentDialog

public final UIRequest getCurrentDialog()
get the Dialog Being currently displayed.

Specified by:
getCurrentDialog in interface FormManager
Returns:
the UIRequest currently being displayed

closeCurrentDialog

public final void closeCurrentDialog()
close the current dialog.

Specified by:
closeCurrentDialog in interface FormManager

cutDialog

public final Resource cutDialog(String dialogID)
Callback for Handler.cutDialog(String).

Specified by:
cutDialog in interface FormManager
Parameters:
dialogID - DialogURI to cut
Returns:
result of the operation

flush

public final void flush()
to be called when the handler finishes. it should close all dialogs, and pending dialogs.

Specified by:
flush in interface FormManager

getParentOf

public Form getParentOf(String formURI)
get the parent Form of a given formURI.

Specified by:
getParentOf in interface FormManager
Parameters:
formURI - the URI of the child Form
Returns:
the parent of the child Form

setRenderer

public void setRenderer(Renderer renderer)
Associate a Renderer to the FormManager.

Specified by:
setRenderer in interface FormManager
Parameters:
renderer - the Renderer to associate with

renderFrame

protected void renderFrame(UIRequest req)
Render the frame.

Parameters:
req - the Form to be rendered

disposeFrame

protected void disposeFrame()
close current frame.


getAllDialogs

public Collection getAllDialogs()
Description copied from interface: FormManager
Consult all the added dialogs that are not closed yet.

Specified by:
getAllDialogs in interface FormManager
Returns:
a Collection of UIRequests

missingInput

public void missingInput(Input input)
Description copied from interface: FormManager
This method is called when a Submit has detected there is a missing input it needs, therefore the model for that input should be notified (so the user knows).

Specified by:
missingInput in interface FormManager

adaptationParametersChanged

public void adaptationParametersChanged(String dialogID,
                                        String changedProp,
                                        Object newVal)
Description copied from interface: FormManager
Callback for when the bus instructs some parameters have changed. Default behavior should be to re-render the form.

Specified by:
adaptationParametersChanged in interface FormManager


Copyright © 2014 universAAL Consortium. All Rights Reserved.