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.StringactionCommandprotected doubledisabledOpacityprotected booleanenabledprotected javax.swing.event.EventListenerListlistenerListprotected booleanpressedprotected WWTexturepressedMaskTexture-
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 voidaddActionListener(java.awt.event.ActionListener listener)protected voidapplyBackgroundTextureState(DrawContext dc, int width, int height, double opacity, WWTexture texture)protected voiddoDrawPressedMask(DrawContext dc, int width, int height, double opacity, Position pickPosition)voiddrawContent(DrawContext dc, int width, int height, double opacity, Position pickPosition)protected voiddrawPressedMask(DrawContext dc, int width, int height, double opacity, Position pickPosition)protected voidfireActionPerformed(int id, long when, int modifiers)java.lang.StringgetActionCommand()java.awt.event.ActionListener[]getActionListeners()doublegetDisabledOpacity()java.lang.ObjectgetPressedMaskSource()WWTexturegetPressedMaskTexture()protected booleanisButtonPressed(SelectEvent e)protected booleanisButtonTrigger(SelectEvent e)booleanisEnabled()booleanisPressed()protected voidonButtonPressed(SelectEvent e)voidremoveActionListener(java.awt.event.ActionListener listener)voidselected(SelectEvent e)voidsetActionCommand(java.lang.String actionCommand)voidsetDisabledOpacity(double opacity)voidsetEnabled(boolean enabled)voidsetPressed(boolean pressed)voidsetPressedMaskSource(java.lang.Object source)protected voidsetupAnnotationAttributes(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:
setupAnnotationAttributesin classImageAnnotation
-
selected
public void selected(SelectEvent e)
- Specified by:
selectedin 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:
drawContentin 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:
applyBackgroundTextureStatein classImageAnnotation
-
doDrawPressedMask
protected void doDrawPressedMask(DrawContext dc, int width, int height, double opacity, Position pickPosition)
-
-