gov.nasa.worldwind.layers.Earth
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class gov.nasa.worldwind.layers.AbstractGraticuleLayer |
|---|
AbstractGraticuleLayer.GridElement |
| Field Summary | |
|---|---|
static String |
GRATICULE_100000M
Graticule for the 100,000 meter grid, nested inside the UTM grid. |
static String |
GRATICULE_10000M
Graticule for the 10,000 meter grid, nested inside the UTM grid. |
static String |
GRATICULE_1000M
Graticule for the 1,000 meter grid, nested inside the UTM grid. |
static String |
GRATICULE_100M
Graticule for the 100 meter grid, nested inside the UTM grid. |
static String |
GRATICULE_10M
Graticule for the 10 meter grid, nested inside the UTM grid. |
static String |
GRATICULE_1M
Graticule for the 1 meter grid, nested inside the UTM grid. |
static String |
GRATICULE_UTM_GRID
Graticule for the UTM grid. |
| Fields inherited from class gov.nasa.worldwind.layers.Earth.UTMGraticuleLayer |
|---|
GRATICULE_UTM, LINE_STYLE_DASHED, LINE_STYLE_DOTTED, LINE_STYLE_SOLID |
| Fields inherited from class gov.nasa.worldwind.layers.AbstractGraticuleLayer |
|---|
graticuleSupport, gridElements |
| Fields inherited from class gov.nasa.worldwind.layers.AbstractLayer |
|---|
screenCredit |
| Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
changeSupport |
| Constructor Summary | |
|---|---|
MGRSGraticuleLayer()
Creates a new MGRSGraticuleLayer, with default graticule attributes. |
|
| Method Summary | |
|---|---|
protected void |
clear(DrawContext dc)
|
Position |
computePosition(int zone,
char hemisphere,
double easting,
double northing)
|
Position |
computePositionFromUPS(char hemisphere,
double easting,
double northing)
|
Position |
computePositionFromUTM(int zone,
char hemisphere,
double easting,
double northing)
|
protected double |
computeTerrainConformance(DrawContext dc)
|
protected Sector |
computeVisibleSector(DrawContext dc)
|
void |
doRender(DrawContext dc)
|
Color |
getGraticuleLineColor(String graticuleType)
Returns the line color of the specified graticule. |
String |
getGraticuleLineStyle(String graticuleType)
Returns the line rendering style of the specified graticule. |
double |
getGraticuleLineWidth(String graticuleType)
Returns the line width of the specified graticule. |
Color |
getLabelColor(String graticuleType)
Returns the label color of the specified graticule. |
Font |
getLabelFont(String graticuleType)
Returns the label font of the specified graticule. |
String |
getMaximumGraticuleResolution()
Returns the maxiumum resolution graticule that will be rendered, or null if no graticules will be rendered. |
boolean |
isDrawLabels(String graticuleType)
Returns whether specified graticule labels will be rendered. |
protected boolean |
needsToUpdate(DrawContext dc)
Determines whether the grid should be updated. |
protected void |
selectMGRSRenderables(DrawContext dc,
Sector vs)
|
void |
setDrawLabels(boolean drawLabels)
Sets whether all graticule labels will be rendered. |
void |
setDrawLabels(boolean drawLabels,
Iterable<String> graticuleType)
Sets whether the specified graticule labels will be rendered. |
void |
setDrawLabels(boolean drawLabels,
String graticuleType)
Sets whether the specified graticule labels will be rendered. |
void |
setGraticuleLineColor(Color color)
Sets the line rendering color for all graticules. |
void |
setGraticuleLineColor(Color color,
Iterable<String> graticuleType)
Sets the line rendering color for the specified graticules. |
void |
setGraticuleLineColor(Color color,
String graticuleType)
Sets the line rendering color for the specified graticule. |
void |
setGraticuleLineStyle(String lineStyle)
Sets the line rendering style for all graticules. |
void |
setGraticuleLineStyle(String lineStyle,
Iterable<String> graticuleType)
Sets the line rendering style for the specified graticules. |
void |
setGraticuleLineStyle(String lineStyle,
String graticuleType)
Sets the line rendering style for the specified graticule. |
void |
setGraticuleLineWidth(double lineWidth)
Sets the line rendering width for all graticules. |
void |
setGraticuleLineWidth(double lineWidth,
Iterable<String> graticuleType)
Sets the line rendering width for the specified graticules. |
void |
setGraticuleLineWidth(double lineWidth,
String graticuleType)
Sets the line rendering width for the specified graticule. |
void |
setLabelColor(Color color)
Sets the label rendering color for all graticules. |
void |
setLabelColor(Color color,
Iterable<String> graticuleType)
Sets the label rendering color for the specified graticules. |
void |
setLabelColor(Color color,
String graticuleType)
Sets the label rendering color for the specified graticule. |
void |
setLabelFont(Font font)
Sets the label rendering font for all graticules. |
void |
setLabelFont(Font font,
Iterable<String> graticuleType)
Sets the label rendering font for the specified graticules. |
void |
setLabelFont(Font font,
String graticuleType)
Sets the label rendering font for the specified graticule. |
void |
setMaximumGraticuleResolution(String graticuleType)
Sets the maxiumum resolution graticule that will be rendered. |
| Methods inherited from class gov.nasa.worldwind.layers.Earth.UTMGraticuleLayer |
|---|
getGraticuleLineColor, getGraticuleLineStyle, getGraticuleLineWidth, getLabelColor, getLabelFont, isDrawGraticule, isDrawLabels, selectUTMRenderables, setDrawGraticule |
| Methods inherited from class gov.nasa.worldwind.layers.AbstractGraticuleLayer |
|---|
addRenderable, computeAltitudeAboveGround, getRenderingParams, getRestorableState, getSurfacePoint, isDrawGraticule, removeAllRenderables, renderGraticule, restoreState, selectRenderables, setDrawGraticule, setRenderingParams |
| Methods inherited from class gov.nasa.worldwind.layers.AbstractLayer |
|---|
dispose, doPick, doPreRender, getExpiryTime, getMaxActiveAltitude, getMinActiveAltitude, getName, getOpacity, getScale, getScreenCredit, isAtMaxResolution, isEnabled, isLayerActive, isLayerInView, isMultiResolution, isNetworkRetrievalEnabled, isPickEnabled, pick, preRender, render, setEnabled, setExpiryTime, setMaxActiveAltitude, setMinActiveAltitude, setName, setNetworkRetrievalEnabled, setOpacity, setPickEnabled, setScreenCredit, toString |
| Methods inherited from class gov.nasa.worldwind.WWObjectImpl |
|---|
propertyChange |
| Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, 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 |
| Field Detail |
|---|
public static final String GRATICULE_100000M
public static final String GRATICULE_10000M
public static final String GRATICULE_1000M
public static final String GRATICULE_100M
public static final String GRATICULE_10M
public static final String GRATICULE_1M
public static final String GRATICULE_UTM_GRID
| Constructor Detail |
|---|
public MGRSGraticuleLayer()
MGRSGraticuleLayer, with default graticule attributes.
| Method Detail |
|---|
protected void clear(DrawContext dc)
public Position computePosition(int zone, char hemisphere, double easting, double northing)
public Position computePositionFromUPS(char hemisphere, double easting, double northing)
public Position computePositionFromUTM(int zone, char hemisphere, double easting, double northing)
protected double computeTerrainConformance(DrawContext dc)
protected Sector computeVisibleSector(DrawContext dc)
public void doRender(DrawContext dc)
doRender in class UTMGraticuleLayerpublic Color getGraticuleLineColor(String graticuleType)
getGraticuleLineColor in class AbstractGraticuleLayergraticuleType - one of GRATICULE_UTM, GRATICULE_UTM_GRID, GRATICULE_100000M, GRATICULE_10000M,
GRATICULE_1000M, GRATICULE_100M, GRATICULE_10M, or GRATICULE_1M.
IllegalArgumentException - if graticuleType is null,
or if graticuleType is not a valid type.public String getGraticuleLineStyle(String graticuleType)
getGraticuleLineStyle in class AbstractGraticuleLayergraticuleType - one of GRATICULE_UTM, GRATICULE_UTM_GRID, GRATICULE_100000M, GRATICULE_10000M,
GRATICULE_1000M, GRATICULE_100M, GRATICULE_10M, or GRATICULE_1M.
IllegalArgumentException - if graticuleType is null,
or if graticuleType is not a valid type.public double getGraticuleLineWidth(String graticuleType)
getGraticuleLineWidth in class AbstractGraticuleLayergraticuleType - one of GRATICULE_UTM, GRATICULE_UTM_GRID, GRATICULE_100000M, GRATICULE_10000M,
GRATICULE_1000M, GRATICULE_100M, GRATICULE_10M, or GRATICULE_1M.
IllegalArgumentException - if graticuleType is null,
or if graticuleType is not a valid type.public Color getLabelColor(String graticuleType)
getLabelColor in class AbstractGraticuleLayergraticuleType - one of GRATICULE_UTM, GRATICULE_UTM_GRID, GRATICULE_100000M, GRATICULE_10000M,
GRATICULE_1000M, GRATICULE_100M, GRATICULE_10M, or GRATICULE_1M.
IllegalArgumentException - if graticuleType is null,
or if graticuleType is not a valid type.public Font getLabelFont(String graticuleType)
getLabelFont in class AbstractGraticuleLayergraticuleType - one of GRATICULE_UTM, GRATICULE_UTM_GRID, GRATICULE_100000M, GRATICULE_10000M,
GRATICULE_1000M, GRATICULE_100M, GRATICULE_10M, or GRATICULE_1M.
IllegalArgumentException - if graticuleType is null,
or if graticuleType is not a valid type.public String getMaximumGraticuleResolution()
public boolean isDrawLabels(String graticuleType)
isDrawLabels in class AbstractGraticuleLayergraticuleType - one of GRATICULE_UTM, GRATICULE_UTM_GRID, GRATICULE_100000M, GRATICULE_10000M,
GRATICULE_1000M, GRATICULE_100M, GRATICULE_10M, or GRATICULE_1M.
IllegalArgumentException - if graticuleType is null,
or if graticuleType is not a valid type.protected boolean needsToUpdate(DrawContext dc)
dc - the current DrawContext.
protected void selectMGRSRenderables(DrawContext dc, Sector vs)
public void setDrawLabels(boolean drawLabels)
setDrawLabels in class UTMGraticuleLayerdrawLabels - true to render all graticule labels; false to disable rendering.
public void setDrawLabels(boolean drawLabels,
Iterable<String> graticuleType)
drawLabels - true to render graticule labels; false to disable rendering.graticuleType - one of GRATICULE_UTM, GRATICULE_UTM_GRID, GRATICULE_100000M, GRATICULE_10000M,
GRATICULE_1000M, GRATICULE_100M, GRATICULE_10M, or GRATICULE_1M.
IllegalArgumentException - if graticuleType is null,
or if graticuleType is not a valid type.
public void setDrawLabels(boolean drawLabels,
String graticuleType)
setDrawLabels in class AbstractGraticuleLayerdrawLabels - true to render graticule labels; false to disable rendering.graticuleType - one of GRATICULE_UTM, GRATICULE_UTM_GRID, GRATICULE_100000M, GRATICULE_10000M,
GRATICULE_1000M, GRATICULE_100M, GRATICULE_10M, or GRATICULE_1M.
IllegalArgumentException - if graticuleType is null,
or if graticuleType is not a valid type.public void setGraticuleLineColor(Color color)
setGraticuleLineColor in class UTMGraticuleLayercolor - the line color.
IllegalArgumentException - if color is null.public void setGraticuleLineColor(Color color, Iterable<String> graticuleType)
color - the line color for the specified graticules.graticuleType - one of GRATICULE_UTM, GRATICULE_UTM_GRID, GRATICULE_100000M, GRATICULE_10000M,
GRATICULE_1000M, GRATICULE_100M, GRATICULE_10M, or GRATICULE_1M.
IllegalArgumentException - ifcolor is null,
if graticuleType is null,
or if graticuleType is not a valid type.public void setGraticuleLineColor(Color color, String graticuleType)
setGraticuleLineColor in class AbstractGraticuleLayercolor - the line color for the specified graticule.graticuleType - one of GRATICULE_UTM, GRATICULE_UTM_GRID, GRATICULE_100000M, GRATICULE_10000M,
GRATICULE_1000M, GRATICULE_100M, GRATICULE_10M, or GRATICULE_1M.
IllegalArgumentException - ifcolor is null,
if graticuleType is null,
or if graticuleType is not a valid type.public void setGraticuleLineStyle(String lineStyle)
setGraticuleLineStyle in class UTMGraticuleLayerlineStyle - the line rendering style.
One of LINE_STYLE_PLAIN, LINE_STYLE_DASHED, or LINE_STYLE_DOTTED.
IllegalArgumentException - if lineStyle is null.public void setGraticuleLineStyle(String lineStyle, Iterable<String> graticuleType)
lineStyle - the line rendering style for the specified graticules.
One of LINE_STYLE_PLAIN, LINE_STYLE_DASHED, or LINE_STYLE_DOTTED.graticuleType - one of GRATICULE_UTM, GRATICULE_UTM_GRID, GRATICULE_100000M, GRATICULE_10000M,
GRATICULE_1000M, GRATICULE_100M, GRATICULE_10M, or GRATICULE_1M
IllegalArgumentException - if lineStyle is null,
if graticuleType is null,
or if graticuleType is not a valid type.public void setGraticuleLineStyle(String lineStyle, String graticuleType)
setGraticuleLineStyle in class AbstractGraticuleLayerlineStyle - the line rendering style for the specified graticule.
One of LINE_STYLE_PLAIN, LINE_STYLE_DASHED, or LINE_STYLE_DOTTED.graticuleType - one of GRATICULE_UTM, GRATICULE_UTM_GRID, GRATICULE_100000M, GRATICULE_10000M,
GRATICULE_1000M, GRATICULE_100M, GRATICULE_10M, or GRATICULE_1M
IllegalArgumentException - if lineStyle is null,
if graticuleType is null,
or if graticuleType is not a valid type.public void setGraticuleLineWidth(double lineWidth)
setGraticuleLineWidth in class UTMGraticuleLayerlineWidth - the line rendering width.
public void setGraticuleLineWidth(double lineWidth,
Iterable<String> graticuleType)
lineWidth - the line rendering width for the specified graticules.graticuleType - one of GRATICULE_UTM, GRATICULE_UTM_GRID, GRATICULE_100000M, GRATICULE_10000M,
GRATICULE_1000M, GRATICULE_100M, GRATICULE_10M, or GRATICULE_1M.
IllegalArgumentException - if graticuleType is null,
or if graticuleType is not a valid type.
public void setGraticuleLineWidth(double lineWidth,
String graticuleType)
setGraticuleLineWidth in class AbstractGraticuleLayerlineWidth - the line rendering width for the specified graticule.graticuleType - one of GRATICULE_UTM, GRATICULE_UTM_GRID, GRATICULE_100000M, GRATICULE_10000M,
GRATICULE_1000M, GRATICULE_100M, GRATICULE_10M, or GRATICULE_1M.
IllegalArgumentException - if graticuleType is null,
or if graticuleType is not a valid type.public void setLabelColor(Color color)
setLabelColor in class UTMGraticuleLayercolor - the label color.
IllegalArgumentException - if color is null.public void setLabelColor(Color color, Iterable<String> graticuleType)
color - the label color for the specified graticules.graticuleType - one of GRATICULE_UTM, GRATICULE_UTM_GRID, GRATICULE_100000M, GRATICULE_10000M,
GRATICULE_1000M, GRATICULE_100M, GRATICULE_10M, or GRATICULE_1M.
IllegalArgumentException - ifcolor is null,
if graticuleType is null,
or if graticuleType is not a valid type.public void setLabelColor(Color color, String graticuleType)
setLabelColor in class AbstractGraticuleLayercolor - the label color for the specified graticule.graticuleType - one of GRATICULE_UTM, GRATICULE_UTM_GRID, GRATICULE_100000M, GRATICULE_10000M,
GRATICULE_1000M, GRATICULE_100M, GRATICULE_10M, or GRATICULE_1M.
IllegalArgumentException - ifcolor is null,
if graticuleType is null,
or if graticuleType is not a valid type.public void setLabelFont(Font font)
setLabelFont in class UTMGraticuleLayerfont - the label font.
IllegalArgumentException - if font is null.public void setLabelFont(Font font, Iterable<String> graticuleType)
font - the label font for the specified graticules.graticuleType - one of GRATICULE_UTM, GRATICULE_UTM_GRID, GRATICULE_100000M, GRATICULE_10000M,
GRATICULE_1000M, GRATICULE_100M, GRATICULE_10M, or GRATICULE_1M.
IllegalArgumentException - iffont is null,
if graticuleType is null,
or if graticuleType is not a valid type.public void setLabelFont(Font font, String graticuleType)
setLabelFont in class AbstractGraticuleLayerfont - the label font for the specified graticule.graticuleType - one of GRATICULE_UTM, GRATICULE_UTM_GRID, GRATICULE_100000M, GRATICULE_10000M,
GRATICULE_1000M, GRATICULE_100M, GRATICULE_10M, or GRATICULE_1M.
IllegalArgumentException - iffont is null,
if graticuleType is null,
or if graticuleType is not a valid type.public void setMaximumGraticuleResolution(String graticuleType)
graticuleType - one of GRATICULE_UTM, GRATICULE_UTM_GRID, GRATICULE_100000M, GRATICULE_10000M,
GRATICULE_1000M, GRATICULE_100M, GRATICULE_10M, or GRATICULE_1M.
IllegalArgumentException - if graticuleType is null,
or if graticuleType is not a valid type.
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||