Package mil.nga.mgrs.grid
Class Grids
- java.lang.Object
 - 
- mil.nga.grid.BaseGrids<Grid,ZoomGrids>
 - 
- mil.nga.mgrs.grid.Grids
 
 
 
- 
- 
Field Summary
- 
Fields inherited from class mil.nga.grid.BaseGrids
properties 
 - 
 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Gridscreate()Create with all grid types enabledstatic Gridscreate(Collection<GridType> types)Create with grids to enablestatic Gridscreate(GridType... types)Create with grids to enablestatic GridscreateGZD()Create only Grid Zone Designator gridsvoiddeletePropagatedStyles()Delete propagated stylesvoiddeletePropagatedStyles(Collection<GridType> types)Delete propagated styles for the grid typesvoiddeletePropagatedStyles(GridType type)Delete propagated styles for the grid typevoiddeletePropagatedStyles(GridType... types)Delete propagated styles for the grid typesvoiddisable(GridType type)Disable the grid typevoiddisableAllLabelers()Disable all grid labelersvoiddisableLabeler(GridType type)Disable the grid type labelervoiddisableLabelers(Collection<GridType> types)Disable the labelers for the grid typesvoiddisableLabelers(GridType... types)Disable the labelers for the grid typesvoiddisableTypes(Collection<GridType> types)Disable grid typesvoiddisableTypes(GridType... types)Disable grid typesvoidenable(GridType type)Enable the grid typevoidenableLabeler(GridType type)Enable the grid type labelervoidenableLabelers(Collection<GridType> types)Enable the labelers for the grid typesvoidenableLabelers(GridType... types)Enable the labelers for the grid typesvoidenableTypes(Collection<GridType> types)Enable grid typesvoidenableTypes(GridType... types)Enable grid typesdoublegetDefaultWidth()GridgetGrid(GridType type)Get the griddoublegetLabelBuffer(GridType type)Get the label grid zone edge bufferGridLabelergetLabeler(GridType type)Get the labeler for the grid typeGridTypegetPrecision(int zoom)Get the grid precision for the zoom levelCollection<Grid>grids()booleanhasLabeler(GridType type)Has a labeler for the grid typebooleanisEnabled(GridType type)Is the grid type enabledbooleanisLabelerEnabled(GridType type)Is a labeler enabled for the grid typeprotected GridnewGrid(GridType type)Create a new grid, override to create a specialized gridprotected ZoomGridsnewZoomGrids(int zoom)voidsetAllColors(Color color)Set all grid line colorsvoidsetAllLabelColors(Color color)Set all label colorsvoidsetAllLabelTextSizes(double textSize)Set all label text sizesvoidsetAllWidths(double width)Set all grid line widthsvoidsetColor(Collection<GridType> types, Color color)Set the grid line color for the grid typesvoidsetColor(Collection<GridType> types, GridType precisionType, Color color)Set the grid type precision line color for the grid typesvoidsetColor(Color color, GridType... types)Set the grid line color for the grid typesvoidsetColor(GridType type, Collection<GridType> precisionTypes, Color color)Set the grid type precision line colors for the grid typevoidsetColor(GridType type, Color color)Set the grid line color for the grid typevoidsetColor(GridType type, Color color, GridType... precisionTypes)Set the grid type precision line colors for the grid typevoidsetColor(GridType type, GridType precisionType, Color color)Set the grid type precision line color for the grid typevoidsetGrids(Collection<Grid> grids)Set the active gridsvoidsetGrids(Grid... grids)Set the active gridsvoidsetGrids(GridType... types)Set the active grid typesvoidsetGridTypes(Collection<GridType> types)Set the active grid typesvoidsetLabelBuffer(double buffer, GridType... types)Set the label grid zone edge buffer for the grid typesvoidsetLabelBuffer(Collection<GridType> types, double buffer)Set the label grid zone edge buffer for the grid typesvoidsetLabelBuffer(GridType type, double buffer)Set the label grid zone edge buffervoidsetLabelColor(Collection<GridType> types, Color color)Set the label color for the grid typesvoidsetLabelColor(Color color, GridType... types)Set the label color for the grid typesvoidsetLabelColor(GridType type, Color color)Set the label colorvoidsetLabeler(GridType type, GridLabeler labeler)Set the labeler for the grid typevoidsetLabelMaxZoom(GridType type, Integer maxZoom)Set the grid maximum zoomvoidsetLabelMinZoom(GridType type, int minZoom)Set the grid minimum zoomvoidsetLabelTextSize(double textSize, GridType... types)Set the label text size for the grid typesvoidsetLabelTextSize(Collection<GridType> types, double textSize)Set the label text size for the grid typesvoidsetLabelTextSize(GridType type, double textSize)Set the label text sizevoidsetLabelZoomRange(GridType type, int minZoom, Integer maxZoom)Set the grid zoom rangevoidsetLinesMaxZoom(GridType type, Integer maxZoom)Set the grid maximum level override for drawing grid linesvoidsetLinesMinZoom(GridType type, Integer minZoom)Set the grid minimum level override for drawing grid linesvoidsetMaxZoom(GridType type, Integer maxZoom)Set the grid maximum zoomvoidsetMinZoom(GridType type, int minZoom)Set the grid minimum zoomvoidsetWidth(double width, GridType... types)Set the grid line width for the grid typesvoidsetWidth(Collection<GridType> types, double width)Set the grid line width for the grid typesvoidsetWidth(Collection<GridType> types, GridType precisionType, double width)Set the grid type precision line width for the grid typesvoidsetWidth(GridType type, double width)Set the grid line width for the grid typevoidsetWidth(GridType type, double width, GridType... precisionTypes)Set the grid type precision line widths for the grid typevoidsetWidth(GridType type, Collection<GridType> precisionTypes, double width)Set the grid type precision line widths for the grid typevoidsetWidth(GridType type, GridType precisionType, double width)Set the grid type precision line width for the grid typevoidsetZoomRange(GridType type, int minZoom, Integer maxZoom)Set the grid zoom range- 
