Class SegmentPlaneRenderer.OrderedText
- java.lang.Object
-
- gov.nasa.worldwindx.applications.sar.segmentplane.SegmentPlaneRenderer.OrderedText
-
- All Implemented Interfaces:
OrderedRenderable,Renderable
- Enclosing class:
- SegmentPlaneRenderer
protected static class SegmentPlaneRenderer.OrderedText extends java.lang.Object implements OrderedRenderable
-
-
Field Summary
Fields Modifier and Type Field Description protected SegmentPlaneAttributes.LabelAttributesattributesprotected doubledistanceFromEyeprotected Positionpositionprotected SegmentPlanesegmentPlaneprotected MultiLineTextRenderertextRendererprotected AVListvalues
-
Constructor Summary
Constructors Constructor Description OrderedText(SegmentPlane segmentPlane, Position position, double distanceFromEye, AVList values, SegmentPlaneAttributes.LabelAttributes attributes, MultiLineTextRenderer textRenderer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbegin(DrawContext dc, OGLStackHandler ogsh)protected voiddraw(DrawContext dc)protected voiddrawText(java.lang.String text, Vec4 screenPoint, SegmentPlaneAttributes.LabelAttributes attributes, MultiLineTextRenderer mltr)protected voidend(DrawContext dc, OGLStackHandler ogsh)doublegetDistanceFromEye()Returns the ordered renderable's distance from the current view's eye point.Vec4getScreenPoint(DrawContext dc)protected Vec4getScreenPoint(DrawContext dc, Position position)java.lang.StringgetText()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
-
segmentPlane
protected SegmentPlane segmentPlane
-
position
protected final Position position
-
distanceFromEye
protected final double distanceFromEye
-
values
protected AVList values
-
attributes
protected SegmentPlaneAttributes.LabelAttributes attributes
-
textRenderer
protected MultiLineTextRenderer textRenderer
-
-
Constructor Detail
-
OrderedText
public OrderedText(SegmentPlane segmentPlane, Position position, double distanceFromEye, AVList values, SegmentPlaneAttributes.LabelAttributes attributes, MultiLineTextRenderer textRenderer)
-
-
Method Detail
-
getText
public java.lang.String getText()
-
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.
-
getScreenPoint
public Vec4 getScreenPoint(DrawContext dc)
-
getScreenPoint
protected Vec4 getScreenPoint(DrawContext dc, Position position)
-
render
public void render(DrawContext dc)
Description copied from interface:RenderableCauses 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.
-
draw
protected void draw(DrawContext dc)
-
begin
protected void begin(DrawContext dc, OGLStackHandler ogsh)
-
end
protected void end(DrawContext dc, OGLStackHandler ogsh)
-
drawText
protected void drawText(java.lang.String text, Vec4 screenPoint, SegmentPlaneAttributes.LabelAttributes attributes, MultiLineTextRenderer mltr)
-
-