public class KMLTraversalContext
extends java.lang.Object
KMLTraversalContext
provides a suitcase of KML specific state used to render a hierarchy of KML
features.Modifier and Type | Field and Description |
---|---|
protected double |
detailHint
Indicates this KML traversal context's detail hint.
|
protected java.util.Deque<KMLRegion> |
regionStack
The
Deque as this KML traversal context's Region stack. |
Constructor and Description |
---|
KMLTraversalContext()
Constructs a new KML traversal context in a default state, but otherwise does nothing.
|
Modifier and Type | Method and Description |
---|---|
double |
getDetailHint()
Indicates this KML traversal context's detail hint, which is described in
. |
void |
initialize()
Initializes this KML traversal context to its default state.
|
KMLRegion |
peekRegion()
Returns the KML Region on the top of this KML traversal context's Region stack, or
null if the
Region stack is empty. |
KMLRegion |
popRegion()
Removes the KML Region from the top of this KML traversal context's Region stack.
|
void |
pushRegion(KMLRegion region)
Adds the specified
region to the top of this KML traversal context's Region stack. |
void |
setDetailHint(double detailHint)
Specifies this KML traversal context's detail hint.
|
protected double detailHint
protected java.util.Deque<KMLRegion> regionStack
Deque
as this KML traversal context's Region stack. The region stack is used to implement
Regions inheritance of from a KML containers to their descendant KML features.public KMLTraversalContext()
public double getDetailHint()
setDetailHint(double)
.setDetailHint(double)
public void initialize()
public KMLRegion peekRegion()
null
if the
Region stack is empty. The Region on the top of the stack the last region added with a call to
pushRegion
. This does not modify the contents of the stack.null
if the stack is empty.public KMLRegion popRegion()
pushRegion
.java.util.NoSuchElementException
- if the Region stack is empty.public void pushRegion(KMLRegion region)
region
to the top of this KML traversal context's Region stack. The specified
region is returned by any subsequent calls to peekRegion
until either pushRegion
or
popRegion
are called. The region
is removed from the stack by calling
popRegion
.region
- the KML Region to add to the top of the stack.java.lang.IllegalArgumentException
- if region
is null
.public void setDetailHint(double detailHint)
detailHint
- the degree to modify the default relationship of KML scene resolution to screen resolution as
viewing distance changes. Values greater than 0 increase the resolution. Values less than 0
decrease the resolution. The default value is 0.