Class Grid

    • Field Detail

      • DEFAULT_WIDTH

        public static final double DEFAULT_WIDTH
        Default line width
    • Constructor Detail

      • Grid

        protected Grid​(GridType type)
        Constructor
        Parameters:
        type - grid type
    • Method Detail

      • getType

        public GridType getType()
        Get the grid type
        Returns:
        grid type
      • isType

        public boolean isType​(GridType type)
        Is the provided grid type
        Parameters:
        type - grid type
        Returns:
        true if the type
      • getPrecision

        public int getPrecision()
        Get the precision in meters
        Returns:
        precision meters
      • getStyle

        public GridStyle getStyle​(GridType gridType)
        Get the grid type precision line style for the grid type
        Parameters:
        gridType - grid type
        Returns:
        grid type line style
      • setStyle

        public void setStyle​(GridType gridType,
                             GridStyle style)
        Set the grid type precision line style
        Parameters:
        gridType - grid type
        style - grid line style
      • clearPrecisionStyles

        public void clearPrecisionStyles()
        Clear the propagated grid type precision styles
      • getColor

        public Color getColor​(GridType gridType)
        Get the grid type precision line color
        Parameters:
        gridType - grid type
        Returns:
        grid type line color
      • setColor

        public void setColor​(GridType gridType,
                             Color color)
        Set the grid type precision line color
        Parameters:
        gridType - grid type
        color - grid line color
      • getWidth

        public double getWidth​(GridType gridType)
        Get the grid type precision line width
        Parameters:
        gridType - grid type
        Returns:
        grid type line width
      • setWidth

        public void setWidth​(GridType gridType,
                             double width)
        Set the grid type precision line width
        Parameters:
        gridType - grid type
        width - grid line width
      • setLabeler

        protected void setLabeler​(GridLabeler labeler)
        Set the grid labeler
        Parameters:
        labeler - grid labeler
      • getLines

        public List<GridLine> getLines​(GridTile tile,
                                       GridZone zone)
        Get the lines for the tile and zone
        Parameters:
        tile - tile
        zone - grid zone
        Returns:
        lines
      • getLines

        public List<GridLine> getLines​(int zoom,
                                       Bounds tileBounds,
                                       GridZone zone)
        Get the lines for the zoom, tile bounds, and zone
        Parameters:
        zoom - zoom level
        tileBounds - tile bounds
        zone - grid zone
        Returns:
        lines
      • getLines

        public List<GridLine> getLines​(Bounds tileBounds,
                                       GridZone zone)
        Get the lines for the tile bounds and zone
        Parameters:
        tileBounds - tile bounds
        zone - grid zone
        Returns:
        lines
      • getLabels

        public List<GridLabel> getLabels​(GridTile tile,
                                         GridZone zone)
        Get the labels for the tile and zone
        Parameters:
        tile - tile
        zone - grid zone
        Returns:
        labels
      • getLabels

        public List<GridLabel> getLabels​(int zoom,
                                         Bounds tileBounds,
                                         GridZone zone)
        Get the labels for the zoom, tile bounds, and zone
        Parameters:
        zoom - zoom level
        tileBounds - tile bounds
        zone - grid zone
        Returns:
        labels
      • getPrecisionCompare

        public int getPrecisionCompare()
        Get the precision in meters
        Returns:
        precision meters
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object