public class IlvLatLonGrid extends IlvAbstractBaseGrid
IlvManagerView view=new IlvManagerView(); ... view.getManager().addLayer(new IlvLatLonGrid());
bottomLine, FRC, leftLine, rightLine, tmp1, tmp2, topLine, visibleRect
Constructor and Description |
---|
IlvLatLonGrid()
Default constructor.
|
IlvLatLonGrid(IlvInputStream stream)
Creates a grid by reading parameters from the stream.
|
Modifier and Type | Method and Description |
---|---|
protected void |
automaticScaling()
Automatically computes the step according to the screen scale of the
view.
|
void |
drawLatPolyline(Graphics2D dst,
IlvTransformer t,
double lat)
Draws a single polyline (in fact a general path) for the current view parameters and specified latitude.
|
void |
drawLonPolyline(Graphics2D dst,
IlvTransformer t,
double lon)
Draws a single polyline (in fact a general path) for the current view parameters and specified latitude.
|
double |
getLatMax()
Returns the maximum latitude for which grid lines can appear.
|
double |
getLatMin()
Returns the minimum latitude for which grid lines can appear.
|
double |
getLonMax()
Returns the maximum longitude for which grid lines can appear.
|
double |
getLonMin()
Returns the minimum longitude for which grid lines can appear.
|
void |
paintGrid(Graphics2D dst,
IlvTransformer t)
Implementation of the paint mechanism.
|
void |
setLatMax(double latMax)
Sets the maximum latitude for which grid lines can appear.
|
void |
setLatMin(double latMin)
Sets the minimum latitude for which grid lines can appear.
|
void |
setLonMax(double longMax)
Sets the maximum longitude for which grid lines can appear.
|
void |
setLonMin(double longMin)
Sets the minimum longitude for which grid lines can appear.
|
void |
updateViewParameters(IlvManagerView v)
Sets grid parameters for next draw.
|
void |
write(IlvOutputStream stream)
Writes the layer to an output stream.
|
addObject, checkPointInsideView, draw, drawImpl, drawLine, drawString, drawText, getAwtCoordinatesFromLatLon, getBaseTextDirection, getCoordinateTransformation, getGraphicFromLatLonCoordinate, getGridColor, getInverseCoordinateTransformation, getLatLonFromAwtCoordinates, getLatLonFromGraphicCoordinate, getSmoothness, getStep, getTextColor, getTextFont, getTextOutlineColor, getViewScale, getViewTransformer, isAutoScaled, isLightPainting, isTextRTL, isTextVisible, isVisible, paint, paintLight, print, setAutoScaled, setBaseTextDirection, setGridColor, setScale, setSmoothness, setStep, setTextColor, setTextFont, setTextOutlineColor, setTextVisible, setTransformer, setVisibleOnlyOnView, setVisibleRect, updateTransforms
addVisibilityFilter, computeBBox, getAlpha, getIndex, getManager, getName, getNamedProperty, getProperty, getVisibilityFilters, isSelectable, isTemporarilyHidden, isVisible, removeNamedProperty, removeVisibilityFilter, setAlpha, setManager, setName, setNamedProperty, setProperty, writeIt
afterUpdate, beforeUpdate, collectObjects, collectSelectableObjects, deleteAll, getCardinal, getElements, getIndex, getManagers, getManagersCount, getObject, getObject, getSelectableObject, getSubsequentRemoveThreshold, isQuadtreeEnabled, isZOrdering, map, mapInside, mapInside, mapIntersects, mapIntersects, removeObject, setIndex, SetInitialNumberOfNonZoomablesCapacity, SetInitialNumberOfObjectsCapacity, setQuadtreeEnabled, setSubsequentRemoveThreshold, setZOrdering
public IlvLatLonGrid()
public IlvLatLonGrid(IlvInputStream stream)
stream
- Stream to read from.public void write(IlvOutputStream stream) throws IOException
IlvManagerLayer
to store your
own information. If you override the method, you
may call super.write(stream)
after
your own saving instructions. Calling the superclass method
will dump the graphic objects stored in the layer.write
in interface IlvPersistentObject
write
in class IlvAbstractBaseGrid
stream
- the output streamIOException
- thrown when an exception occurs during
the write operation for this object.IlvAbstractBaseGrid.write(ilog.views.io.IlvOutputStream)
public void updateViewParameters(IlvManagerView v)
updateViewParameters
in class IlvAbstractBaseGrid
v
- View for which to retrieve parameters.This method also computes the automatic best step.
,
automaticScaling()
public void paintGrid(Graphics2D dst, IlvTransformer t)
paintGrid
in class IlvAbstractBaseGrid
dst
- The Graphics onto which to paint the grid.t
- The view transformer to use.public void drawLonPolyline(Graphics2D dst, IlvTransformer t, double lon)
dst
- Graphic to draw with.t
- View transformer.lon
- Longitude in radians.public void drawLatPolyline(Graphics2D dst, IlvTransformer t, double lat)
dst
- Graphic to draw with.t
- View transformer.lat
- Latitude.public void setLatMax(double latMax)
latMax
- The latitude in radians.public void setLatMin(double latMin)
latMin
- The latitude in radians.public void setLonMax(double longMax)
longMax
- The longitude in radians.public void setLonMin(double longMin)
longMin
- The longitude in radians.protected void automaticScaling()
IlvAbstractBaseGrid.setStep(double)
public double getLatMax()
public double getLatMin()
public double getLonMax()
public double getLonMin()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.