Klasse SimpleUnitResolution

java.lang.Object
com.flexganttfx.model.dateline.Resolution<SimpleUnit>
com.flexganttfx.model.dateline.SimpleUnitResolution

public final class SimpleUnitResolution extends Resolution<SimpleUnit>
A resolution type for SimpleUnit that can be used in combination with the SimpleUnitDatelineModel.
Seit:
1.0
Siehe auch:
  • Konstruktordetails

    • SimpleUnitResolution

      public SimpleUnitResolution(SimpleUnit unit, String format, int stepRate, Resolution.Position... supportedPositions)
      Constructs a new resolution for the given unit, format, step rate, and positions.
      Parameter:
      unit - the simple unit supported by this resolution (e.g. TEN)
      format - the format how the unit will be shown on the screen
      stepRate - the step rate (e.g. "1", "5", "15")
      supportedPositions - the position inside the dateline where this resolution can be displayed (top, middle, bottom)
      Seit:
      1.0
    • SimpleUnitResolution

      public SimpleUnitResolution(SimpleUnit unit, String format, int stepRate)
      Constructs a new resolution for the given unit, format, step rate, and positions.
      Parameter:
      unit - the simple unit supported by this resolution (e.g. TEN)
      format - the format how the unit will be shown on the screen
      stepRate - the step rate (e.g. "1", "5", "15")
      Seit:
      1.0
  • Methodendetails

    • format

      public String format(Instant instant, ZoneId zoneId)
      Beschreibung aus Klasse kopiert: Resolution
      Formats the given time / instant for the given time zone based on the settings of this resolution.
      Angegeben von:
      format in Klasse Resolution<SimpleUnit>
      Parameter:
      instant - the time used for the formatting
      zoneId - the time zone
      Gibt zurück:
      the formatted time
    • truncate

      public Instant truncate(Instant temporal, ZoneId zoneId, DayOfWeek firstDayOfWeek)
      Beschreibung aus Klasse kopiert: Resolution
      Truncates the given time based on the temporal unit represented by this resolution. Example: a date located on a Wednesday will be adjusted to a date on the previous Monday (if Monday is the first day of the week in the given time zone).
      Angegeben von:
      truncate in Klasse Resolution<SimpleUnit>
      Parameter:
      temporal - the time to truncate
      zoneId - the time zone
      firstDayOfWeek - the weekday that is considered to be the first day of the week
      Gibt zurück:
      the truncated time
    • increment

      public Instant increment(Instant instant, ZoneId zoneId)
      Beschreibung aus Klasse kopiert: Resolution
      Increments the given time based on the temporal unit represented by this resolution. Example: if the temporal unit is DAY and the given time is located on Monday, then the incremented time will be Tuesday. If the temporal unit is WEEK then the incremented time will be the Monday of the next week. This function is very important for building the cells in the dateline control.
      Angegeben von:
      increment in Klasse Resolution<SimpleUnit>
      Parameter:
      instant - the time to increment
      zoneId - the time zone
      Gibt zurück:
      the incremented time
    • decrement

      public Instant decrement(Instant instant, ZoneId zoneId)
      Beschreibung aus Klasse kopiert: Resolution
      Decrements the given time based on the temporal unit represented by this resolution. Example: if the temporal unit is DAY and the given time is located on Monday, then the decremented time will be Sunday. If the temporal unit is WEEK then the decremented time will be the Monday of the previous week. This function is very important for building the cells in the dateline control.
      Angegeben von:
      decrement in Klasse Resolution<SimpleUnit>
      Parameter:
      instant - the time to increment
      zoneId - the time zone
      Gibt zurück:
      the incremented time
    • createGrid

      public VirtualGrid<SimpleUnit> createGrid()
      Beschreibung aus Klasse kopiert: Resolution
      Creates a virtual grid for editing operations based on the settings of this resolution.
      Angegeben von:
      createGrid in Klasse Resolution<SimpleUnit>
      Gibt zurück:
      the virtual grid