Class NoOpGrid
java.lang.Object
com.levigo.jadice.web.client.grid.NoOpGrid
- All Implemented Interfaces:
Grid
A "no-op" grid with a Cell width and height of 1.
When calling snap(Point2D, SnapTo)
, this grid will simply return the original point.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.levigo.jadice.web.client.grid.Grid
Grid.SnapTo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the full grid bounds as a Rectangle2D.Returns theCell
corresponding to the given point.getCellBounds
(Cell cell) Returns a rectangle in jadice document units which represents the grid at the givenCell
.double
Returns the cell height of the grid.double
Returns the cell width of the grid.snap
(Point2D point, Grid.SnapTo snapTo) Returns an aligned point which is residing on its correspondingCell
at the position determined byGrid.SnapTo
.
-
Constructor Details
-
NoOpGrid
public NoOpGrid()
-
-
Method Details
-
getCellWidth
public double getCellWidth()Description copied from interface:Grid
Returns the cell width of the grid.- Specified by:
getCellWidth
in interfaceGrid
-
getCellHeight
public double getCellHeight()Description copied from interface:Grid
Returns the cell height of the grid.- Specified by:
getCellHeight
in interfaceGrid
-
getCell
Description copied from interface:Grid
Returns theCell
corresponding to the given point. A point located on the border of two cells belongs to the right / bottom cell. -
getCellBounds
Description copied from interface:Grid
Returns a rectangle in jadice document units which represents the grid at the givenCell
.- Specified by:
getCellBounds
in interfaceGrid
- Parameters:
cell
- the cell- Returns:
- the rectangle representing the bounds of the given cell in jadice document units
-
snap
Description copied from interface:Grid
Returns an aligned point which is residing on its correspondingCell
at the position determined byGrid.SnapTo
. -
getBounds
Description copied from interface:Grid
Returns the full grid bounds as a Rectangle2D.This makes it possible to create margins/offsets. E.g. if the page size is 100x100, the grid bounds could be set to (10, 10, 80, 80) to specify a border of 10 on each edge.
-