gov.nasa.worldwind.examples.util
Class ButtonAnnotation
java.lang.Object
gov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.render.AbstractAnnotation
gov.nasa.worldwind.render.ScreenAnnotation
gov.nasa.worldwind.examples.util.ImageAnnotation
gov.nasa.worldwind.examples.util.ButtonAnnotation
- All Implemented Interfaces:
- AVList, Disposable, SelectListener, Pickable, Annotation, Renderable, Restorable, EventListener
public class ButtonAnnotation
- extends ImageAnnotation
- implements SelectListener
Method Summary |
void |
addActionListener(ActionListener listener)
|
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)
|
String |
getActionCommand()
|
ActionListener[] |
getActionListeners()
|
double |
getDisabledOpacity()
|
Object |
getPressedMaskSource()
|
protected boolean |
isButtonPressed(SelectEvent e)
|
protected boolean |
isButtonTrigger(SelectEvent e)
|
boolean |
isEnabled()
|
boolean |
isPressed()
|
protected void |
onButtonPressed(SelectEvent e)
|
void |
removeActionListener(ActionListener listener)
|
void |
selected(SelectEvent e)
|
void |
setActionCommand(String actionCommand)
|
void |
setDisabledOpacity(double opacity)
|
void |
setEnabled(boolean enabled)
|
void |
setPressed(boolean pressed)
|
void |
setPressedMaskSource(Object source)
|
protected void |
setupAnnotationAttributes(Annotation annotation)
|
Methods inherited from class gov.nasa.worldwind.examples.util.ImageAnnotation |
adjustTextureToSize, applyBackgroundTextureState, applyBackgroundTextureTransform, doDrawToolTip, drawToolTip, getImageDimensions, getImageDimensions, getImageSource, getPreferredSize, getToolTipPoint, getToolTipText, isEnableSmoothing, isFitSizeToImage, isShowToolTip, isUseImageAspectRatio, isUseMipmaps, setEnableSmoothing, setFitSizeToImage, setImageSource, setShowToolTip, setToolTipPoint, setToolTipText, setUseImageAspectRatio, setUseMipmaps |
Methods inherited from class gov.nasa.worldwind.render.AbstractAnnotation |
addChild, adjustSizeToChildren, adjustSizeToText, applyScreenTransform, beginDraw, beginDrawChildren, bindPickableObject, computeFreeBounds, computeInsetBounds, computeOpacity, computeScale, computeTextBounds, dispose, doDraw, doDrawBackgroundTexture, doDrawChildren, draw, drawBackground, drawBackgroundImage, drawBorder, drawCallout, drawChildren, drawHTML, drawPlainText, drawText, drawText, drawTopLevelAnnotation, endDraw, endDrawChildren, getAnnotationTexture, getAttributes, getCachedImage, getChildren, getDelegateOwner, getLayout, getMultiLineTextRenderer, getPickSupport, 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 |
actionCommand
protected String actionCommand
disabledOpacity
protected double disabledOpacity
enabled
protected boolean enabled
listenerList
protected EventListenerList listenerList
pressed
protected boolean pressed
pressedMask
protected Object pressedMask
ButtonAnnotation
public ButtonAnnotation()
ButtonAnnotation
public ButtonAnnotation(Object imageSource)
ButtonAnnotation
public ButtonAnnotation(Object imageSource,
Object pressedMaskSource)
addActionListener
public void addActionListener(ActionListener listener)
doDrawPressedMask
protected void doDrawPressedMask(DrawContext dc,
int width,
int height,
double opacity,
Position pickPosition)
drawContent
public void drawContent(DrawContext dc,
int width,
int height,
double opacity,
Position pickPosition)
- Overrides:
drawContent
in class ImageAnnotation
drawPressedMask
protected void drawPressedMask(DrawContext dc,
int width,
int height,
double opacity,
Position pickPosition)
fireActionPerformed
protected void fireActionPerformed(int id,
long when,
int modifiers)
getActionCommand
public String getActionCommand()
getActionListeners
public ActionListener[] getActionListeners()
getDisabledOpacity
public double getDisabledOpacity()
getPressedMaskSource
public Object getPressedMaskSource()
isButtonPressed
protected boolean isButtonPressed(SelectEvent e)
isButtonTrigger
protected boolean isButtonTrigger(SelectEvent e)
isEnabled
public boolean isEnabled()
isPressed
public boolean isPressed()
onButtonPressed
protected void onButtonPressed(SelectEvent e)
removeActionListener
public void removeActionListener(ActionListener listener)
selected
public void selected(SelectEvent e)
- Specified by:
selected
in interface SelectListener
setActionCommand
public void setActionCommand(String actionCommand)
setDisabledOpacity
public void setDisabledOpacity(double opacity)
setEnabled
public void setEnabled(boolean enabled)
setPressed
public void setPressed(boolean pressed)
setPressedMaskSource
public void setPressedMaskSource(Object source)
setupAnnotationAttributes
protected void setupAnnotationAttributes(Annotation annotation)
- Overrides:
setupAnnotationAttributes
in class ImageAnnotation