Methods inherited from class mil.nga.grid.BaseGrids
createZoomGrids, disable, disableGrids, disableGrids, enable, enableAllLabelers, enableGrids, enableGrids, getGrids, getGridStyle, loadGrid, loadGridStyleColor, loadGridStyleWidth, setAllLabelBuffers, setMaxZoom, setMinZoom, setZoomRange 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
Grids
public Grids()
Constructor, all grid types enabled per property configurations 
- 
Grids
public Grids(GridType... types)
Constructor- Parameters:
 types- grid types to enable
 
- 
Grids
public Grids(Collection<GridType> types)
Constructor- Parameters:
 types- grid types to enable
 
 - 
 
- 
Method Detail
- 
create
public static Grids create()
Create with all grid types enabled- Returns:
 - grids
 
 
- 
create
public static Grids create(GridType... types)
Create with grids to enable- Parameters:
 types- grid types to enable- Returns:
 - grids
 
 
- 
create
public static Grids create(Collection<GridType> types)
Create with grids to enable- Parameters:
 types- grid types to enable- Returns:
 - grids
 
 
- 
createGZD
public static Grids createGZD()
Create only Grid Zone Designator grids- Returns:
 - grids
 
 
- 
getDefaultWidth
public double getDefaultWidth()
- Specified by:
 getDefaultWidthin classBaseGrids<Grid,ZoomGrids>
 
- 
newGrid
protected Grid newGrid(GridType type)
Create a new grid, override to create a specialized grid- Parameters:
 type- grid type- Returns:
 - grid
 
 
- 
newZoomGrids
protected ZoomGrids newZoomGrids(int zoom)
- Specified by:
 newZoomGridsin classBaseGrids<Grid,ZoomGrids>
 
- 
getPrecision
public GridType getPrecision(int zoom)
Get the grid precision for the zoom level- Parameters:
 zoom- zoom level- Returns:
 - grid type precision
 
 
- 
setGrids
public void setGrids(GridType... types)
Set the active grid types- Parameters:
 types- grid types
 
- 
setGrids
public void setGrids(Grid... grids)
Set the active grids- Parameters:
 grids- grids
 
- 
setGridTypes
public void setGridTypes(Collection<GridType> types)
Set the active grid types- Parameters:
 types- grid types
 
- 
setGrids
public void setGrids(Collection<Grid> grids)
Set the active grids- Parameters:
 grids- grids
 
- 
enableTypes
public void enableTypes(GridType... types)
Enable grid types- Parameters:
 types- grid types
 
- 
enableTypes
public void enableTypes(Collection<GridType> types)
Enable grid types- Parameters:
 types- grid types
 
- 
disableTypes
public void disableTypes(GridType... types)
Disable grid types- Parameters:
 types- grid types
 
- 
disableTypes
public void disableTypes(Collection<GridType> types)
Disable grid types- Parameters:
 types- grid types
 
- 
isEnabled
public boolean isEnabled(GridType type)
Is the grid type enabled- Parameters:
 type- grid type- Returns:
 - true if enabled
 
 
- 
enable
public void enable(GridType type)
Enable the grid type- Parameters:
 type- grid type
 
