Class FolderEvent

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int CREATED
      The folder was created.
      static int DELETED
      The folder was deleted.
      protected Folder folder
      The folder the event occurred on.
      protected Folder newFolder
      The folder representing the new name, in the case of a RENAMED event.
      static int RENAMED
      The folder was renamed.
      protected int type
      The event type.
      • Fields inherited from class java.util.EventObject

        source
    • Constructor Summary

      Constructors 
      Constructor Description
      FolderEvent​(java.lang.Object source, Folder folder, int type)
      Constructor.
      FolderEvent​(java.lang.Object source, Folder oldFolder, Folder newFolder, int type)
      Constructor for RENAMED events.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dispatch​(java.lang.Object listener)
      Invokes the appropriate listener method.
      Folder getFolder()
      Returns the affected folder.
      Folder getNewFolder()
      Returns the folder representing the new name, in the case of a RENAMED event.
      int getType()
      Returns the type of this event.
      • Methods inherited from class java.util.EventObject

        getSource, toString
      • Methods inherited from class java.lang.Object

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

      • type

        protected int type
        The event type.
      • folder

        protected transient Folder folder
        The folder the event occurred on.
      • newFolder

        protected transient Folder newFolder
        The folder representing the new name, in the case of a RENAMED event.
    • Constructor Detail

      • FolderEvent

        public FolderEvent​(java.lang.Object source,
                           Folder folder,
                           int type)
        Constructor.
        Parameters:
        source - the source
        folder - the affected folder
        type - the event type (CREATED or DELETED)
      • FolderEvent

        public FolderEvent​(java.lang.Object source,
                           Folder oldFolder,
                           Folder newFolder,
                           int type)
        Constructor for RENAMED events.
        Parameters:
        source - the source
        oldFolder - the folder that is renamed
        newFolder - the folder that represents the new name
        type - the event type (RENAMED)
    • Method Detail

      • getType

        public int getType()
        Returns the type of this event.
      • getNewFolder

        public Folder getNewFolder()
        Returns the folder representing the new name, in the case of a RENAMED event.
        See Also:
        getFolder()
      • dispatch

        public void dispatch​(java.lang.Object listener)
        Invokes the appropriate listener method.
        Specified by:
        dispatch in class MailEvent