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