Class ButtonAnnotation
- java.lang.Object
-
- gov.nasa.worldwind.avlist.AVListImpl
-
- gov.nasa.worldwind.render.AbstractAnnotation
-
- gov.nasa.worldwind.render.ScreenAnnotation
-
- gov.nasa.worldwindx.examples.util.ImageAnnotation
-
- gov.nasa.worldwindx.examples.util.ButtonAnnotation
-
- All Implemented Interfaces:
AVList
,Disposable
,SelectListener
,Annotation
,Renderable
,Restorable
,java.util.EventListener
public class ButtonAnnotation extends ImageAnnotation implements SelectListener
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gov.nasa.worldwind.render.AbstractAnnotation
AbstractAnnotation.TextCacheKey
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
actionCommand
protected double
disabledOpacity
protected boolean
enabled
protected javax.swing.event.EventListenerList
listenerList
protected boolean
pressed
protected WWTexture
pressedMaskTexture
-
Fields inherited from class gov.nasa.worldwindx.examples.util.ImageAnnotation
enableSmoothing, fitSizeToImage, imageHeight, imageWidth, showToolTip, toolTipPoint, toolTipText, useImageAspectRatio, useMipmaps
-
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 ButtonAnnotation()
ButtonAnnotation(java.lang.Object imageSource)
ButtonAnnotation(java.lang.Object imageSource, java.lang.Object pressedMaskSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addActionListener(java.awt.event.ActionListener listener)
protected void
applyBackgroundTextureState(DrawContext dc, int width, int height, double opacity, WWTexture texture)
protected void
doDrawPressedMask(DrawContext dc, int width, int height, double opacity, Position pickPosition)
void
drawContent(DrawContext dc, int width, int height, double opacity, Position pickPosition)
protected void
drawPressedMask(DrawContext dc, int width, int height, double opacity, Position pickPosition)
protected void
fireActionPerformed(int id, long when, int modifiers)
java.lang.String
getActionCommand()
java.awt.event.ActionListener[]
getActionListeners()
double
getDisabledOpacity()
java.lang.Object
getPressedMaskSource()
WWTexture
getPressedMaskTexture()
protected boolean
isButtonPressed(SelectEvent e)
protected boolean
isButtonTrigger(SelectEvent e)
boolean
isEnabled()
boolean
isPressed()
protected void
onButtonPressed(SelectEvent e)
void
removeActionListener(java.awt.event.ActionListener listener)
void
selected(SelectEvent e)
void
setActionCommand(java.lang.String actionCommand)
void
setDisabledOpacity(double opacity)
void
setEnabled(boolean enabled)
void
setPressed(boolean pressed)
void
setPressedMaskSource(java.lang.Object source)
protected void
setupAnnotationAttributes(Annotation annotation)
-
Methods inherited from class gov.nasa.worldwindx.examples.util.ImageAnnotation
doDrawToolTip, drawToolTip, getImageDimension, getImageSize, getImageSource, getPreferredSize, getTexture, getToolTipPoint, getToolTipText, isEnableSmoothing, isFitSizeToImage, isShowToolTip, isUseImageAspectRatio, isUseMipmaps, setEnableSmoothing, setFitSizeToImage, setImageSource, setImageSource, setShowToolTip, setToolTipPoint, setToolTipText, setUseImageAspectRatio, setUseMipmaps, transformBackgroundImageCoordsToAnnotationCoords
-
Methods inherited from class gov.nasa.worldwind.render.ScreenAnnotation
computeAnnotationPosition, computeBounds, computeOffset, computeSize, doRenderNow, getPosition, getRestorableState, getScreenPoint, getScreenPoint, restoreState, setPosition, setScreenPoint
-
Methods inherited from class gov.nasa.worldwind.render.AbstractAnnotation
addChild, adjustSizeToChildren, adjustSizeToText, applyColor, applyScreenTransform, beginDraw, beginDrawChildren, bindPickableObject, computeBoundingRectangle, computeFreeBounds, computeInsetBounds, computeOpacity, computeScale, computeTextBounds, dispose, doDraw, doDrawBackgroundTexture, doDrawChildren, draw, drawBackground, drawBackgroundImage, drawBorder, drawCallout, drawChildren, drawHTML, drawPlainText, drawText, drawText, drawTopLevelAnnotation, endDraw, endDrawChildren, getAttributes, getBounds, getChildren, getDelegateOwner, getLayout, getMaxActiveAltitude, getMinActiveAltitude, getMultiLineTextRenderer, getPickSupport, getText, getTextBounds, getTextRenderer, getWrappedText, glPointFromAWTPoint, isAlwaysOnTop, isPickEnabled, modulateColorOpacity, pick, removeAllChildren, removeChild, render, renderNow, setAlwaysOnTop, setAttributes, setDelegateOwner, setLayout, setMaxActiveAltitude, setMinActiveAltitude, setPickEnabled, setPickSupport, setText, 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
-
-
-
-
Field Detail
-
enabled
protected boolean enabled
-
pressed
protected boolean pressed
-
actionCommand
protected java.lang.String actionCommand
-
disabledOpacity
protected double disabledOpacity
-
pressedMaskTexture
protected WWTexture pressedMaskTexture
-
listenerList
protected javax.swing.event.EventListenerList listenerList
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
-
setEnabled
public void setEnabled(boolean enabled)
-
isPressed
public boolean isPressed()
-
setPressed
public void setPressed(boolean pressed)
-
getActionCommand
public java.lang.String getActionCommand()
-
setActionCommand
public void setActionCommand(java.lang.String actionCommand)
-
getDisabledOpacity
public double getDisabledOpacity()
-
setDisabledOpacity
public void setDisabledOpacity(double opacity)
-
getPressedMaskSource
public java.lang.Object getPressedMaskSource()
-
setPressedMaskSource
public void setPressedMaskSource(java.lang.Object source)
-
getPressedMaskTexture
public WWTexture getPressedMaskTexture()
-
getActionListeners
public java.awt.event.ActionListener[] getActionListeners()
-
addActionListener
public void addActionListener(java.awt.event.ActionListener listener)
-
removeActionListener
public void removeActionListener(java.awt.event.ActionListener listener)
-
setupAnnotationAttributes
protected void setupAnnotationAttributes(Annotation annotation)
- Overrides:
setupAnnotationAttributes
in classImageAnnotation
-
selected
public void selected(SelectEvent e)
- Specified by:
selected
in interfaceSelectListener
-
isButtonPressed
protected boolean isButtonPressed(SelectEvent e)
-
isButtonTrigger
protected boolean isButtonTrigger(SelectEvent e)
-
onButtonPressed
protected void onButtonPressed(SelectEvent e)
-
fireActionPerformed
protected void fireActionPerformed(int id, long when, int modifiers)
-
drawContent
public void drawContent(DrawContext dc, int width, int height, double opacity, Position pickPosition)
- Overrides:
drawContent
in classImageAnnotation
-
drawPressedMask
protected void drawPressedMask(DrawContext dc, int width, int height, double opacity, Position pickPosition)
-
applyBackgroundTextureState
protected void applyBackgroundTextureState(DrawContext dc, int width, int height, double opacity, WWTexture texture)
- Overrides:
applyBackgroundTextureState
in classImageAnnotation
-
doDrawPressedMask
protected void doDrawPressedMask(DrawContext dc, int width, int height, double opacity, Position pickPosition)
-
-