NASA World Wind

gov.nasa.worldwind.examples.util
Class ProgressAnnotation

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.worldwind.examples.util.ProgressAnnotation
All Implemented Interfaces:
AVList, Disposable, Pickable, Annotation, Renderable, Restorable

public class ProgressAnnotation
extends ScreenAnnotation


Nested Class Summary
 
Nested classes/interfaces inherited from class gov.nasa.worldwind.render.AbstractAnnotation
AbstractAnnotation.TextCacheKey
 
Field Summary
protected  Color interiorColor
           
protected  Insets interiorInsets
           
protected  double max
           
protected  double min
           
protected  Color outlineColor
           
protected  double value
           
 
Fields inherited from class gov.nasa.worldwind.render.AbstractAnnotation
attributes, childList, delegateOwner, layoutManager, text, textBoundsMap, wrappedTextMap
 
Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl
changeSupport
 
Fields inherited from interface gov.nasa.worldwind.render.Annotation
ANTIALIAS_DONT_CARE, ANTIALIAS_FASTEST, ANTIALIAS_NICEST, IMAGE_REPEAT_NONE, IMAGE_REPEAT_X, IMAGE_REPEAT_XY, IMAGE_REPEAT_Y, SIZE_FIT_TEXT, SIZE_FIXED
 
Constructor Summary
ProgressAnnotation()
           
ProgressAnnotation(double value, double min, double max)
           
 
Method Summary
protected  Rectangle computeProgressBarBounds(int width, int height)
           
protected  int computeProgressBarWidth(int containerWidth)
           
protected  Rectangle computeProgressContainerBounds(int width, int height)
           
protected  void doDraw(DrawContext dc, int width, int height, double opacity, Position pickPosition)
          Draws an annotation with the given dimensions and opacity.
protected  void drawCallout(DrawContext dc, int mode, Rectangle bounds, boolean useTexCoords)
           
protected  void drawProgress(DrawContext dc, int width, int height, double opacity, Position pickPosition)
           
protected  void drawProgressBar(DrawContext dc, int width, int height, double opacity, Position pickPosition)
           
protected  void drawProgressContainer(DrawContext dc, int width, int height, double opacity, Position pickPosition)
           
 Color getInteriorColor()
           
 Insets getInteriorInsets()
           
 double getMax()
           
 double getMin()
           
 Color getOutlineColor()
           
 double getValue()
           
 void setInteriorColor(Color color)
           
 void setInteriorInsets(Insets insets)
           
 void setMax(double max)
           
 void setMin(double min)
           
 void setOutlineColor(Color color)
           
 void setValue(double value)
           
 
Methods inherited from class gov.nasa.worldwind.render.ScreenAnnotation
doRenderNow, getRestorableState, getScreenPoint, restoreState, setScreenPoint
 
Methods inherited from class gov.nasa.worldwind.render.AbstractAnnotation
addChild, adjustSizeToChildren, adjustSizeToText, applyBackgroundTextureState, applyBackgroundTextureTransform, applyScreenTransform, beginDraw, beginDrawChildren, bindPickableObject, computeFreeBounds, computeInsetBounds, computeOpacity, computeScale, computeTextBounds, dispose, doDrawBackgroundTexture, doDrawChildren, draw, drawBackground, drawBackgroundImage, drawBorder, drawCallout, drawChildren, drawContent, drawHTML, drawPlainText, drawText, drawText, drawTopLevelAnnotation, endDraw, endDrawChildren, getAnnotationTexture, getAttributes, getCachedImage, getChildren, getDelegateOwner, getLayout, getMultiLineTextRenderer, getPickSupport, getPreferredSize, getText, getTextBounds, getTextRenderer, getWrappedText, glPointFromAWTPoint, isAlwaysOnTop, isPickEnabled, modulateColorOpacity, pick, removeAllChildren, removeChild, render, renderNow, setAlwaysOnTop, setAttributes, setCachedImage, setDelegateOwner, setDrawColor, setLayout, setPickEnabled, setPickSupport, setText, transformByModelview, wrapText
 
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, 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
 

Field Detail

interiorColor

protected Color interiorColor

interiorInsets

protected Insets interiorInsets

max

protected double max

min

protected double min

outlineColor

protected Color outlineColor

value

protected double value
Constructor Detail

ProgressAnnotation

public ProgressAnnotation()

ProgressAnnotation

public ProgressAnnotation(double value,
                          double min,
                          double max)
Method Detail

computeProgressBarBounds

protected Rectangle computeProgressBarBounds(int width,
                                             int height)

computeProgressBarWidth

protected int computeProgressBarWidth(int containerWidth)

computeProgressContainerBounds

protected Rectangle computeProgressContainerBounds(int width,
                                                   int height)

doDraw

protected void doDraw(DrawContext dc,
                      int width,
                      int height,
                      double opacity,
                      Position pickPosition)
Description copied from class: AbstractAnnotation
Draws an annotation with the given dimensions and opacity. Current GL state has ortho identity model view active with origin at the screen point.

Overrides:
doDraw in class AbstractAnnotation
Parameters:
dc - current DrawContext.
width - annotation callout width
height - annotation callout height
opacity - opacity to apply
pickPosition - Position that will be associated with any PickedObject produced during picking.

drawCallout

protected void drawCallout(DrawContext dc,
                           int mode,
                           Rectangle bounds,
                           boolean useTexCoords)

drawProgress

protected void drawProgress(DrawContext dc,
                            int width,
                            int height,
                            double opacity,
                            Position pickPosition)

drawProgressBar

protected void drawProgressBar(DrawContext dc,
                               int width,
                               int height,
                               double opacity,
                               Position pickPosition)

drawProgressContainer

protected void drawProgressContainer(DrawContext dc,
                                     int width,
                                     int height,
                                     double opacity,
                                     Position pickPosition)

getInteriorColor

public Color getInteriorColor()

getInteriorInsets

public Insets getInteriorInsets()

getMax

public double getMax()

getMin

public double getMin()

getOutlineColor

public Color getOutlineColor()

getValue

public double getValue()

setInteriorColor

public void setInteriorColor(Color color)

setInteriorInsets

public void setInteriorInsets(Insets insets)

setMax

public void setMax(double max)

setMin

public void setMin(double min)

setOutlineColor

public void setOutlineColor(Color color)

setValue

public void setValue(double value)

NASA World Wind