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 class
PointRenderer.ObservationUI
-
Constructor Summary
Constructors Constructor Description PointRenderer()
constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
decrFontSize()
void
draw(Graphics2D g, AffineTransform normal2Device)
Tell the renderer to draw itself.Color
getColor()
boolean
getDeclutter()
LatLonRect
getPreferredArea()
This allows application to automatically switch to some special area defined by the Renderervoid
incrFontSize()
void
setColor(Color color)
Tell the Renderer to use the given color.void
setDeclutter(boolean declut)
void
setDrawConnectingLine(boolean drawConnectingLine)
void
setPointFeatures(List<PointFeature> obs)
void
setProjection(ProjectionImpl project)
Tell the Renderer to use the given projection from now on.void
setSelected(PointFeature obs)
-
-
-
Method Detail
-
incrFontSize
public void incrFontSize()
-
decrFontSize
public void decrFontSize()
-
setColor
public void setColor(Color color)
Description copied from interface:Renderer
Tell the Renderer to use the given color.
-
getPreferredArea
public LatLonRect getPreferredArea()
Description copied from interface:Renderer
This allows application to automatically switch to some special area defined by the Renderer- Specified by:
getPreferredArea
in interfaceRenderer
- Returns:
- LatLonRect or null.
-
setPointFeatures
public void setPointFeatures(List<PointFeature> obs) throws IOException
- Throws:
IOException
-
setDrawConnectingLine
public void setDrawConnectingLine(boolean drawConnectingLine)
-
setSelected
public void setSelected(PointFeature obs)
-
setDeclutter
public void setDeclutter(boolean declut)
-
getDeclutter
public boolean getDeclutter()
-
setProjection
public void setProjection(ProjectionImpl project)
Description copied from interface:Renderer
Tell the Renderer to use the given projection from now on.- Specified by:
setProjection
in interfaceRenderer
- Parameters:
project
- the projection to use.
-
draw
public void draw(Graphics2D g, AffineTransform normal2Device)
Description copied from interface:Renderer
Tell 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:
draw
in 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.
-
-