Klasse GridHelper
java.lang.Object
impl.com.flexganttfx.skin.graphics.GridHelper
Utility methods for snapping times to the current or virtual grid. The graphics skins and
row canvas behaviors use this helper when positioning or resizing activities.
-
Methodenübersicht
Modifikator und TypMethodeBeschreibungstatic Instantgrid(GraphicsBase<?> graphics, Instant time) Returns the nearest grid-aligned instant for the given time.static Instantgrid(GraphicsBase<?> graphics, Instant time, boolean roundUp) Returns the grid-aligned instant for the given time.static LocalTimegrid(GraphicsBase<?> graphics, LocalTime time, boolean roundUp) Returns the grid-aligned local time for the given time.
-
Methodendetails
-
grid
Returns the nearest grid-aligned instant for the given time.- Parameter:
graphics- the graphics controltime- the time- Gibt zurück:
- the grid-aligned instant
-
grid
Returns the grid-aligned instant for the given time.- Parameter:
graphics- the graphics controltime- the timeroundUp- whether the result should be rounded up- Gibt zurück:
- the grid-aligned instant
-
grid
Returns the grid-aligned local time for the given time.- Parameter:
graphics- the graphics controltime- the timeroundUp- whether the result should be rounded up- Gibt zurück:
- the grid-aligned local time
-