Package gov.nasa.worldwind.render
Class DeclutterableText
- java.lang.Object
-
- gov.nasa.worldwind.render.DeclutterableText
-
- All Implemented Interfaces:
Declutterable,OrderedRenderable,Renderable
public class DeclutterableText extends java.lang.Object implements Declutterable
A wrapper aroundGeographicTextthat allows provides participation in global text decluttering.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.awt.FontboundsFontprotected booleanenableDeclutteringprotected doubleeyeDistanceprotected Vec4pointprotected GeographicTexttextprotected java.awt.geom.Rectangle2DtextBoundsprotected DeclutteringTextRenderertextRenderer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.geom.Rectangle2DgetBounds(DrawContext dc)doublegetDistanceFromEye()Returns the ordered renderable's distance from the current view's eye point.Vec4getPoint()GeographicTextgetText()booleanisEnableDecluttering()Indicates whether this text should participate in decluttering.voidpick(DrawContext dc, java.awt.Point pickPoint)Executes a pick of the ordered renderable.voidrender(DrawContext dc)Causes thisRenderableto render itself using the provided draw context.
-
-
-
Field Detail
-
text
protected GeographicText text
-
point
protected Vec4 point
-
eyeDistance
protected double eyeDistance
-
textRenderer
protected DeclutteringTextRenderer textRenderer
-
enableDecluttering
protected boolean enableDecluttering
-
textBounds
protected java.awt.geom.Rectangle2D textBounds
-
boundsFont
protected java.awt.Font boundsFont
-
-
Method Detail
-
isEnableDecluttering
public boolean isEnableDecluttering()
Indicates whether this text should participate in decluttering.- Specified by:
isEnableDeclutteringin interfaceDeclutterable- Returns:
- true (the default) if it should participate, otherwise false.
-
getDistanceFromEye
public double getDistanceFromEye()
Description copied from interface:OrderedRenderableReturns the ordered renderable's distance from the current view's eye point. Intended to be used only to sort a list of ordered renderables according to eye distance, and only during frame generation when a view is active.- Specified by:
getDistanceFromEyein interfaceOrderedRenderable- Returns:
- the distance of the ordered renderable from the current view's eye point.
-
getText
public GeographicText getText()
-
getPoint
public Vec4 getPoint()
-
getBounds
public java.awt.geom.Rectangle2D getBounds(DrawContext dc)
- Specified by:
getBoundsin interfaceDeclutterable
-
render
public void render(DrawContext dc)
Causes thisRenderableto render itself using the provided draw context.- Specified by:
renderin interfaceRenderable- Parameters:
dc- theDrawContextto be used- See Also:
DrawContext
-
pick
public void pick(DrawContext dc, java.awt.Point pickPoint)
Description copied from interface:OrderedRenderableExecutes a pick of the ordered renderable.- Specified by:
pickin interfaceOrderedRenderable- Parameters:
dc- the current draw context.pickPoint- the pick point.
-
-