- 
disable
public void disable(GridType type)
Disable the grid type- Parameters:
 type- grid type
 
- 
setMinZoom
public void setMinZoom(GridType type, int minZoom)
Set the grid minimum zoom- Parameters:
 type- grid typeminZoom- minimum zoom
 
- 
setMaxZoom
public void setMaxZoom(GridType type, Integer maxZoom)
Set the grid maximum zoom- Parameters:
 type- grid typemaxZoom- maximum zoom
 
- 
setZoomRange
public void setZoomRange(GridType type, int minZoom, Integer maxZoom)
Set the grid zoom range- Parameters:
 type- grid typeminZoom- minimum zoommaxZoom- maximum zoom
 
- 
setLinesMinZoom
public void setLinesMinZoom(GridType type, Integer minZoom)
Set the grid minimum level override for drawing grid lines- Parameters:
 type- grid typeminZoom- minimum zoom level or null to remove
 
- 
setLinesMaxZoom
public void setLinesMaxZoom(GridType type, Integer maxZoom)
Set the grid maximum level override for drawing grid lines- Parameters:
 type- grid typemaxZoom- maximum zoom level or null to remove
 
- 
setAllColors
public void setAllColors(Color color)
Set all grid line colors- Parameters:
 color- grid line color
 
- 
setColor
public void setColor(Color color, GridType... types)
Set the grid line color for the grid types- Parameters:
 color- grid line colortypes- grid types
 
- 
setColor
public void setColor(Collection<GridType> types, Color color)
Set the grid line color for the grid types- Parameters:
 types- grid typescolor- grid line color
 
- 
setColor
public void setColor(GridType type, Color color)
Set the grid line color for the grid type- Parameters:
 type- grid typecolor- grid line color
 
- 
setAllWidths
public void setAllWidths(double width)
Set all grid line widths- Parameters:
 width- grid line width
 
- 
setWidth
public void setWidth(double width, GridType... types)Set the grid line width for the grid types- Parameters:
 width- grid line widthtypes- grid types
 
- 
setWidth
public void setWidth(Collection<GridType> types, double width)
Set the grid line width for the grid types- Parameters:
 types- grid typeswidth- grid line width
 
- 
setWidth
public void setWidth(GridType type, double width)
Set the grid line width for the grid type- Parameters:
 type- grid typewidth- grid line width
 
- 
deletePropagatedStyles
public void deletePropagatedStyles()
Delete propagated styles 
- 
deletePropagatedStyles
public void deletePropagatedStyles(GridType... types)
Delete propagated styles for the grid types- Parameters:
 types- grid types
 
- 
deletePropagatedStyles
public void deletePropagatedStyles(Collection<GridType> types)
Delete propagated styles for the grid types- Parameters:
 types- grid types
 
- 
deletePropagatedStyles
public void deletePropagatedStyles(GridType type)
Delete propagated styles for the grid type- Parameters:
 type- grid type
 
- 
setColor
public void setColor(Collection<GridType> types, GridType precisionType, Color color)
Set the grid type precision line color for the grid types- Parameters:
 types- grid typesprecisionType- precision grid typecolor- grid line color
 
- 
setColor
public void setColor(GridType type, Color color, GridType... precisionTypes)
Set the grid type precision line colors for the grid type- Parameters:
 type- grid typecolor- grid line colorprecisionTypes- precision grid types
 
- 
setColor
public void setColor(GridType type, Collection<GridType> precisionTypes, Color color)
Set the grid type precision line colors for the grid type- Parameters:
 type- grid typeprecisionTypes- precision grid typescolor- grid line color
 
- 
setColor
public void setColor(GridType type, GridType precisionType, Color color)
Set the grid type precision line color for the grid type- Parameters:
 type- grid typeprecisionType- precision grid typecolor- grid line color
 
- 
setWidth
public void setWidth(Collection<GridType> types, GridType precisionType, double width)
Set the grid type precision line width for the grid types- Parameters:
 types- grid typesprecisionType- precision grid typewidth- grid line width
 
- 
setWidth
public void setWidth(GridType type, double width, GridType... precisionTypes)
Set the grid type precision line widths for the grid type- Parameters:
 type- grid typewidth- grid line widthprecisionTypes- precision grid types
 
- 
setWidth
public void setWidth(GridType type, Collection<GridType> precisionTypes, double width)
Set the grid type precision line widths for the grid type- Parameters:
 type- grid typeprecisionTypes- precision grid typeswidth- grid line width
 
- 
setWidth
public void setWidth(GridType type, GridType precisionType, double width)
Set the grid type precision line width for the grid type- Parameters:
 type- grid typeprecisionType- precision grid typewidth- grid line width
 
- 
getLabeler
public GridLabeler getLabeler(GridType type)
Get the labeler for the grid type- Parameters:
 type- grid type- Returns:
 - labeler or null
 
 
- 
hasLabeler
public boolean hasLabeler(GridType type)
Has a labeler for the grid type- Parameters:
 type- grid type- Returns:
 - true if has labeler
 
 
- 
setLabeler
public void setLabeler(GridType type, GridLabeler labeler)
Set the labeler for the grid type- Parameters:
 type- grid typelabeler- labeler
 
- 
disableAllLabelers
public void disableAllLabelers()
Disable all grid labelers 
- 
enableLabelers
public void enableLabelers(GridType... types)
Enable the labelers for the grid types- Parameters:
 types- grid types
 
- 
enableLabelers
public void enableLabelers(Collection<GridType> types)
Enable the labelers for the grid types- Parameters:
 types- grid types
 
- 
disableLabelers
public void disableLabelers(GridType... types)
Disable the labelers for the grid types- Parameters:
 types- grid types
 
- 
disableLabelers
public void disableLabelers(Collection<GridType> types)
Disable the labelers for the grid types- Parameters:
 types- grid types
 
- 
isLabelerEnabled
public boolean isLabelerEnabled(GridType type)
Is a labeler enabled for the grid type- Parameters:
 type- grid type- Returns:
 - true if labeler enabled
 
 
- 
enableLabeler
public void enableLabeler(GridType type)
Enable the grid type labeler- Parameters:
 type- grid type
 
- 
disableLabeler
public void disableLabeler(GridType type)
Disable the grid type labeler- Parameters:
 type- grid type
 
- 
setLabelMinZoom
public void setLabelMinZoom(GridType type, int minZoom)
Set the grid minimum zoom- Parameters:
 type- grid typeminZoom- minimum zoom
 
- 
setLabelMaxZoom
public void setLabelMaxZoom(GridType type, Integer maxZoom)
Set the grid maximum zoom- Parameters:
 type- grid typemaxZoom- maximum zoom
 
- 
setLabelZoomRange
public void setLabelZoomRange(GridType type, int minZoom, Integer maxZoom)
Set the grid zoom range- Parameters:
 type- grid typeminZoom- minimum zoommaxZoom- maximum zoom
 
- 
setLabelBuffer
public void setLabelBuffer(double buffer, GridType... types)Set the label grid zone edge buffer for the grid types- Parameters:
 buffer- label buffer (greater than or equal to 0.0 and less than 0.5)types- grid types
 
- 
setLabelBuffer
public void setLabelBuffer(Collection<GridType> types, double buffer)
Set the label grid zone edge buffer for the grid types- Parameters:
 types- grid typesbuffer- label buffer (greater than or equal to 0.0 and less than 0.5)
 
- 
getLabelBuffer
public double getLabelBuffer(GridType type)
Get the label grid zone edge buffer- Parameters:
 type- grid type- Returns:
 - label buffer (greater than or equal to 0.0 and less than 0.5)
 
 
- 
setLabelBuffer
public void setLabelBuffer(GridType type, double buffer)
Set the label grid zone edge buffer- Parameters:
 type- grid typebuffer- label buffer (greater than or equal to 0.0 and less than 0.5)
 
- 
setAllLabelColors
public void setAllLabelColors(Color color)
Set all label colors- Parameters:
 color- label color
 
- 
setLabelColor
public void setLabelColor(Color color, GridType... types)
Set the label color for the grid types- Parameters:
 color- label colortypes- grid types
 
- 
setLabelColor
public void setLabelColor(Collection<GridType> types, Color color)
Set the label color for the grid types- Parameters:
 types- grid typescolor- label color
 
- 
setLabelColor
public void setLabelColor(GridType type, Color color)
Set the label color- Parameters:
 type- grid typecolor- label color
 
- 
setAllLabelTextSizes
public void setAllLabelTextSizes(double textSize)
Set all label text sizes- Parameters:
 textSize- label text size
 
- 
setLabelTextSize
public void setLabelTextSize(double textSize, GridType... types)Set the label text size for the grid types- Parameters:
 textSize- label text sizetypes- grid types
 
- 
setLabelTextSize
public void setLabelTextSize(Collection<GridType> types, double textSize)
Set the label text size for the grid types- Parameters:
 types- grid typestextSize- label text size
 
- 
setLabelTextSize
public void setLabelTextSize(GridType type, double textSize)
Set the label text size- Parameters:
 type- grid typetextSize- label text size
 
 - 
 
 -