NASA World Wind

gov.nasa.worldwindx.examples.util
Class ToolTipAnnotation

java.lang.Object
  extended by gov.nasa.worldwind.avlist.AVListImpl
      extended by gov.nasa.worldwind.render.AbstractAnnotation
          extended by gov.nasa.worldwind.render.ScreenAnnotation
              extended by 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 with ToolTipController.


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.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
ToolTipAnnotation(String text)
          Create a tool tip using specified text.
 
Method Summary
protected  Point adjustDrawPointToViewport(Point point, Rectangle bounds, Rectangle viewport)
           
protected  void doRenderNow(DrawContext dc)
           
protected  int getOffsetX()
           
protected  int getOffsetY()
           
 Point getTooltipOffset()
          Indicates the screen-coordinate offset of the tool tip from the tool tip position.
protected  void initializeAttributes()
           
 void setTooltipOffset(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
computeBounds, computeOffset, computeSize, getRestorableState, getScreenPoint, getScreenPoint, restoreState, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToolTipAnnotation

public ToolTipAnnotation(String text)
Create a tool tip using specified text.

Parameters:
text - the text to display in the tool tip.
Method Detail

adjustDrawPointToViewport

protected Point adjustDrawPointToViewport(Point point,
                                          Rectangle bounds,
                                          Rectangle viewport)

doRenderNow

protected void doRenderNow(DrawContext dc)
Overrides:
doRenderNow in class ScreenAnnotation

getOffsetX

protected int getOffsetX()

getOffsetY

protected int getOffsetY()

getTooltipOffset

public Point getTooltipOffset()
Indicates the screen-coordinate offset of the tool tip from the tool tip position.

Returns:
the tool tip offset.

initializeAttributes

protected void initializeAttributes()

setTooltipOffset

public void setTooltipOffset(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.

NASA World Wind