Package mil.nga.grid
Class Labeler
- java.lang.Object
-
- mil.nga.grid.Labeler
-
public abstract class Labeler extends Object
Grid Labeler- Author:
- osbornb
-
-
Constructor Summary
Constructors Constructor Description Labeler(boolean enabled, int minZoom, Integer maxZoom, Color color, double textSize, double buffer)
ConstructorLabeler(int minZoom, Integer maxZoom, Color color, double textSize, double buffer)
ConstructorLabeler(int minZoom, Color color, double textSize, double buffer)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getBuffer()
Get the grid edge bufferColor
getColor()
Get the label colorInteger
getMaxZoom()
Get the maximum zoom levelint
getMinZoom()
Get the minimum zoom leveldouble
getTextSize()
Get the label text sizeboolean
hasMaxZoom()
Has a maximum zoom levelboolean
isEnabled()
Is the grid enabledboolean
isWithin(int zoom)
Is the zoom level within the grid zoom rangevoid
setBuffer(double buffer)
Set the grid edge buffervoid
setColor(Color color)
Set the label colorvoid
setEnabled(boolean enabled)
Set the enabled flagvoid
setMaxZoom(Integer maxZoom)
Set the maximum zoom levelvoid
setMinZoom(int minZoom)
Set the minimum zoom levelvoid
setTextSize(double textSize)
Set the label text size
-
-
-
Constructor Detail
-
Labeler
public Labeler(int minZoom, Color color, double textSize, double buffer)
Constructor- Parameters:
minZoom
- minimum zoomcolor
- label colortextSize
- label text sizebuffer
- grid edge buffer (greater than or equal to 0.0 and less than 0.5)
-
Labeler
public Labeler(int minZoom, Integer maxZoom, Color color, double textSize, double buffer)
Constructor- Parameters:
minZoom
- minimum zoommaxZoom
- maximum zoomcolor
- label colortextSize
- label text sizebuffer
- grid edge buffer (greater than or equal to 0.0 and less than 0.5)
-
Labeler
public Labeler(boolean enabled, int minZoom, Integer maxZoom, Color color, double textSize, double buffer)
Constructor- Parameters:
enabled
- enabled labelerminZoom
- minimum zoommaxZoom
- maximum zoomcolor
- label colortextSize
- label text sizebuffer
- grid edge buffer (greater than or equal to 0.0 and less than 0.5)
-
-
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
-
getColor
public Color getColor()
Get the label color- Returns:
- label color
-
setColor
public void setColor(Color color)
Set the label color- Parameters:
color
- label color
-
getTextSize
public double getTextSize()
Get the label text size- Returns:
- label text size
-
setTextSize
public void setTextSize(double textSize)
Set the label text size- Parameters:
textSize
- label text size
-
getBuffer
public double getBuffer()
Get the grid edge buffer- Returns:
- buffer (greater than or equal to 0.0 and less than 0.5)
-
setBuffer
public void setBuffer(double buffer)
Set the grid edge buffer- Parameters:
buffer
- buffer (greater than or equal to 0.0 and less than 0.5)
-
-