Package mil.nga.grid
Class BaseGrid
- java.lang.Object
-
- mil.nga.grid.BaseGrid
-
public class BaseGrid extends Object
Base Grid- Author:
- osbornb
-
-
Constructor Summary
Constructors Constructor Description BaseGrid()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Color
getColor()
Get the grid line colordouble
getLabelBuffer()
Get the label grid edge bufferLabeler
getLabeler()
Get the grid labelerInteger
getLinesMaxZoom()
Get the maximum zoom level for drawing grid linesint
getLinesMinZoom()
Get the minimum zoom level for drawing grid linesInteger
getMaxZoom()
Get the maximum zoom levelint
getMinZoom()
Get the minimum zoom levelGridStyle
getStyle()
Get the grid line styledouble
getWidth()
Get the grid line widthboolean
hasLabeler()
Has a grid labelerboolean
hasLinesMaxZoom()
Has a maximum zoom level override for drawing grid linesboolean
hasLinesMinZoom()
Has a minimum zoom level override for drawing grid linesboolean
hasMaxZoom()
Has a maximum zoom levelboolean
isEnabled()
Is the grid enabledboolean
isLabelerWithin(int zoom)
Is labeler zoom level within the grid zoom rangeboolean
isLinesWithin(int zoom)
Is the zoom level within the grid lines zoom rangeboolean
isWithin(int zoom)
Is the zoom level within the grid zoom rangevoid
setColor(Color color)
Set the grid line colorvoid
setEnabled(boolean enabled)
Set the enabled flagvoid
setLabeler(Labeler labeler)
Set the grid labelervoid
setLinesMaxZoom(Integer linesMaxZoom)
Set the maximum level override for drawing grid linesvoid
setLinesMinZoom(Integer linesMinZoom)
Set the minimum level override for drawing grid linesvoid
setMaxZoom(Integer maxZoom)
Set the maximum zoom levelvoid
setMinZoom(int minZoom)
Set the minimum zoom levelvoid
setStyle(GridStyle style)
Set the grid line stylevoid
setWidth(double width)
Set the grid line width
-
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
Is the grid enabled- Returns:
- enabled flag
-
setEnabled
public void setEnabled(boolean enabled)
Set the enabled flag- Parameters:
enabled
- enabled flag
-
getMinZoom
public int getMinZoom()
Get the minimum zoom level- Returns:
- minimum zoom level
-
setMinZoom
public void setMinZoom(int minZoom)
Set the minimum zoom level- Parameters:
minZoom
- minimum zoom level
-
getMaxZoom
public Integer getMaxZoom()
Get the maximum zoom level- Returns:
- maximum zoom level
-
hasMaxZoom
public boolean hasMaxZoom()
Has a maximum zoom level- Returns:
- true if has a maximum, false if unbounded
-
setMaxZoom
public void setMaxZoom(Integer maxZoom)
Set the maximum zoom level- Parameters:
maxZoom
- maximum zoom level
-
isWithin
public boolean isWithin(int zoom)
Is the zoom level within the grid zoom range- Parameters:
zoom
- zoom level- Returns:
- true if within range
-
getLinesMinZoom
public int getLinesMinZoom()
Get the minimum zoom level for drawing grid lines- Returns:
- minimum zoom level
-
hasLinesMinZoom
public boolean hasLinesMinZoom()
Has a minimum zoom level override for drawing grid lines- Returns:
- true if has a minimum, false if not overridden
-
setLinesMinZoom
public void setLinesMinZoom(Integer linesMinZoom)
Set the minimum level override for drawing grid lines- Parameters:
linesMinZoom
- minimum zoom level or null to remove
-
getLinesMaxZoom
public Integer getLinesMaxZoom()
Get the maximum zoom level for drawing grid lines- Returns:
- maximum zoom level
-
hasLinesMaxZoom
public boolean hasLinesMaxZoom()
Has a maximum zoom level override for drawing grid lines- Returns:
- true if has a maximum, false if not overridden
-
setLinesMaxZoom
public void setLinesMaxZoom(Integer linesMaxZoom)
Set the maximum level override for drawing grid lines- Parameters:
linesMaxZoom
- maximum zoom level or null to remove
-
isLinesWithin
public boolean isLinesWithin(int zoom)
Is the zoom level within the grid lines zoom range- Parameters:
zoom
- zoom level- Returns:
- true if within range
-
getStyle
public GridStyle getStyle()
Get the grid line style- Returns:
- grid line style
-
setStyle
public void setStyle(GridStyle style)
Set the grid line style- Parameters:
style
- grid line style
-
getColor
public Color getColor()
Get the grid line color- Returns:
- grid line color
-
setColor
public void setColor(Color color)
Set the grid line color- Parameters:
color
- grid line color
-
getWidth
public double getWidth()
Get the grid line width- Returns:
- grid line width
-
setWidth
public void setWidth(double width)
Set the grid line width- Parameters:
width
- grid line width
-
getLabeler
public Labeler getLabeler()
Get the grid labeler- Returns:
- grid labeler
-
hasLabeler
public boolean hasLabeler()
Has a grid labeler- Returns:
- true if has a grid labeler
-
setLabeler
public void setLabeler(Labeler labeler)
Set the grid labeler- Parameters:
labeler
- grid labeler
-
isLabelerWithin
public boolean isLabelerWithin(int zoom)
Is labeler zoom level within the grid zoom range- Parameters:
zoom
- zoom level- Returns:
- true if within range
-
getLabelBuffer
public double getLabelBuffer()
Get the label grid edge buffer- Returns:
- label buffer (greater than or equal to 0.0 and less than 0.5)
-
-