|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.WWObjectImpl
gov.nasa.worldwind.layers.AbstractLayer
gov.nasa.worldwind.layers.AbstractGraticuleLayer
public class AbstractGraticuleLayer
Displays a graticule.
| Nested Class Summary | |
|---|---|
protected class |
AbstractGraticuleLayer.GridElement
|
| Field Summary | |
|---|---|
protected Globe |
globe
|
protected GraticuleSupport |
graticuleSupport
|
protected ArrayList<AbstractGraticuleLayer.GridElement> |
gridElements
|
protected Vec4 |
lastEyePoint
|
protected double |
lastVerticalExaggeration
|
protected double |
lastViewFOV
|
protected double |
lastViewHeading
|
protected double |
lastViewPitch
|
static String |
LINE_STYLE_DASHED
Dashed line rendering style. |
static String |
LINE_STYLE_DOTTED
Dotted line rendering style. |
static String |
LINE_STYLE_SOLID
Solid line rendering style. |
protected double |
polylineTerrainConformance
|
protected boolean |
useSurfaceShapes
|
protected Frustum |
viewFrustum
|
| Constructor Summary | |
|---|---|
AbstractGraticuleLayer()
|
|
| Method Summary | |
|---|---|
protected void |
addRenderable(Object renderable,
String paramsKey)
|
protected void |
clear(DrawContext dc)
|
protected double |
computeAltitudeAboveGround(DrawContext dc)
|
protected LatLon |
computeLabelOffset(DrawContext dc)
|
protected double |
computeTerrainConformance(DrawContext dc)
|
protected void |
computeTruncatedSegment(Position p1,
Position p2,
Sector sector,
ArrayList<Position> positions)
|
protected Object |
createLineRenderable(Iterable<? extends LatLon> positions,
int pathType)
|
void |
doPreRender(DrawContext dc)
|
void |
doRender(DrawContext dc)
|
protected Angle |
getDeltaLongitude(LatLon p1,
Angle longitude)
|
Color |
getGraticuleLineColor(String key)
Returns the graticule line Color. |
String |
getGraticuleLineStyle(String key)
Returns the graticule line rendering style. |
double |
getGraticuleLineWidth(String key)
Returns the graticule line width. |
Color |
getLabelColor(String key)
Returns the graticule label Color. |
Font |
getLabelFont(String key)
Returns the Font used for graticule labels. |
protected GraticuleRenderingParams |
getRenderingParams(String key)
|
String |
getRestorableState()
Returns an XML document string describing the object's state. |
protected Vec4 |
getSurfacePoint(DrawContext dc,
Angle latitude,
Angle longitude)
|
protected LatLon |
greatCircleIntersectionAtLatitude(LatLon p1,
LatLon p2,
Angle latitude)
Computes the intersection point position between a great circle segment and a parallel. |
protected LatLon |
greatCircleIntersectionAtLongitude(LatLon p1,
LatLon p2,
Angle longitude)
Computes the intersection point position between a great circle segment and a meridian. |
protected LatLon |
greatCircleMidPoint(LatLon p1,
LatLon p2)
|
boolean |
isDrawGraticule(String key)
Returns whether or not graticule lines will be rendered. |
boolean |
isDrawLabels(String key)
Returns whether or not graticule labels will be rendered. |
protected boolean |
needsToUpdate(DrawContext dc)
Determines whether the grid should be updated. |
protected void |
preRenderGraticule(DrawContext dc)
|
protected void |
removeAllRenderables()
|
protected void |
renderGraticule(DrawContext dc)
|
void |
restoreState(String stateInXml)
Restores the object's state to what is described in the specified XML document string. |
protected void |
selectRenderables(DrawContext dc)
Select the visible grid elements |
void |
setDrawGraticule(boolean drawGraticule,
String key)
Sets whether or not graticule lines will be rendered. |
void |
setDrawLabels(boolean drawLabels,
String key)
Sets whether or not graticule labels will be rendered. |
void |
setGraticuleLineColor(Color color,
String key)
Sets the graticule line Color. |
void |
setGraticuleLineStyle(String lineStyle,
String key)
Sets the graticule line rendering style. |
void |
setGraticuleLineWidth(double lineWidth,
String key)
Sets the graticule line width. |
void |
setLabelColor(Color color,
String key)
Sets the graticule label Color. |
void |
setLabelFont(Font font,
String key)
Sets the Font used for graticule labels. |
protected void |
setRenderingParams(String key,
GraticuleRenderingParams renderingParams)
|
| Methods inherited from class gov.nasa.worldwind.WWObjectImpl |
|---|
onMessage, propertyChange |
| Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface gov.nasa.worldwind.avlist.AVList |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
| Methods inherited from interface java.beans.PropertyChangeListener |
|---|
propertyChange |
| Methods inherited from interface gov.nasa.worldwind.event.MessageListener |
|---|
onMessage |
| Field Detail |
|---|
protected Globe globe
protected GraticuleSupport graticuleSupport
protected ArrayList<AbstractGraticuleLayer.GridElement> gridElements
protected Vec4 lastEyePoint
protected double lastVerticalExaggeration
protected double lastViewFOV
protected double lastViewHeading
protected double lastViewPitch
public static final String LINE_STYLE_DASHED
- - - - -
public static final String LINE_STYLE_DOTTED
. . . . .
is an example of a dotted line.
public static final String LINE_STYLE_SOLID
_________
protected double polylineTerrainConformance
protected boolean useSurfaceShapes
protected Frustum viewFrustum
| Constructor Detail |
|---|
public AbstractGraticuleLayer()
| Method Detail |
|---|
protected void addRenderable(Object renderable,
String paramsKey)
protected void clear(DrawContext dc)
protected double computeAltitudeAboveGround(DrawContext dc)
protected LatLon computeLabelOffset(DrawContext dc)
protected double computeTerrainConformance(DrawContext dc)
protected void computeTruncatedSegment(Position p1,
Position p2,
Sector sector,
ArrayList<Position> positions)
protected Object createLineRenderable(Iterable<? extends LatLon> positions,
int pathType)
public void doPreRender(DrawContext dc)
doPreRender in class AbstractLayerpublic void doRender(DrawContext dc)
doRender in class AbstractLayer
protected Angle getDeltaLongitude(LatLon p1,
Angle longitude)
public Color getGraticuleLineColor(String key)
key - the rendering parameters key.
IllegalArgumentException - key is null.public String getGraticuleLineStyle(String key)
key - the rendering parameters key.
IllegalArgumentException - key is null.public double getGraticuleLineWidth(String key)
key - the rendering parameters key.
IllegalArgumentException - key is null.public Color getLabelColor(String key)
key - the rendering parameters key.
IllegalArgumentException - key is null.public Font getLabelFont(String key)
key - the rendering parameters key.
IllegalArgumentException - key is null.protected GraticuleRenderingParams getRenderingParams(String key)
public String getRestorableState()
RestorablerestoreState and passing the XML document.
getRestorableState in interface RestorablegetRestorableState in class AbstractLayer
protected Vec4 getSurfacePoint(DrawContext dc,
Angle latitude,
Angle longitude)
protected LatLon greatCircleIntersectionAtLatitude(LatLon p1,
LatLon p2,
Angle latitude)
p1 - the great circle segment start position.p2 - the great circle segment end position.latitude - the parallel latitude Angle
Position or null if there was no intersection found.
protected LatLon greatCircleIntersectionAtLongitude(LatLon p1,
LatLon p2,
Angle longitude)
p1 - the great circle segment start position.p2 - the great circle segment end position.longitude - the meridian longitude Angle
Position or null if there was no intersection found.
protected LatLon greatCircleMidPoint(LatLon p1,
LatLon p2)
public boolean isDrawGraticule(String key)
key - the rendering parameters key.
IllegalArgumentException - key is null.public boolean isDrawLabels(String key)
key - the rendering parameters key.
IllegalArgumentException - key is null.protected boolean needsToUpdate(DrawContext dc)
dc - the current DrawContext.
protected void preRenderGraticule(DrawContext dc)
protected void removeAllRenderables()
protected void renderGraticule(DrawContext dc)
public void restoreState(String stateInXml)
Restorable
restoreState in interface RestorablerestoreState in class AbstractLayerstateInXml - an XML document string describing an object's state.protected void selectRenderables(DrawContext dc)
dc - the current DrawContext.
public void setDrawGraticule(boolean drawGraticule,
String key)
drawGraticule - true to render graticule lines; false to disable rendering.key - the rendering parameters key.
IllegalArgumentException - key is null.
public void setDrawLabels(boolean drawLabels,
String key)
drawLabels - true to render graticule labels; false to disable rendering.key - the rendering parameters key.
IllegalArgumentException - key is null.
public void setGraticuleLineColor(Color color,
String key)
color - Color that will be used to render graticule lines.key - the rendering parameters key.
IllegalArgumentException - if color or key is null.
public void setGraticuleLineStyle(String lineStyle,
String key)
lineStyle - rendering style of the graticule lines. One of LINE_STYLE_PLAIN, LINE_STYLE_DASHED, or
LINE_STYLE_DOTTED.key - the rendering parameters key.
IllegalArgumentException - if lineStyle or key is null.
public void setGraticuleLineWidth(double lineWidth,
String key)
lineWidth - width of the graticule lines.key - the rendering parameters key.
IllegalArgumentException - key is null.
public void setLabelColor(Color color,
String key)
color - Color that will be used to render graticule labels.key - the rendering parameters key.
IllegalArgumentException - if color or key is null.
public void setLabelFont(Font font,
String key)
font - Font that will be used to render graticule labels.key - the rendering parameters key.
IllegalArgumentException - if font or key is null.
protected void setRenderingParams(String key,
GraticuleRenderingParams renderingParams)
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||