Class SetValueManager
- java.lang.Object
-
- de.desy.mst.libs.framework.mstapp.util.observables.setvalue.SetValueManager
-
- Direct Known Subclasses:
SetEnabledManager
,SetSelectedManager
,SetTextManager
,SetVisibleManager
public class SetValueManager extends java.lang.Object
Implementation of value the setting managers (Observable action class with single method of a single parameter - SetValueManager can be easily rewritten for many parameters by providing a n new constructor and a new setValue() method) Careful: DO NOT USE DIRECTLY, but its typesafe and tested wrapper classes. here 'addObject(Object)' is replaced by 'add(A Proper Class)'- Author:
- schuette
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
methodName
-
Constructor Summary
Constructors Constructor Description SetValueManager(java.lang.Object startValue, java.lang.String methodName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addObject(java.lang.Object client)
Routine for implementation of 'add(A Proper Class)' in typesafe wrapper classes please keep protected except for temporarily debuggingboolean
contains(java.lang.Object o)
enthaelt Objekt ovoid
forceParameterTypes(java.lang.Class[] classes)
void
remove(java.lang.Object client)
void
removeAll()
all client objects that observed change of value are removedvoid
setValue(java.lang.Object newValue)
int
size()
number of registered objects (for debug purposes)
-
-
-
Constructor Detail
-
SetValueManager
public SetValueManager(java.lang.Object startValue, java.lang.String methodName)
- Parameters:
startValue
- the value the clients are supposed to be set to, NOT NULLmethodName
- name of the method to be called upon the clients like "setText", NOT NULL startValue must be a valid parameter
-
-
Method Detail
-
addObject
protected void addObject(java.lang.Object client)
Routine for implementation of 'add(A Proper Class)' in typesafe wrapper classes please keep protected except for temporarily debugging- Parameters:
client
- object that will observe change of value client MUST implement methodName(methodParameterTypes[0] methodParameters[0])
-
remove
public void remove(java.lang.Object client)
- Parameters:
client
- object that observed change of value
-
removeAll
public void removeAll()
all client objects that observed change of value are removed
-
size
public int size()
number of registered objects (for debug purposes)
-
contains
public boolean contains(java.lang.Object o)
enthaelt Objekt o
-
setValue
public void setValue(java.lang.Object newValue)
- Parameters:
newValue
- the value that all registered clients will be set to, it MUST be a legal value
-
forceParameterTypes
public void forceParameterTypes(java.lang.Class[] classes)
-
-