DateControl#setVirtualGrid(VirtualGrid)
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final String | |
| public static final VirtualGrid | OFF
The virtual grid in |
| private final String | |
| private final ChronoUnit |
| Access | Constructor and Description |
|---|---|
| public | VirtualGrid(String
the name of the grid (e.g. "15 Minutes") name, String the short name of the grid (e.g. "15 Min.") shortName, ChronoUnit the time unit of the grid (seconds, minutes, hours) unit, int the amount of the unit (5, 10, 15 minutes) amount)Constructs a new virtual grid. |
| Modifier and Type | Method and Description |
|---|---|
| public ZonedDateTime | Returns: the adjusted timethe time to adjust time, boolean the rounding direction roundUp, DayOfWeek the first day of the week (needed for rounding weeks) firstDayOfWeek)Adjusts the given time either rounding it up or down. |
| public Instant | Returns: the adjusted instantthe instant to adjust instant, ZoneId the time zone zoneId, boolean the rounding direction roundUp, DayOfWeek the first day of the week (needed for rounding weeks) firstDayOfWeek)Adjusts the given instant either rounding it up or down. |
| public LocalDateTime | Returns: the adjusted timethe time to adjust time, boolean the rounding direction roundUp, DayOfWeek the first day of the week (needed for rounding weeks) firstDayOfWeek)Adjusts the given time either rounding it up or down. |
| public final int | |
| public final String | Returns: the name of the grid settingsReturns the grid name that can be used for grid selection controls. |
| public final String | Returns: the short name of the grid settingsReturns the grid short name that can be used for grid selection controls. |
| public final ChronoUnit | |
| public String |
| amount | back to summary |
|---|---|
| private final int amount | |
| name | back to summary |
|---|---|
| private final String name | |
| OFF | back to summary |
|---|---|
| public static final VirtualGrid OFF The virtual grid in | |
| shortName | back to summary |
|---|---|
| private final String shortName | |
| unit | back to summary |
|---|---|
| private final ChronoUnit unit | |
| VirtualGrid | back to summary |
|---|---|
| public VirtualGrid(String name, String shortName, ChronoUnit unit, int amount) Constructs a new virtual grid.
| |
| adjustTime | back to summary |
|---|---|
| public ZonedDateTime adjustTime(ZonedDateTime time, boolean roundUp, DayOfWeek firstDayOfWeek) Adjusts the given time either rounding it up or down.
| |
| adjustTime | back to summary |
|---|---|
| public Instant adjustTime(Instant instant, ZoneId zoneId, boolean roundUp, DayOfWeek firstDayOfWeek) Adjusts the given instant either rounding it up or down. | |
| adjustTime | back to summary |
|---|---|
| public LocalDateTime adjustTime(LocalDateTime time, boolean roundUp, DayOfWeek firstDayOfWeek) Adjusts the given time either rounding it up or down.
| |
| getAmount | back to summary |
|---|---|
| public final int getAmount() The number of units used for the grid.
| |
| getName | back to summary |
|---|---|
| public final String getName() Returns the grid name that can be used for grid selection controls.
| |
| getShortName | back to summary |
|---|---|
| public final String getShortName() Returns the grid short name that can be used for grid selection controls.
| |
| getUnit | back to summary |
|---|---|
| public final ChronoUnit getUnit() The temporal unit used for the grid.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |