Package mil.nga.grid

Class BaseGrid


  • public class BaseGrid
    extends Object
    Base Grid
    Author:
    osbornb
    • Constructor Detail

      • BaseGrid

        public BaseGrid()
        Constructor
    • 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)