|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.IlvIndexedSet
ilog.views.IlvManagerLayer
ilog.views.maps.grids.IlvAbstractBaseGrid
ilog.views.maps.grids.IlvLatLonGrid
public class IlvLatLonGrid
The Lat/Lon grid displays a set of autoadaptive grids and labels along latitude or longitude lines on top of a geographic view. If the grid is autoadaptive (autoScaled), the step between each successive lat/lon line will be dependant on the current view scale. For example, the following code can be used to display an automatically scaled longitude/latitude grid.
IlvManagerView view=new IlvManagerView(); ... view.getManager().addLayer(new IlvLatLonGrid());
| Field Summary |
|---|
| Fields inherited from class ilog.views.maps.grids.IlvAbstractBaseGrid |
|---|
bottomLine, FRC, leftLine, rightLine, tmp1, tmp2, topLine, visibleRect |
| Constructor Summary | |
|---|---|
IlvLatLonGrid()
Default constructor. |
|
IlvLatLonGrid(IlvInputStream stream)
Creates a grid by reading parameters from the stream. |
|
| Method Summary | |
|---|---|
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. You should not call this method directly, but you may need to override it in a subclass of 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. |
| Methods inherited from class ilog.views.IlvManagerLayer |
|---|
addVisibilityFilter, computeBBox, getAlpha, getIndex, getManager, getName, getNamedProperty, getProperty, getVisibilityFilters, isSelectable, isTemporarilyHidden, isVisible, removeNamedProperty, removeVisibilityFilter, setAlpha, setManager, setName, setNamedProperty, setProperty, writeIt |
| Methods inherited from class ilog.views.IlvIndexedSet |
|---|
afterUpdate, beforeUpdate, collectObjects, deleteAll, getCardinal, getElements, getIndex, getManagers, getManagersCount, getObject, getObject, getSubsequentRemoveThreshold, isQuadtreeEnabled, map, mapInside, mapInside, mapIntersects, mapIntersects, removeObject, setIndex, setQuadtreeEnabled, setSubsequentRemoveThreshold |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IlvLatLonGrid()
public IlvLatLonGrid(IlvInputStream stream)
stream - Stream to read from.| Method Detail |
|---|
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 IlvPersistentObjectwrite in class IlvAbstractBaseGridstream - the output stream
IOException - 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 IlvAbstractBaseGridv - 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 IlvAbstractBaseGriddst - 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()
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||