Class ChangeNotifier

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private javax.swing.event.ChangeEvent changeEvent
      Only one ChangeEvent is needed per button model instance since the event's only state is the source property.
      private javax.swing.event.EventListenerList listenerList
      Stores the listeners on this model.
    • Constructor Summary

      Constructors 
      Constructor Description
      ChangeNotifier()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addChangeListener​(javax.swing.event.ChangeListener l)
      Adds a ChangeListener.
      protected void fireStateChanged()
      Notifies all listeners that have registered interest for notification on this event type.
      void removeChangeListener​(javax.swing.event.ChangeListener l)
      Removes a ChangeListener.
      • Methods inherited from class java.lang.Object

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

      • listenerList

        private final javax.swing.event.EventListenerList listenerList
        Stores the listeners on this model.
      • changeEvent

        private javax.swing.event.ChangeEvent changeEvent
        Only one ChangeEvent is needed per button model instance since the event's only state is the source property. The source of events generated is always "this".
    • Method Detail

      • addChangeListener

        public final void addChangeListener​(javax.swing.event.ChangeListener l)
        Adds a ChangeListener.
        Parameters:
        l - the listener to add
      • removeChangeListener

        public final void removeChangeListener​(javax.swing.event.ChangeListener l)
        Removes a ChangeListener.
        Parameters:
        l - the listener to add
      • fireStateChanged

        protected final void fireStateChanged()
        Notifies all listeners that have registered interest for notification on this event type. The event instance is created lazily.