Class AbstractAnnotation

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private javax.swing.event.EventListenerList listenerList
      Storage for registered change listeners.
      private boolean notify
      A flag that indicates whether listeners should be notified about changes of the annotation.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractAnnotation()
      Constructs an annotation.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addChangeListener​(AnnotationChangeListener listener)
      Registers an object to receive notification of changes to the annotation.
      boolean canEqual​(java.lang.Object other)
      Ensures symmetry between super/subclass implementations of equals.
      java.lang.Object clone()
      Returns a clone of the annotation.
      boolean equals​(java.lang.Object obj)  
      protected void fireAnnotationChanged()
      Notifies all registered listeners that the annotation has changed.
      boolean getNotify()
      Returns a flag that indicates whether listeners should be notified about changes to the annotation.
      int hashCode()  
      boolean hasListener​(java.util.EventListener listener)
      Returns true if the specified object is registered with the annotation as a listener.
      protected void notifyListeners​(AnnotationChangeEvent event)
      Notifies all registered listeners that the annotation has changed.
      private void readObject​(java.io.ObjectInputStream stream)
      Restores a serialized object.
      void removeChangeListener​(AnnotationChangeListener listener)
      Deregisters an object so that it no longer receives notification of changes to the annotation.
      void setNotify​(boolean flag)
      Sets a flag that indicates whether listeners should be notified about changes of an annotation.
      private void writeObject​(java.io.ObjectOutputStream stream)
      Handles serialization.
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • listenerList

        private transient javax.swing.event.EventListenerList listenerList
        Storage for registered change listeners.
      • notify

        private boolean notify
        A flag that indicates whether listeners should be notified about changes of the annotation.
    • Constructor Detail

      • AbstractAnnotation

        protected AbstractAnnotation()
        Constructs an annotation.
    • Method Detail

      • getNotify

        public boolean getNotify()
        Returns a flag that indicates whether listeners should be notified about changes to the annotation.
        Returns:
        the flag.
        See Also:
        setNotify(boolean)
      • setNotify

        public void setNotify​(boolean flag)
        Sets a flag that indicates whether listeners should be notified about changes of an annotation.
        Parameters:
        flag - the flag
        See Also:
        getNotify()
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Returns a clone of the annotation. The cloned annotation will NOT include the AnnotationChangeListener references that have been registered with this annotation.
        Overrides:
        clone in class java.lang.Object
        Returns:
        A clone.
        Throws:
        java.lang.CloneNotSupportedException - if the annotation does not support cloning.
      • writeObject

        private void writeObject​(java.io.ObjectOutputStream stream)
                          throws java.io.IOException
        Handles serialization.
        Parameters:
        stream - the output stream.
        Throws:
        java.io.IOException - if there is an I/O problem.
      • readObject

        private void readObject​(java.io.ObjectInputStream stream)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
        Restores a serialized object.
        Parameters:
        stream - the input stream.
        Throws:
        java.io.IOException - if there is an I/O problem.
        java.lang.ClassNotFoundException - if there is a problem loading a class.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        public boolean canEqual​(java.lang.Object other)
        Ensures symmetry between super/subclass implementations of equals. For more detail, see http://jqno.nl/equalsverifier/manual/inheritance.
        Parameters:
        other - Object
        Returns:
        true ONLY if the parameter is THIS class type