Package ucar.nc2.ui.point
Class PointRenderer
- java.lang.Object
-
- ucar.nc2.ui.point.PointRenderer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classPointRenderer.ObservationUI
-
Constructor Summary
Constructors Constructor Description PointRenderer()constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecrFontSize()voiddraw(Graphics2D g, AffineTransform normal2Device)Tell the renderer to draw itself.ColorgetColor()booleangetDeclutter()ucar.unidata.geoloc.LatLonRectgetPreferredArea()This allows application to automatically switch to some special area defined by the RenderervoidincrFontSize()voidsetColor(Color color)Tell the Renderer to use the given color.voidsetDeclutter(boolean declut)voidsetDrawConnectingLine(boolean drawConnectingLine)voidsetPointFeatures(List<ucar.nc2.ft.PointFeature> obs)voidsetProjection(ucar.unidata.geoloc.ProjectionImpl project)Tell the Renderer to use the given projection from now on.voidsetSelected(ucar.nc2.ft.PointFeature obs)
-
-
-
Method Detail
-
incrFontSize
public void incrFontSize()
-
decrFontSize
public void decrFontSize()
-
setColor
public void setColor(Color color)
Description copied from interface:RendererTell the Renderer to use the given color.
-
getPreferredArea
public ucar.unidata.geoloc.LatLonRect getPreferredArea()
Description copied from interface:RendererThis allows application to automatically switch to some special area defined by the Renderer- Specified by:
getPreferredAreain interfaceRenderer- Returns:
- LatLonRect or null.
-
setPointFeatures
public void setPointFeatures(List<ucar.nc2.ft.PointFeature> obs) throws IOException
- Throws:
IOException
-
setDrawConnectingLine
public void setDrawConnectingLine(boolean drawConnectingLine)
-
setSelected
public void setSelected(ucar.nc2.ft.PointFeature obs)
-
setDeclutter
public void setDeclutter(boolean declut)
-
getDeclutter
public boolean getDeclutter()
-
setProjection
public void setProjection(ucar.unidata.geoloc.ProjectionImpl project)
Description copied from interface:RendererTell the Renderer to use the given projection from now on.- Specified by:
setProjectionin interfaceRenderer- Parameters:
project- the projection to use.
-
draw
public void draw(Graphics2D g, AffineTransform normal2Device)
Description copied from interface:RendererTell the renderer to draw itself. The Graphics2D object has its AffineTransform set to transform World coordinates to display coordinates. Typically the Renderer does its drawing in World coordinates, and does not modify the AffineTransform. If the Renderer wants to draw in constant-pixel coordinates, so that its objects do not change as the user zooms in and out, use the pixelAT transform, which transforms "Normalized Device" coordinates (screen pixels) to Device coordinates. The Graphics2D object also has its clipping rectangle set (in World coordinates), which the Renderer may use for optimization. The Graphics2D object has default color and line width set; the Renderer should restore any changes it makes.- Specified by:
drawin interfaceRenderer- Parameters:
g- the Graphics contextnormal2Device- transforms "Normalized Device" to Device coordinates. When drawing to the screen, this will be the identity transform. For other devices like printers, it is not the Identity transform. Renderers should use "Normalized Device" coordinates if they want to render non-scalable objects. Basically, you pretend you are working in screen pixels.
-
-