Klasse ChronoUnitResolution
java.lang.Object
com.flexganttfx.model.dateline.Resolution<ChronoUnit>
com.flexganttfx.model.dateline.ChronoUnitResolution
A resolution type for
ChronoUnit that can be used in combination with
the ChronoUnitDatelineModel.- Seit:
- 1.0
- Siehe auch:
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen com.flexganttfx.model.dateline.Resolution
Resolution.Position -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungChronoUnitResolution(ChronoUnit unit, String format, int stepRate) Constructs a new resolution for the given unit, format, step rate, and positions.ChronoUnitResolution(ChronoUnit unit, String format, int stepRate, Resolution.Position... supportedPositions) Constructs a new resolution for the given unit, format, step rate, and positions. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungCreates a virtual grid for editing operations based on the settings of this resolution.Decrements the given time based on the temporal unit represented by this resolution.Formats the given time / instant for the given time zone based on the settings of this resolution.Increments the given time based on the temporal unit represented by this resolution.booleanReturns true if the last call toincrement(Instant, ZoneId)was affected by a DST end.booleanReturns true if the last call toincrement(Instant, ZoneId)was affected by a DST start.Truncates the given time based on the temporal unit represented by this resolution.Von Klasse geerbte Methoden com.flexganttfx.model.dateline.Resolution
getFormat, getStepRate, getTemporalUnit, isSupportingPosition, toString
-
Konstruktordetails
-
ChronoUnitResolution
public ChronoUnitResolution(ChronoUnit unit, String format, int stepRate, Resolution.Position... supportedPositions) Constructs a new resolution for the given unit, format, step rate, and positions.- Parameter:
unit- the chrono unit supported by this resolution (e.g. DAY)format- the format how the unit will be shown on the screenstepRate- the step rate (e.g. "1" Minute, "5" Minutes, "15" Minutes)supportedPositions- the position inside the dateline where this resolution can be displayed (top, middle, bottom)- Seit:
- 1.0
-
ChronoUnitResolution
Constructs a new resolution for the given unit, format, step rate, and positions.- Parameter:
unit- the chrono unit supported by this resolution (e.g. DAY)format- the format how the unit will be shown on the screenstepRate- the step rate (e.g. "1" Minute, "5" Minutes, "15" Minutes)- Seit:
- 1.0
-
-
Methodendetails
-
format
Beschreibung aus Klasse kopiert:ResolutionFormats the given time / instant for the given time zone based on the settings of this resolution.- Angegeben von:
formatin KlasseResolution<ChronoUnit>- Parameter:
instant- the time used for the formattingzoneId- the time zone- Gibt zurück:
- the formatted time
-
truncate
Beschreibung aus Klasse kopiert:ResolutionTruncates 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:
truncatein KlasseResolution<ChronoUnit>- Parameter:
instant- the time to truncatezoneId- the time zonefirstDayOfWeek- the weekday that is considered to be the first day of the week- Gibt zurück:
- the truncated time
-
isDSTStartIncrement
public boolean isDSTStartIncrement()Returns true if the last call toincrement(Instant, ZoneId)was affected by a DST start. Example: if the resolution is "3 hours" and the current time is midnight, then the new local time might actually be 4am, instead of 3am. Because on DST start the clocks will be advanced by one hour.- Gibt zurück:
- true if the resolution's increment method was affected by the start of DST
-
isDSTEndIncrement
public boolean isDSTEndIncrement()Returns true if the last call toincrement(Instant, ZoneId)was affected by a DST end. Example: if the resolution is "3 hours" and the current time is midnight, then the new local time might actually be 2am, instead of 3am. Because on DST end the clocks will be turned back by one hour.- Gibt zurück:
- true if the resolution's increment method was affected by the end of DST
-
increment
Beschreibung aus Klasse kopiert:ResolutionIncrements 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:
incrementin KlasseResolution<ChronoUnit>- Parameter:
instant- the time to incrementzoneId- the time zone- Gibt zurück:
- the incremented time
-
decrement
Beschreibung aus Klasse kopiert:ResolutionDecrements 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:
decrementin KlasseResolution<ChronoUnit>- Parameter:
instant- the time to incrementzoneId- the time zone- Gibt zurück:
- the incremented time
-
createGrid
Beschreibung aus Klasse kopiert:ResolutionCreates a virtual grid for editing operations based on the settings of this resolution.- Angegeben von:
createGridin KlasseResolution<ChronoUnit>- Gibt zurück:
- the virtual grid
-