public interface WWIcon extends AVList, Restorable
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getBackgroundImage()
Returns the icon's background image source, if any.
|
double |
getBackgroundScale()
Indicates the relative screen size of the background image, if specified.
|
BasicWWTexture |
getBackgroundTexture()
Returns the
WWTexture used to represent the icon's background texture. |
double |
getHighlightScale()
Returns the icon's highlight scale, which indicates the degree of expansion or shrinkage applied to the icon when
it's drawn in its highlighted state.
|
java.lang.Object |
getImageSource()
Returns the icon's image source.
|
BasicWWTexture |
getImageTexture()
Returns the
WWTexture used to represent the icon. |
Position |
getPosition()
Returns the icon's geographic position.
|
java.awt.Dimension |
getSize()
Returns the icon's specified screen size.
|
java.awt.Font |
getToolTipFont()
Returns the font used to render an icon's tool tip, if any.
|
Vec4 |
getToolTipOffset()
Indicates the offset in screen coordinates at which to place the lower left corner of the icon tool tip's text
box.
|
java.lang.String |
getToolTipText()
Returns the icon's current tool tip text.
|
java.awt.Color |
getToolTipTextColor()
Indicates the color in which the icon's tool tip, if any, is drawn.
|
boolean |
isAlwaysOnTop()
Indicates whether the icon is always to be displayed "on top" of all other ordered renderables.
|
boolean |
isHighlighted()
Indicates whether the icon should be drawn in its highlighted state.
|
boolean |
isShowToolTip()
Indicates whether the icon's tool tip, if any, is displayed with the icon.
|
boolean |
isVisible()
Returns the state of the visibility flag.
|
void |
setAlwaysOnTop(boolean alwaysOnTop)
Indicates whether the icon is always to be displayed "on top" of all other ordered renderables.
|
void |
setBackgroundImage(java.lang.Object background)
Specifies the icon's background image source.
|
void |
setBackgroundScale(double backgroundScale)
Indicates the relative screen size of the background image, if specified.
|
void |
setHighlighted(boolean highlighted)
Specifies whether the icon should be drawn in its highlighted state.
|
void |
setHighlightScale(double highlightScale)
Specifies the relative screen size of the icon when it's highlighted.
|
void |
setImageSource(java.lang.Object imageSource)
Specifies the source image for the icon.
|
void |
setPosition(Position iconPosition)
Sets the icon's geographic position.
|
void |
setShowToolTip(boolean showToolTip)
Indicates whether the icon's tool tip, if any, is displayed with the icon.
|
void |
setSize(java.awt.Dimension size)
Sets the desired screen size of the icon.
|
void |
setToolTipFont(java.awt.Font toolTipFont)
Specifies the font to use when displaying the icon's tool tip, if any.
|
void |
setToolTipOffset(Vec4 toolTipOffset)
Indicates the offset in screen coordinates at which to place the lower left corner of the icon tool tip's text
box.
|
void |
setToolTipText(java.lang.String toolTipText)
Specifies the text string to display as the icon's tool tip.
|
void |
setToolTipTextColor(java.awt.Color textColor)
Specifies the color in which to display the icon's tool tip text, if any.
|
void |
setVisible(boolean visible)
Specifies whether the icon is drawn.
|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
getRestorableState, restoreState
java.lang.Object getBackgroundImage()
double getBackgroundScale()
BasicWWTexture getBackgroundTexture()
WWTexture
used to represent the icon's background texture.double getHighlightScale()
java.lang.Object getImageSource()
BasicWWTexture getImageTexture()
WWTexture
used to represent the icon.Position getPosition()
java.awt.Dimension getSize()
setSize(java.awt.Dimension)
java.awt.Font getToolTipFont()
Vec4 getToolTipOffset()
java.lang.String getToolTipText()
java.awt.Color getToolTipTextColor()
boolean isAlwaysOnTop()
boolean isHighlighted()
boolean isShowToolTip()
boolean isVisible()
void setAlwaysOnTop(boolean alwaysOnTop)
alwaysOnTop
- true if the icon has visual priority, otherwise false, the default.void setBackgroundImage(java.lang.Object background)
background
- the background image source. The default is null.void setBackgroundScale(double backgroundScale)
backgroundScale
- the background image scale.void setHighlighted(boolean highlighted)
highlighted
- true if the icon should be rendered as highlighted, otherwise false.void setHighlightScale(double highlightScale)
highlightScale
- the highlight scale.void setImageSource(java.lang.Object imageSource)
String
file path and a BufferedImage
.imageSource
- the image source.java.lang.IllegalArgumentException
- if imageSource
is null or the source is not an allowed type.void setPosition(Position iconPosition)
iconPosition
- the icon's geographic position. May be null to indicate that the icon has no current position
and therefore should not be displayed.void setShowToolTip(boolean showToolTip)
showToolTip
- true if the tool tip is displayed when the icon is rendered, otherwise false, the default.void setSize(java.awt.Dimension size)
size
- the desired screen size, or null if the icon should be displayed at its source image size.void setToolTipFont(java.awt.Font toolTipFont)
toolTipFont
- the tool tip font. If null, an implementation dependent font is used.void setToolTipOffset(Vec4 toolTipOffset)
toolTipOffset
- the tool tip offset. The default is null.void setToolTipText(java.lang.String toolTipText)
toolTipText
- the tool tip text. May be null, the default, to indicate no tool tip is displaye.void setToolTipTextColor(java.awt.Color textColor)
textColor
- the tool tip text color. The default is null, in which case an implementation dependent color is
used.void setVisible(boolean visible)
visible
- true if the icon is drawn, otherwise false. The default is true.