- java.lang.Object
-
- java.util.EventObject
-
- javafx.event.Event
-
- com.flexganttfx.view.timeline.DatelineScrollingEvent
-
- All Implemented Interfaces:
Serializable
,Cloneable
public final class DatelineScrollingEvent extends Event
A special event type used for informing the application about horizontal scrolling within the dateline. Scrolling = moving forward or back in time. Listening for this event is extremely useful for implementing a lazy loading strategy. Applications can listen for this event and then dynamically load the data that belongs to the new time interval.- Since:
- 1.0
- See Also:
Dateline.setOnVisibleRangeChanged(EventHandler)
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static EventType<DatelineScrollingEvent>
ANY_SCROLLING
static EventType<DatelineScrollingEvent>
VISIBLE_RANGE_CHANGED
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description DatelineScrollingEvent(Object source, EventTarget target, EventType<DatelineScrollingEvent> eventType, Instant startTime, Instant endTime, ZoneId zoneId)
Constructs a new event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Instant
getEndTime()
Returns the new end time of the visible time range shown by the dateline / the gantt chart.Instant
getStartTime()
Returns the new start time of the visible time range shown by the dateline / the gantt chart.ZoneId
getZoneId()
Returns the ID of the time zone currently displayed by the dateline.-
Methods inherited from class javafx.event.Event
clone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumed
-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Field Detail
-
ANY_SCROLLING
public static final EventType<DatelineScrollingEvent> ANY_SCROLLING
-
VISIBLE_RANGE_CHANGED
public static final EventType<DatelineScrollingEvent> VISIBLE_RANGE_CHANGED
-
-
Constructor Detail
-
DatelineScrollingEvent
public DatelineScrollingEvent(Object source, EventTarget target, EventType<DatelineScrollingEvent> eventType, Instant startTime, Instant endTime, ZoneId zoneId)
Constructs a new event.- Parameters:
source
- the event source (the dateline)target
- the event target (the dateline)eventType
- the type of eventstartTime
- the new start time of the visible rangeendTime
- the new end time of the visible rangezoneId
- the time zone currently shown by the dateline- Since:
- 1.0
-
-
Method Detail
-
getStartTime
public final Instant getStartTime()
Returns the new start time of the visible time range shown by the dateline / the gantt chart.- Returns:
- the start time of the visible range
- Since:
- 1.0
-
getEndTime
public final Instant getEndTime()
Returns the new end time of the visible time range shown by the dateline / the gantt chart.- Returns:
- the end time of the visible range
- Since:
- 1.0
-
getZoneId
public final ZoneId getZoneId()
Returns the ID of the time zone currently displayed by the dateline.- Returns:
- the time zone
- Since:
- 1.0
-
-