Class 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 debugging
      boolean contains​(java.lang.Object o)
      enthaelt Objekt o
      void forceParameterTypes​(java.lang.Class[] classes)  
      void remove​(java.lang.Object client)  
      void removeAll()
      all client objects that observed change of value are removed
      void setValue​(java.lang.Object newValue)  
      int size()
      number of registered objects (for debug purposes)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • methodName

        public final java.lang.String methodName
    • 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 NULL
        methodName - 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)