Module com.flexganttfx.model
Package com.flexganttfx.model.repository
Class ActivityRepositoryBase<A extends Activity>
- java.lang.Object
-
- com.flexganttfx.model.repository.ActivityRepositoryBase<A>
-
- Type Parameters:
A- the type of the activities stored in this repository
- All Implemented Interfaces:
ActivityRepository<A>,EventTarget
- Direct Known Subclasses:
CalendarBase,MutableActivityRepositoryBase
public abstract class ActivityRepositoryBase<A extends Activity> extends Object implements ActivityRepository<A>
An abstract base implementation ofActivityRepositorythat provides support for event handlers (adding, removing, firing events).- Since:
- 1.0
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedActivityRepositoryBase()Constructs a new repository.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEventHandler(EventHandler<RepositoryEvent> l)Adds an event handler for receiving repository events.EventDispatchChainbuildEventDispatchChain(EventDispatchChain tail)protected voidfireEvent(RepositoryEvent evt)InstantgetEarliestTimeUsed()Returns the earliest time used by the activities stored in this repository / on this row.InstantgetLatestTimeUsed()Returns the latest time used by the activities stored in this repository / on this row.voidremoveEventHandler(EventHandler<RepositoryEvent> l)Removes the given event handler from the repository.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.flexganttfx.model.ActivityRepository
getActivities
-
-
-
-
Method Detail
-
addEventHandler
public void addEventHandler(EventHandler<RepositoryEvent> l)
Description copied from interface:ActivityRepositoryAdds an event handler for receiving repository events. A repository will fire events if its state changes (e.g. activities added / removed).- Specified by:
addEventHandlerin interfaceActivityRepository<A extends Activity>- Parameters:
l- the event handler that will be added to the repository
-
removeEventHandler
public void removeEventHandler(EventHandler<RepositoryEvent> l)
Description copied from interface:ActivityRepositoryRemoves the given event handler from the repository.- Specified by:
removeEventHandlerin interfaceActivityRepository<A extends Activity>- Parameters:
l- the event handler that will be removed from the repository
-
getEarliestTimeUsed
public Instant getEarliestTimeUsed()
Description copied from interface:ActivityRepositoryReturns the earliest time used by the activities stored in this repository / on this row. This method gets used for navigation (e.g. "scroll to earliest time used in the Gantt chart", "zoom out to show all activities").- Specified by:
getEarliestTimeUsedin interfaceActivityRepository<A extends Activity>- Returns:
- the earliest time used by the activities in this repository / row (null if no activities found)
-
getLatestTimeUsed
public Instant getLatestTimeUsed()
Description copied from interface:ActivityRepositoryReturns the latest time used by the activities stored in this repository / on this row. This method gets used for navigation (e.g. "scroll to latest time used in the Gantt chart", "zoom out to show all activities").- Specified by:
getLatestTimeUsedin interfaceActivityRepository<A extends Activity>- Returns:
- the latest time used by the activities in this repository / row (null if no activities found)
-
buildEventDispatchChain
public EventDispatchChain buildEventDispatchChain(EventDispatchChain tail)
- Specified by:
buildEventDispatchChainin interfaceEventTarget
-
fireEvent
protected void fireEvent(RepositoryEvent evt)
-
-