public static final class UIManager.IdvAction extends Object
Modifier and Type | Field and Description |
---|---|
private Map<UIManager.ActionAttribute,String> |
attributes
Mapping of (known) XML attributes to values for this individual action.
|
private Map<UIManager.ToolbarStyle,Icon> |
iconCache
Simple "cache" for the different icons this action has
displayed.
|
private Element |
originalElement
The XML
Element that represents this IDV action. |
Constructor and Description |
---|
IdvAction(Element element)
Creates a representation of an IDV action using a given
Element . |
Modifier and Type | Method and Description |
---|---|
String |
getAttribute(UIManager.ActionAttribute attr)
Returns the value associated with a given
UIManager.ActionAttribute
for this action. |
String |
getCommand()
Representation of this
IdvAction as an
"IDV action call". |
Element |
getElement() |
Icon |
getIconForStyle(UIManager.ToolbarStyle style)
Returns the
Icon associated with this action and the given
UIManager.ToolbarStyle . |
String |
getId() |
Icon |
getMenuIcon() |
String |
getRawIconPath() |
String |
toString()
Returns a brief description of this action.
|
private final Element originalElement
Element
that represents this IDV action.private final Map<UIManager.ActionAttribute,String> attributes
private final Map<UIManager.ToolbarStyle,Icon> iconCache
UIManager.ToolbarStyle
s that haven't been used.public IdvAction(Element element)
Element
.element
- XML representation of an IDV action.
Cannot be null
.NullPointerException
- if element
is null
.IllegalArgumentException
- if element
is not a valid
IDV action.UIManager.isValidIdvAction(Element)
public String getRawIconPath()
getIconForStyle(edu.wisc.ssec.mcidasv.ui.UIManager.ToolbarStyle)
public Icon getMenuIcon()
Icon
associated with
UIManager.ToolbarStyle.SMALL
.public Icon getIconForStyle(UIManager.ToolbarStyle style)
Icon
associated with this action and the given
UIManager.ToolbarStyle
.style
- "Style" of the Icon
to be returned.
Cannot be null
.Icon
with style
"applied."UIManager.ActionAttribute.ICON
,
iconCache
public String getCommand()
IdvAction
as an
"IDV action call".public String getAttribute(UIManager.ActionAttribute attr)
UIManager.ActionAttribute
for this action.attr
- ActionAttribute whose value you want.
Cannot be null
.attr
.NullPointerException
- if attr
is null
.public Element getElement()
Element
used to create this IdvAction
.