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

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

public class SimpleFormManager
extends Object
implements FormManager

This FormManager is the simplest form of form management as it only displays one form at a time. The order of the forms is the order of arrival.

Author:
amedrano

Constructor Summary
SimpleFormManager()
           
 
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()
           
 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()
           
 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

SimpleFormManager

public SimpleFormManager()
Method Detail

addDialog

public 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 UIRequest getCurrentDialog()
get the Dialog Being currently displayed.

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

closeCurrentDialog

public void closeCurrentDialog()
close the current dialog.

Specified by:
closeCurrentDialog in interface FormManager

flush

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

Specified by:
flush in interface FormManager

cutDialog

public 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

getParentOf

public Form getParentOf(String formURI)
Description copied from interface: FormManager
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)
Description copied from interface: FormManager
Associate a Renderer to the FormManager.

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

renderFrame

protected void renderFrame()

disposeFrame

protected void disposeFrame()

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.