|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Listener interface for UI variable changes. The user communicates with the application using the so-called variables. When the user makes a change using the UI the terminal trasmits the changed variables to the application, and the components owning those variables may then process those changes.
The variable-owning components can be linked with dependency relationships. A dependency between two components means that all variable change events to the depended component will be handled before any such events to the depending component.
For example, the commit button for a text field will depend on that text field. This is because we want to handle any pending changes the user makes to the contents on the text field before before we accept the click of the commit button which starts processing the text field contents.
Method Summary | |
void |
changeVariables(java.lang.Object source,
java.util.Map variables)
Called when one or more variables handled by the implementing class are changed. |
void |
dependsOn(VariableOwner depended)
Makes this VariableOwner depend on the given
VariableOwner . |
java.util.Set |
getDirectDependencies()
Gets the variable change listeners this VariableOwner
directly depends on. |
boolean |
isEnabled()
Tests if the variable owner is enabled or not. |
void |
removeDirectDependency(VariableOwner depended)
Removes the given component from this component's dependency list. |
Method Detail |
public java.util.Set getDirectDependencies()
VariableOwner
directly depends on. This list does not contain any indirect
dependencies, for example, if A depends on B and B depends on C,
the dependency list of A does not include C.
VariableOwner
s this component directly
depend on, null
if this component does not depend on
anybody.public void changeVariables(java.lang.Object source, java.util.Map variables)
source
- Source of the variable change. This is the origin of the
event. For example in Web Adapter this is the request.variables
- Mapping from variable names to new variable valuespublic void dependsOn(VariableOwner depended)
VariableOwner
depend on the given
VariableOwner
. This means that any variable change
events relating to depended
must be sent before any
such events that relate to this object.
public void removeDirectDependency(VariableOwner depended)
depended
wdepende direct dependency from the component.
Indirect dependencies are not removed.
public boolean isEnabled()
Tests if the variable owner is enabled or not. The terminal should not send any variable changes to disabled variable owners.
true
if the variable owner is enabled,
false
if not
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |