Klasse ChronoUnitGrid
java.lang.Object
com.flexganttfx.model.dateline.VirtualGrid<ChronoUnit>
com.flexganttfx.model.dateline.ChronoUnitGrid
A virtual grid implementation for
ChronoUnit.- Seit:
- 1.0
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungChronoUnitGrid(String name, String shortName, ChronoUnit unit, int amount) Constructs a new grid.ChronoUnitGrid(String name, ChronoUnit unit, int amount) Constructs a new grid. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungadjustTime(Instant instant, ZoneId zoneId, boolean roundUp, DayOfWeek firstDayOfWeek) Adjusts the given instant so that the returned instant will snap to the position defined by the grid settings.adjustTime(LocalTime time, boolean roundUp) Adjusts the given local time so that the returned time will snap to the position defined by the grid settings.Von Klasse geerbte Methoden com.flexganttfx.model.dateline.VirtualGrid
getAmount, getName, getShortName, getUnit, toString
-
Konstruktordetails
-
ChronoUnitGrid
Constructs a new grid.- Parameter:
name- the grid name as shown in the UI (e.g. "15 Minutes")shortName- the short name (e.g. "15 Min.")unit- the chrono unit on which the grid will be based (e.g. "MINUTE")amount- the amount of the chrono unit (e.g. "15")- Seit:
- 1.0
-
ChronoUnitGrid
Constructs a new grid. The short name will be the same as the long name.- Parameter:
name- the grid name as shown in the UI (e.g. "15 Minutes")unit- the chrono unit on which the grid will be based (e.g. "MINUTE")amount- the amount of the chrono unit (e.g. "15")- Seit:
- 1.0
-
-
Methodendetails
-
adjustTime
public Instant adjustTime(Instant instant, ZoneId zoneId, boolean roundUp, DayOfWeek firstDayOfWeek) Beschreibung aus Klasse kopiert:VirtualGridAdjusts the given instant so that the returned instant will snap to the position defined by the grid settings.- Angegeben von:
adjustTimein KlasseVirtualGrid<ChronoUnit>- Parameter:
instant- the time to adjust to a grid locationzoneId- the time zone for which the adjustment is performed (can be different from row to row)roundUp- a flag signaling whether we want the adjusted time to snap to an earlier or later time (start time or end time)firstDayOfWeek- the weekday that is considered to be the first day of the week (mostly Monday or Sunday)- Gibt zurück:
- the grid adjusted time
-
adjustTime
Beschreibung aus Klasse kopiert:VirtualGridAdjusts the given local time so that the returned time will snap to the position defined by the grid settings.- Angegeben von:
adjustTimein KlasseVirtualGrid<ChronoUnit>- Parameter:
time- the time to adjust to a grid locationroundUp- a flag signaling whether we want the adjusted time to snap to an earlier or later time (start time or end time)- Gibt zurück:
- the grid adjusted local time
-