Class ToolTipAnnotation
- java.lang.Object
-
- gov.nasa.worldwind.avlist.AVListImpl
-
- gov.nasa.worldwind.render.AbstractAnnotation
-
- gov.nasa.worldwind.render.ScreenAnnotation
-
- gov.nasa.worldwindx.examples.util.ToolTipAnnotation
-
- All Implemented Interfaces:
AVList
,Disposable
,Annotation
,Renderable
,Restorable
public class ToolTipAnnotation extends ScreenAnnotation
Displays a tool tip annotation at a specified screen position. Typically used in conjunction withToolTipController
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gov.nasa.worldwind.render.AbstractAnnotation
AbstractAnnotation.TextCacheKey
-
-
Field Summary
-
Fields inherited from class gov.nasa.worldwind.render.ScreenAnnotation
position, screenPoint
-
Fields inherited from class gov.nasa.worldwind.render.AbstractAnnotation
alwaysOnTop, attributes, childList, delegateOwner, layoutManager, maxActiveAltitude, minActiveAltitude, pickEnabled, pickSupport, text, textBoundsMap, vertexBuffer, wrappedTextMap
-
Fields inherited from interface gov.nasa.worldwind.render.Annotation
ANTIALIAS_DONT_CARE, ANTIALIAS_FASTEST, ANTIALIAS_NICEST
-
-
Constructor Summary
Constructors Constructor Description ToolTipAnnotation(java.lang.String text)
Create a tool tip using specified text.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.awt.Point
adjustDrawPointToViewport(java.awt.Point point, java.awt.Rectangle bounds, java.awt.Rectangle viewport)
protected void
doRenderNow(DrawContext dc)
protected int
getOffsetX()
protected int
getOffsetY()
java.awt.Point
getTooltipOffset()
Indicates the screen-coordinate offset of the tool tip from the tool tip position.protected void
initializeAttributes()
void
setTooltipOffset(java.awt.Point tooltipOffset)
Specifies the screen-coordinate offset of the tool tip from the tool tip position.-
Methods inherited from class gov.nasa.worldwind.render.ScreenAnnotation
computeAnnotationPosition, computeBounds, computeOffset, computeSize, getPosition, getRestorableState, getScreenPoint, getScreenPoint, restoreState, setPosition, setScreenPoint
-
Methods inherited from class gov.nasa.worldwind.render.AbstractAnnotation
addChild, adjustSizeToChildren, adjustSizeToText, applyBackgroundTextureState, applyColor, applyScreenTransform, beginDraw, beginDrawChildren, bindPickableObject, computeBoundingRectangle, computeFreeBounds, computeInsetBounds, computeOpacity, computeScale, computeTextBounds, dispose, doDraw, doDrawBackgroundTexture, doDrawChildren, draw, drawBackground, drawBackgroundImage, drawBorder, drawCallout, drawChildren, drawContent, drawHTML, drawPlainText, drawText, drawText, drawTopLevelAnnotation, endDraw, endDrawChildren, getAttributes, getBounds, getChildren, getDelegateOwner, getLayout, getMaxActiveAltitude, getMinActiveAltitude, getMultiLineTextRenderer, getPickSupport, getPreferredSize, getText, getTextBounds, getTextRenderer, getWrappedText, glPointFromAWTPoint, isAlwaysOnTop, isPickEnabled, modulateColorOpacity, pick, removeAllChildren, removeChild, render, renderNow, setAlwaysOnTop, setAttributes, setDelegateOwner, setLayout, setMaxActiveAltitude, setMinActiveAltitude, setPickEnabled, setPickSupport, setText, transformBackgroundImageCoordsToAnnotationCoords, transformByModelview, transformImageCoordsToBackgroundImageCoords, wrapText
-
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
-
-
-
-
Method Detail
-
initializeAttributes
protected void initializeAttributes()
-
getTooltipOffset
public java.awt.Point getTooltipOffset()
Indicates the screen-coordinate offset of the tool tip from the tool tip position.- Returns:
- the tool tip offset.
-
setTooltipOffset
public void setTooltipOffset(java.awt.Point tooltipOffset)
Specifies the screen-coordinate offset of the tool tip from the tool tip position.- Parameters:
tooltipOffset
- the tool tip offset. The default is five pixels to the left and up.
-
getOffsetX
protected int getOffsetX()
-
getOffsetY
protected int getOffsetY()
-
doRenderNow
protected void doRenderNow(DrawContext dc)
- Overrides:
doRenderNow
in classScreenAnnotation
-
adjustDrawPointToViewport
protected java.awt.Point adjustDrawPointToViewport(java.awt.Point point, java.awt.Rectangle bounds, java.awt.Rectangle viewport)
-
-