Options
All
  • Public
  • Public/Protected
  • All
Menu

A utility class for supporting an invisible grid for editing operations on activities. When a grid is set the start and end times of activities will "snap" to locations defined by the grid.

since

1.0

Type parameters

  • T: TemporalUnit

    the type of the temporal unit (e.g. ChronoUnit)

Hierarchy

Index

Methods

Abstract adjustTimeUsingInstant

  • adjustTimeUsingInstant(instant: Instant, zoneId: ZoneId, roundUp: boolean, firstDayOfWeek: DayOfWeek): Instant
  • Adjusts the given instant so that the returned instant will snap to the position defined by the grid settings.

    since

    1.0

    Parameters

    • instant: Instant

      the time to adjust to a grid location

    • zoneId: ZoneId

      the time zone for which the adjustment is performed (can be different from row to row)

    • roundUp: boolean

      a flag signaling whether we want the adjusted time to snap to an earlier or later time (start time or end time)

    • firstDayOfWeek: DayOfWeek

      the weekday that is considered to be the first day of the week (mostly Monday or Sunday)

    Returns Instant

    the grid adjusted time

Abstract adjustTimeUsingLocalTime

  • adjustTimeUsingLocalTime(localTime: LocalTime, roundUp: boolean): LocalTime
  • Adjusts the given local time so that the returned time will snap to the position defined by the grid settings.

    since

    1.0

    Parameters

    • localTime: LocalTime
    • roundUp: boolean

      a flag signaling whether we want the adjusted time to snap to an earlier or later time (start time or end time)

    Returns LocalTime

    the grid adjusted local time

getAmount

  • getAmount(): number
  • The number of units used for the grid.

    since

    1.0

    Returns number

    the number of units

getName

  • getName(): string
  • Returns the grid name that can be used for grid selection controls.

    since

    1.0

    Returns string

    the name of the grid settings

getShortName

  • getShortName(): string
  • Returns the grid short name that can be used for grid selection controls.

    since

    1.0

    Returns string

    the short name of the grid settings

getUnit

  • getUnit(): T
  • The temporal unit used for the grid.

    since

    1.0

    Returns T

    the temporal unit of the grid

toString

  • toString(): string
  • Returns string