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 theCellcorresponding to the given point.getCellBounds(Cell cell) Returns a rectangle in jadice document units which represents the grid at the givenCell.doubleReturns the cell height of the grid.doubleReturns the cell width of the grid.snap(Point2D point, Grid.SnapTo snapTo) Returns an aligned point which is residing on its correspondingCellat the position determined byGrid.SnapTo.
-
Constructor Details
-
NoOpGrid
public NoOpGrid()
-
-
Method Details
-
getCellWidth
public double getCellWidth()Description copied from interface:GridReturns the cell width of the grid.- Specified by:
getCellWidthin interfaceGrid
-
getCellHeight
public double getCellHeight()Description copied from interface:GridReturns the cell height of the grid.- Specified by:
getCellHeightin interfaceGrid
-
getCell
Description copied from interface:GridReturns theCellcorresponding to the given point. A point located on the border of two cells belongs to the right / bottom cell. -
getCellBounds
Description copied from interface:GridReturns a rectangle in jadice document units which represents the grid at the givenCell.- Specified by:
getCellBoundsin interfaceGrid- Parameters:
cell- the cell- Returns:
- the rectangle representing the bounds of the given cell in jadice document units
-
snap
Description copied from interface:GridReturns an aligned point which is residing on its correspondingCellat the position determined byGrid.SnapTo. -
getBounds
Description copied from interface:GridReturns 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.
-