Class RepositoryEvent

java.lang.Object
java.util.EventObject
javafx.event.Event
com.flexganttfx.model.repository.RepositoryEvent
All Implemented Interfaces:
Serializable, Cloneable

public final class RepositoryEvent
extends Event
An event class used by activity repositories to inform event handlers about changes.
Since:
1.0
See Also:
ActivityRepository.addEventHandler(EventHandler), ActivityRepository.removeEventHandler(EventHandler), Serialized Form
  • Field Details

  • Constructor Details

    • RepositoryEvent

      public RepositoryEvent​(EventType<RepositoryEvent> eventType, ActivityRepository<?> repository, ActivityRef<?> activityRef)
      Constructs a new repository event.
      Parameters:
      eventType - the type of the event, e.g. #ACTIVITY_ADDED
      repository - the repository where the event occurred
      activityRef - the affected activity (ref)
      Since:
      1.0
    • RepositoryEvent

      public RepositoryEvent​(ActivityRepository<?> repository)
      Constructs a new repository event, the event type will be set to #REPOSITORY_CHANGED.
      Parameters:
      repository - the repository where the event occurred
      Since:
      1.0
  • Method Details