Package mil.nga.grid

Class Labeler


  • public abstract class Labeler
    extends Object
    Grid Labeler
    Author:
    osbornb
    • Constructor Detail

      • Labeler

        public Labeler​(int minZoom,
                       Color color,
                       double textSize,
                       double buffer)
        Constructor
        Parameters:
        minZoom - minimum zoom
        color - label color
        textSize - label text size
        buffer - 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 zoom
        maxZoom - maximum zoom
        color - label color
        textSize - label text size
        buffer - 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 labeler
        minZoom - minimum zoom
        maxZoom - maximum zoom
        color - label color
        textSize - label text size
        buffer - 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)