|
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.render.AbstractSurfaceObject
gov.nasa.worldwind.render.AbstractSurfaceShape
gov.nasa.worldwind.render.SurfacePolyline
public class SurfacePolyline
Nested Class Summary |
---|
Nested classes/interfaces inherited from class gov.nasa.worldwind.render.AbstractSurfaceShape |
---|
AbstractSurfaceShape.GeometryKey, AbstractSurfaceShape.SurfaceShapeStateKey |
Nested classes/interfaces inherited from class gov.nasa.worldwind.render.AbstractSurfaceObject |
---|
AbstractSurfaceObject.CacheEntry, AbstractSurfaceObject.SurfaceObjectStateKey |
Field Summary | |
---|---|
protected boolean |
closed
|
protected Iterable<? extends LatLon> |
locations
|
Fields inherited from class gov.nasa.worldwind.render.AbstractSurfaceObject |
---|
delegateOwner, drawBoundingSectors, enableBatchPicking, extentCache, lastModifiedTime, nextUniqueId, pickLayer, pickSupport, pickTileBuilder, pickTiles, uniqueId, visible |
Fields inherited from interface gov.nasa.worldwind.Exportable |
---|
FORMAT_NOT_SUPPORTED, FORMAT_PARTIALLY_SUPPORTED, FORMAT_SUPPORTED |
Constructor Summary | |
---|---|
SurfacePolyline()
Constructs a new surface polyline with the default attributes and no locations. |
|
SurfacePolyline(Iterable<? extends LatLon> iterable)
Constructs a new surface polyline with the default attributes and the specified iterable of locations. |
|
SurfacePolyline(ShapeAttributes normalAttrs)
Constructs a new surface polyline with the specified normal (as opposed to highlight) attributes and no locations. |
|
SurfacePolyline(ShapeAttributes normalAttrs,
Iterable<? extends LatLon> iterable)
Constructs a new surface polyline with the specified normal (as opposed to highlight) attributes and the specified iterable of locations. |
Method Summary | |
---|---|
protected List<List<LatLon>> |
createGeometry(Globe globe,
SurfaceTileDrawContext sdc)
|
protected void |
doGetRestorableState(RestorableSupport rs,
RestorableSupport.StateObject context)
|
protected void |
doMoveTo(Position oldReferencePosition,
Position newReferencePosition)
|
protected void |
doRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
|
protected void |
drawInterior(DrawContext dc,
SurfaceTileDrawContext sdc)
|
void |
export(String mimeType,
Object output)
Exports the object to a format. |
protected void |
exportAsKML(Object output)
Export the polyline to KML as a <Placemark> element. |
Iterable<? extends LatLon> |
getLocations()
|
Iterable<? extends LatLon> |
getLocations(Globe globe)
Returns the shape's locations as they appear on the specified globe , or null if the shape has no
locations. |
Position |
getReferencePosition()
A position associated with the object that indicates its aggregate geographic position. |
boolean |
isClosed()
|
String |
isExportFormatSupported(String mimeType)
Does this object support a certain export format? |
protected void |
legacyRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
Restores state values from previous versions of the SurfaceShape state XML. |
void |
setClosed(boolean closed)
|
void |
setLocations(Iterable<? extends LatLon> iterable)
|
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, toString, wait, wait, wait |
Methods inherited from interface gov.nasa.worldwind.render.SurfaceObject |
---|
getDelegateOwner, getDistanceFromEye, getExtent, isVisible, pick, preRender, render, setDelegateOwner, setVisible |
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 |
Field Detail |
---|
protected boolean closed
protected Iterable<? extends LatLon> locations
Constructor Detail |
---|
public SurfacePolyline()
public SurfacePolyline(Iterable<? extends LatLon> iterable)
iterable
- the polyline locations.
IllegalArgumentException
- if the locations iterable is null.public SurfacePolyline(ShapeAttributes normalAttrs)
normalAttrs
- the normal attributes. May be null, in which case default attributes are used.public SurfacePolyline(ShapeAttributes normalAttrs, Iterable<? extends LatLon> iterable)
normalAttrs
- the normal attributes. May be null, in which case default attributes are used.iterable
- the polyline locations.
IllegalArgumentException
- if the locations iterable is null.Method Detail |
---|
protected List<List<LatLon>> createGeometry(Globe globe, SurfaceTileDrawContext sdc)
createGeometry
in class AbstractSurfaceShape
protected void doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)
doGetRestorableState
in class AbstractSurfaceShape
protected void doMoveTo(Position oldReferencePosition, Position newReferencePosition)
doMoveTo
in class AbstractSurfaceShape
protected void doRestoreState(RestorableSupport rs, RestorableSupport.StateObject context)
doRestoreState
in class AbstractSurfaceShape
protected void drawInterior(DrawContext dc, SurfaceTileDrawContext sdc)
drawInterior
in class AbstractSurfaceShape
public void export(String mimeType, Object output) throws IOException, UnsupportedOperationException
Exportable
export
in interface Exportable
mimeType
- Desired export format. Call Exportable.isExportFormatSupported(String)
to make sure that the object
supports the format before trying to export, or be prepared to handle UnsupportedOperationException
.output
- Object that will receive the exported data. The type of this object depends on the export format.
All formats should support java.io.OutputStream
. Text based format (for example, XML
formats) should also support java.io.Writer
. Certain formats may also support other
object types.
IOException
- if an exception occurs while exporting the data.
UnsupportedOperationException
- if the format is not supported by this object, or if the output
argument is not of a supported type.Exportable.isExportFormatSupported(String)
protected void exportAsKML(Object output) throws IOException, javax.xml.stream.XMLStreamException
<Placemark>
element. The output
object will receive the data.
This object must be one of: java.io.Writer java.io.OutputStream javax.xml.stream.XMLStreamWriter
output
- Object to receive the generated KML.
javax.xml.stream.XMLStreamException
- If an exception occurs while writing the KML
IOException
- if an exception occurs while exporting the data.export(String, Object)
public Iterable<? extends LatLon> getLocations()
public Iterable<? extends LatLon> getLocations(Globe globe)
SurfaceShape
globe
, or null if the shape has no
locations.
getLocations
in interface SurfaceShape
globe
- the globe the shape is related to.
public Position getReferencePosition()
Movable
getReferencePosition
in interface Movable
getReferencePosition
in class AbstractSurfaceShape
public boolean isClosed()
public String isExportFormatSupported(String mimeType)
isExportFormatSupported
in interface Exportable
mimeType
- Desired export format.
Exportable.FORMAT_SUPPORTED
, Exportable.FORMAT_NOT_SUPPORTED
, or Exportable.FORMAT_PARTIALLY_SUPPORTED
.Exportable.export(String, Object)
protected void legacyRestoreState(RestorableSupport rs, RestorableSupport.StateObject context)
AbstractSurfaceShape
AbstractSurfaceShape.doRestoreState(gov.nasa.worldwind.util.RestorableSupport,
gov.nasa.worldwind.util.RestorableSupport.StateObject)
.
legacyRestoreState
in class AbstractSurfaceShape
rs
- RestorableSupport object which contains the state value properties.context
- active context in the RestorableSupport to read state from.public void setClosed(boolean closed)
public void setLocations(Iterable<? extends LatLon> iterable)
|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |