Package mil.nga.gars.grid
Class Grid
- java.lang.Object
-
- mil.nga.grid.BaseGrid
-
- mil.nga.gars.grid.Grid
-
- All Implemented Interfaces:
Comparable<Grid>
public class Grid extends BaseGrid implements Comparable<Grid>
Grid- Author:
- osbornb
-
-
Field Summary
Fields Modifier and Type Field Description static double
DEFAULT_WIDTH
Default line width
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearPrecisionStyles()
Clear the propagated grid type precision stylesint
compareTo(Grid other)
boolean
equals(Object obj)
Color
getColor(GridType gridType)
Get the grid type precision line colorGridLabeler
getLabeler()
Get the grid labelerList<GridLabel>
getLabels(int zoom, Bounds tileBounds)
Get the labels for the zoom and tile boundsList<GridLabel>
getLabels(GridTile tile)
Get the labels for the tileList<GridLine>
getLines(int zoom, Bounds tileBounds)
Get the lines for the zoom and tile boundsList<GridLine>
getLines(Bounds tileBounds)
Get the lines for the tile boundsList<GridLine>
getLines(GridTile tile)
Get the lines for the tiledouble
getPrecision()
Get the precision in degreesGridStyle
getStyle(GridType gridType)
Get the grid type precision line style for the grid typeGridType
getType()
Get the grid typedouble
getWidth(GridType gridType)
Get the grid type precision line widthint
hashCode()
boolean
isType(GridType type)
Is the provided grid typevoid
setColor(GridType gridType, Color color)
Set the grid type precision line colorvoid
setLabeler(GridLabeler labeler)
Set the grid labelervoid
setStyle(GridType gridType, GridStyle style)
Set the grid type precision line stylevoid
setWidth(GridType gridType, double width)
Set the grid type precision line width-
Methods inherited from class mil.nga.grid.BaseGrid
getColor, getLabelBuffer, getLinesMaxZoom, getLinesMinZoom, getMaxZoom, getMinZoom, getStyle, getWidth, hasLabeler, hasLinesMaxZoom, hasLinesMinZoom, hasMaxZoom, isEnabled, isLabelerWithin, isLinesWithin, isWithin, setColor, setEnabled, setLabeler, setLinesMaxZoom, setLinesMinZoom, setMaxZoom, setMinZoom, setStyle, setWidth
-
-
-
-
Constructor Detail
-
Grid
public Grid(GridType type)
Constructor- Parameters:
type
- grid type
-
-
Method Detail
-
getType
public GridType getType()
Get the grid type- Returns:
- grid type
-
isType
public boolean isType(GridType type)
Is the provided grid type- Parameters:
type
- grid type- Returns:
- true if the type
-
getPrecision
public double getPrecision()
Get the precision in degrees- Returns:
- precision degrees
-
getStyle
public GridStyle getStyle(GridType gridType)
Get the grid type precision line style for the grid type- Parameters:
gridType
- grid type- Returns:
- grid type line style
-
setStyle
public void setStyle(GridType gridType, GridStyle style)
Set the grid type precision line style- Parameters:
gridType
- grid typestyle
- grid line style
-
clearPrecisionStyles
public void clearPrecisionStyles()
Clear the propagated grid type precision styles
-
getColor
public Color getColor(GridType gridType)
Get the grid type precision line color- Parameters:
gridType
- grid type- Returns:
- grid type line color
-
setColor
public void setColor(GridType gridType, Color color)
Set the grid type precision line color- Parameters:
gridType
- grid typecolor
- grid line color
-
getWidth
public double getWidth(GridType gridType)
Get the grid type precision line width- Parameters:
gridType
- grid type- Returns:
- grid type line width
-
setWidth
public void setWidth(GridType gridType, double width)
Set the grid type precision line width- Parameters:
gridType
- grid typewidth
- grid line width
-
getLabeler
public GridLabeler getLabeler()
Get the grid labeler- Overrides:
getLabeler
in classBaseGrid
- Returns:
- grid labeler
-
setLabeler
public void setLabeler(GridLabeler labeler)
Set the grid labeler- Parameters:
labeler
- grid labeler
-
getLines
public List<GridLine> getLines(GridTile tile)
Get the lines for the tile- Parameters:
tile
- tile- Returns:
- lines
-
getLines
public List<GridLine> getLines(int zoom, Bounds tileBounds)
Get the lines for the zoom and tile bounds- Parameters:
zoom
- zoom leveltileBounds
- tile bounds- Returns:
- lines
-
getLines
public List<GridLine> getLines(Bounds tileBounds)
Get the lines for the tile bounds- Parameters:
tileBounds
- tile bounds- Returns:
- lines
-
getLabels
public List<GridLabel> getLabels(GridTile tile)
Get the labels for the tile- Parameters:
tile
- tile- Returns:
- labels
-
getLabels
public List<GridLabel> getLabels(int zoom, Bounds tileBounds)
Get the labels for the zoom and tile bounds- Parameters:
zoom
- zoom leveltileBounds
- tile bounds- Returns:
- labels
-
compareTo
public int compareTo(Grid other)
- Specified by:
compareTo
in interfaceComparable<Grid>
-
-