Class Dateline

    • Constructor Detail

      • Dateline

        protected Dateline​(Timeline timeline)
        Constructs a new dateline.
        Parameters:
        timeline - the parent timeline
        Since:
        1.0
    • Method Detail

      • selectedTimeIntervalProperty

        public final ReadOnlyObjectProperty<TimeInterval> selectedTimeIntervalProperty()
        A read-only property used to store the currently selected time interval. The value of this property gets updated whenever the user performs a time interval selection by dragging the mouse inside the timeline.
        Returns:
        the currently selected time interval
        Since:
        1.0
      • zoomLassoEnabledProperty

        public final BooleanProperty zoomLassoEnabledProperty()
        A property used to control whether the zoom lasso feature will be available to the user or not. The zoom lasso allows the user to select a time range inside the dateline so that the dateline will zoom in as much as needed in order to make the range completely fill the visible area.
        Returns:
        true if the zoom lasso is enabled
        Since:
        1.0
      • isZoomLassoEnabled

        public final boolean isZoomLassoEnabled()
        Returns the value of zoomLassoEnabledProperty().
        Returns:
        true if the zoom lasso is enabled
        Since:
        1.0
      • setZoomLassoEnabled

        public final void setZoomLassoEnabled​(boolean enabled)
        Sets the value of zoomLassoEnabledProperty().
        Parameters:
        enabled - if true then the zoom lasso is enabled
        Since:
        1.0
      • setCellFactory

        public final <T extends TemporalUnit> void setCellFactory​(Class<T> temporalUnitType,
                                                                  Callback<T,​DatelineCell<T>> factory)
        Sets a cell factory on the dateline used to create dateline cells for the given temporal unit type (e.g. ChronoUnit, SimpleUnit).
        Type Parameters:
        T - the type of the temporal unit (e.g. ChronoUnit)
        Parameters:
        temporalUnitType - the type of the temporal unit (e.g. ChronoUnit)
        factory - the factory used for creating new cells
        Since:
        1.0
      • getCellFactory

        public final Callback<TemporalUnit,​DatelineCell> getCellFactory​(Class<? extends TemporalUnit> temporalUnitType)
        Returns the cell factory used for the given temporal unit type (e.g. ChronoUnit).
        Parameters:
        temporalUnitType - the type of the temporal unit (e.g. ChronoUnit)
        Returns:
        the factory callback
        Since:
        1.0
      • onVisibleRangeChangedProperty

        public final ObjectProperty<EventHandler<DatelineScrollingEvent>> onVisibleRangeChangedProperty()
        A property used to register an event handler that will be invoked whenever the currently visible time range is changing inside the dateline.
        Returns:
        the event handler registered for range changes
        Since:
        1.0
      • getTimeline

        public final Timeline getTimeline()
        Returns the parent timeline container / node.
        Returns:
        the parent timeline
        Since:
        1.0
      • modelProperty

        public final ObjectProperty<DatelineModel<? extends TemporalUnit>> modelProperty()
        A property used to store the model of the dateline control. The model provides information about the list of supported resolutions, available time zones, number of scales inside the dateline.
        Returns:
        the dateline model
        Since:
        1.0
      • firstDayOfWeekProperty

        public final ObjectProperty<DayOfWeek> firstDayOfWeekProperty()
        A property used to store the weekday that is considered the "first day of the week". In Germany the first day of the week is "Monday", in the US it is "Sunday". This is, for example, relevant for displaying grid lines correctly (between weeks).
        Returns:
        the first day of week
        Since:
        1.1
      • setFirstDayOfWeek

        public final void setFirstDayOfWeek​(DayOfWeek day)
        Sets the value of firstDayOfWeekProperty().
        Parameters:
        day - the first day of week
        Since:
        1.1
      • zoneIdProperty

        public final ObjectProperty<ZoneId> zoneIdProperty()
        A property used to store the time zone that is currently shown by the dateline. In this framework the dateline and each row can have their own time zones.
        Returns:
        the time zone ID
        Since:
        1.0
      • getZoneId

        public final ZoneId getZoneId()
        Returns the value of zoneIdProperty().
        Returns:
        the time zone ID
        Since:
        1.0
      • setZoneId

        public final void setZoneId​(ZoneId zoneId)
        Sets the value of zoneIdProperty().
        Parameters:
        zoneId - the time zone ID
        Since:
        1.0
      • zoneIdVisibleProperty

        public final BooleanProperty zoneIdVisibleProperty()
        A property used to control the visibility of the time zone name. The dateline is capable of displaying the time zone that it represents in its upper right corner.
        Returns:
        true if the time zone ID shall be visible
        Since:
        1.0
      • isZoneIdVisible

        public final boolean isZoneIdVisible()
        Returns the value of the zoneIdVisibleProperty().
        Returns:
        true if the time zone ID shall be shown to the user
        Since:
        1.0
      • setZoneIdVisible

        public final void setZoneIdVisible​(boolean visible)
        Sets the value of the zoneIdVisibleProperty().
        Parameters:
        visible - true if the time zone ID shall be shown to the user
        Since:
        1.0
      • primaryTemporalUnitProperty

        public final ReadOnlyObjectProperty<TemporalUnit> primaryTemporalUnitProperty()
        A read-only property used to store the "primary" temporal unit, which is the unit shown at the bottom of the dateline. Example: the dateline shows "Year / Month" at the top and "Days" at the bottom. In this case "Days" will be the primary temporal unit. The primary temporal unit is always passed to the activity repositories when querying for the activities inside the visible time range. This allows the repository to return more or less activities. Example: calendars can decide to not return weekend days if the user is currently looking at "Years".
        Returns:
        the currently shown primary temporal unit
        Since:
        1.0
      • hoverTimeIntervalProperty

        public final ReadOnlyObjectProperty<TimeInterval> hoverTimeIntervalProperty()
        A read-only property that can be used to find out the time shown at the current mouse hover location.
        Returns:
        the time point at the mouse cursor location
        Since:
        1.0
      • getSelectedIntervals

        public final ObservableList<TimeInterval> getSelectedIntervals()
        An observable list of the currently selected time intervals. This list is the "selection model" of the dateline. The difference to the selectedTimeIntervalProperty() is that these selections are permanent while the single selected time interval is only used to highlight a section within the dateline for zoom in / out operations. This list of selected time intervals however represents days or weeks that the user clicked on while pressing the command key (on Mac) or the CTRL key (on Windows / Linux).
        Returns:
        the list of selected time intervals
        Since:
        1.0
      • selectionModeProperty

        public final ObjectProperty<SelectionMode> selectionModeProperty()
        A property used to store the selection mode applied by the dateline when the user adds time interval selections. The value of this property enables the application to switch between a single selection model and a multi selection model.
        Returns:
        the current selection mode (single, multi)
        Since:
        1.0
      • setSelectionMode

        public final void setSelectionMode​(SelectionMode mode)
        Sets the value of selectionModeProperty().
        Parameters:
        mode - the selection mode (single, multi)
        Since:
        1.0
      • getCalendars

        public final ObservableList<Calendar<?>> getCalendars()
        An observable list of calendars associated with the dateline. Information provided by the calendars can be used by the dateline to visualize events directly inside of it (e.g. national holidays).
        Returns:
        the list of calendars attached to the dateline
        Since:
        1.0
      • getScaleResolutions

        public final ObservableList<Resolution<?>> getScaleResolutions()
        An observable list of the currently displayed resolutions within the various scales of the dateline. Example: when the dateline displays "Month" at the top, "Days" in the middle, and "Hours" at the bottom, then the list will have three entries, each entry representing the resolution of its scale.
        Returns:
        the list of currently showing resolutions
        Since:
        1.0
        See Also:
        DatelineModel.getResolutions()
      • getPropertySheetItems

        public final List<org.controlsfx.control.PropertySheet.Item> getPropertySheetItems()