Class GridRenderer


  • public class GridRenderer
    extends Object
    Render grids using Java2D API.
    • Constructor Detail

      • GridRenderer

        public GridRenderer()
    • Method Detail

      • getColorScale

        public ColorScale getColorScale()
        get the current ColorScale
      • setColorScale

        public void setColorScale​(ColorScale cs)
        set the ColorScale to use
      • setDataMinMaxType

        public void setDataMinMaxType​(ColorScale.MinMaxType type)
        set the ColorScale data min/max type
        Parameters:
        type - MinMaxType
      • getGeoGrid

        public GridDatatype getGeoGrid()
        get the current GridDatatype
      • clear

        public void clear()
      • setGeoGrid

        public void setGeoGrid​(GridDatatype grid)
        set the Grid
      • getCurrentHorizDataSlice

        public Array getCurrentHorizDataSlice()
      • getDataProjection

        public ProjectionImpl getDataProjection()
        get the current GridDatatype data projection
      • getProjection

        public ProjectionImpl getProjection()
        get the current display projection
      • setProjection

        public void setProjection​(ProjectionImpl project)
        set the Projection to use for drawing
      • getDrawGrid

        public boolean getDrawGrid()
      • setDrawGridLines

        public void setDrawGridLines​(boolean drawGrid)
      • getDrawContours

        public boolean getDrawContours()
      • setDrawContours

        public void setDrawContours​(boolean drawContours)
      • getDrawContourLabels

        public boolean getDrawContourLabels()
      • setDrawContourLabels

        public void setDrawContourLabels​(boolean drawContourLabels)
      • getLevel

        public int getLevel()
      • setLevel

        public void setLevel​(int level)
      • getTime

        public int getTime()
      • setTime

        public void setTime​(int time)
      • getRunTime

        public int getRunTime()
      • setRunTime

        public void setRunTime​(int runtime)
      • getEnsemble

        public int getEnsemble()
      • setEnsemble

        public void setEnsemble​(int ensemble)
      • getSlice

        public int getSlice()
      • setSlice

        public void setSlice​(int slice)
      • getHorizStride

        public int getHorizStride()
      • setHorizStride

        public void setHorizStride​(int horizStride)
      • makeStridedGrid

        public void makeStridedGrid()
      • findLevelCoordElement

        public int findLevelCoordElement​(double pos)
        find the level (z) index that is represented by this point
        Parameters:
        pos - coord in data z coordinate space.
      • findSliceFromPoint

        public int findSliceFromPoint​(ProjectionPoint pp)
        Returns:
        x index for given point
      • getXYvalueStr

        public String getXYvalueStr​(ProjectionPoint loc)
        Get the data value at this projection (x,y) point.
        Parameters:
        loc - : point in display projection coordinates (plan view)
        Returns:
        String representation of value
      • getYZpositionStr

        public String getYZpositionStr​(Point2D loc)
        Get the (y,z) position from the vertical view coordinates.
        Parameters:
        loc - : point in display projection coordinates (vertical view)
        Returns:
        String representation of position
      • getYZvalueStr

        public String getYZvalueStr​(Point2D loc)
        find the data value at this point
        Parameters:
        loc - : point in display projection coordinates (vertical view)
        Returns:
        String representation of value
      • renderVertView

        public void renderVertView​(Graphics2D g,
                                   AffineTransform dFromN)
        Do the rendering to the given Graphics2D object.
        Parameters:
        g - Graphics2D object: has clipRect and AffineTransform set.
        dFromN - transforms "Normalized Device" to Device coordinates
      • renderPlanView

        public void renderPlanView​(Graphics2D g,
                                   AffineTransform dFromN)
                            throws IOException
        Do the rendering to the given Graphics2D object.
        Parameters:
        g - Graphics2D object: has clipRect and AffineTransform set.
        dFromN - transforms "Normalized Device" to Device coordinates
        Throws:
        IOException