Class Controller

  • Direct Known Subclasses:
    MemberController

    public abstract class Controller
    extends java.util.Observable
    Parent-class for all controller-classes. Every controller which changes the model should inherit this class to make it observable.
    Author:
    Kapeluch
    • Constructor Summary

      Constructors 
      Constructor Description
      Controller()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void changed()
      Notifies all observers.
      void changed​(java.lang.Object oldValue, java.lang.Object newValue)
      Overloaded method for notification including the comparison of old and new value.
      • Methods inherited from class java.util.Observable

        addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
      • Methods inherited from class java.lang.Object

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

      • Controller

        public Controller()
    • Method Detail

      • changed

        public void changed()
        Notifies all observers.
      • changed

        public void changed​(java.lang.Object oldValue,
                            java.lang.Object newValue)
        Overloaded method for notification including the comparison of old and new value. Notification will only be applied if newValue differs from oldValue.
        Parameters:
        oldValue - The old value (before a change is done).
        newValue - The new value (should differ from the oldValue, otherwise this method will no fire a change event).