Klasse ListActivityRepository<A extends Activity>
java.lang.Object
com.flexganttfx.model.repository.ActivityRepositoryBase<A>
com.flexganttfx.model.repository.MutableActivityRepositoryBase<A>
com.flexganttfx.model.repository.ListActivityRepository<A>
- Typparameter:
A- the type of the activities
- Alle implementierten Schnittstellen:
ActivityRepository<A>, MutableActivityRepository<A>, EventTarget
A repository implementation that utilizes several lists for storing activities.
The repository can return three different iterator types when the application is
asking for the activities within a given time interval.
- Seit:
- 1.0
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifikator und TypKlasseBeschreibungstatic enumA list of possible iterators that the repository can return when the application queries the repository for the activities within a given time interval. -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungConstructs a new repository that returns a binary iterator when the application queries the repository for the activities within a specific time interval.ListActivityRepository(ListActivityRepository.IteratorType iteratorType) Constructs a new repository that returns an iterator of the specified type when the application queries the repository for the activities within a specific time interval. -
Methodenübersicht
Modifikator und TypMethodeBeschreibungfinal voidaddActivity(ActivityRef<A> activityRef) Adds the given activity to the repository.final voidRemoves all activities from all layers from the repository.final voidclearActivities(Layer layer) Removes the activities on the given layer from the repository.getActivities(Layer layer, Instant startTime, Instant endTime, TemporalUnit temporalUnit, ZoneId zoneId) Returns an iterator for iterating over all activities found for the given layer and time interval.Returns all activities on all layers.final InstantReturns the earliest time used by the activities stored in this repository / on this row.Returns the iterator type that is being returned by the repository.final InstantReturns the latest time used by the activities stored in this repository / on this row.final voidremoveActivity(ActivityRef<A> activityRef) Removes the given activity from the repository.final voidsetIteratorType(ListActivityRepository.IteratorType iteratorType) Sets a different iterator type on this repository.Von Klasse geerbte Methoden ActivityRepositoryBase
addEventHandler, buildEventDispatchChain, fireEvent, removeEventHandlerVon Klasse geerbte Methoden Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden ActivityRepository
addEventHandler, removeEventHandlerVon Schnittstelle geerbte Methoden EventTarget
buildEventDispatchChain
-
Konstruktordetails
-
ListActivityRepository
public ListActivityRepository()Constructs a new repository that returns a binary iterator when the application queries the repository for the activities within a specific time interval.- Seit:
- 1.0
- Siehe auch:
-
ListActivityRepository
Constructs a new repository that returns an iterator of the specified type when the application queries the repository for the activities within a specific time interval.- Seit:
- 1.0
-
-
Methodendetails
-
getIteratorType
Returns the iterator type that is being returned by the repository.- Gibt zurück:
- the iterator type
- Seit:
- 1.0
-
setIteratorType
Sets a different iterator type on this repository.- Parameter:
iteratorType- the new iterator type- Seit:
- 1.0
-
getActivities
public final Iterator<A> getActivities(Layer layer, Instant startTime, Instant endTime, TemporalUnit temporalUnit, ZoneId zoneId) Beschreibung aus Schnittstelle kopiert:ActivityRepositoryReturns an iterator for iterating over all activities found for the given layer and time interval. This method has to return very fast as it gets called many times during rendering of the chart. A slow implementation will have a direct impact on scrolling / rendering performance.- Parameter:
layer- the layer for which to return the activitiesstartTime- the start time of the time interval for which to return the activitiesendTime- the end time of the time interval for which to return the activitiestemporalUnit- the temporal unit currently displayed in the datelinezoneId- the timezone currently displayed in the dateline- Gibt zurück:
- the activities on the given layer and in the given time interval
-
addActivity
Beschreibung aus Schnittstelle kopiert:MutableActivityRepositoryAdds the given activity to the repository.- Parameter:
activityRef- the activity
-
removeActivity
Beschreibung aus Schnittstelle kopiert:MutableActivityRepositoryRemoves the given activity from the repository.- Parameter:
activityRef- the activity
-
clearActivities
public final void clearActivities()Beschreibung aus Schnittstelle kopiert:MutableActivityRepositoryRemoves all activities from all layers from the repository. -
clearActivities
Beschreibung aus Schnittstelle kopiert:MutableActivityRepositoryRemoves the activities on the given layer from the repository.- Parameter:
layer- the layer to clear
-
getEarliestTimeUsed
Beschreibung aus Schnittstelle kopiert: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").- Angegeben von:
getEarliestTimeUsedin SchnittstelleActivityRepository<A extends Activity>- Setzt außer Kraft:
getEarliestTimeUsedin KlasseActivityRepositoryBase<A extends Activity>- Gibt zurück:
- the earliest time used by the activities in this repository / row (null if no activities found)
-
getLatestTimeUsed
Beschreibung aus Schnittstelle kopiert: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").- Angegeben von:
getLatestTimeUsedin SchnittstelleActivityRepository<A extends Activity>- Setzt außer Kraft:
getLatestTimeUsedin KlasseActivityRepositoryBase<A extends Activity>- Gibt zurück:
- the latest time used by the activities in this repository / row (null if no activities found)
-
getAllActivities
-