Package edu.wisc.ssec.mcidasv.ui
Class UIManager.IdvAction
java.lang.Object
edu.wisc.ssec.mcidasv.ui.UIManager.IdvAction
- Enclosing class:
UIManager
Represents an individual IDV action. Should be fairly adaptable to
unforeseen changes from Unidata?
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<UIManager.ActionAttribute, String> Mapping of (known) XML attributes to values for this individual action.private final Map<UIManager.ToolbarStyle, Icon> Simple "cache" for the different icons this action has displayed.private final ElementThe XMLElementthat represents this IDV action. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value associated with a givenUIManager.ActionAttributefor this action.Representation of thisIdvActionas an "IDV action call".Returns theIconassociated with this action and the givenUIManager.ToolbarStyle.getId()toString()Returns a brief description of this action.
-
Field Details
-
originalElement
The XMLElementthat represents this IDV action. -
attributes
Mapping of (known) XML attributes to values for this individual action. -
iconCache
Simple "cache" for the different icons this action has displayed. This is "lazy", so the cache does not contain icons forUIManager.ToolbarStyles that haven't been used.
-
-
Constructor Details
-
IdvAction
Creates a representation of an IDV action using a givenElement.- Parameters:
element- XML representation of an IDV action. Cannot benull.- Throws:
NullPointerException- ifelementisnull.IllegalArgumentException- ifelementis not a valid IDV action.- See Also:
-
-
Method Details
-
getRawIconPath
- Returns:
- Returns the "raw" path to the icon associated with this action. Remember that this is actually a "format string" and should not be considered a valid path!
- See Also:
-
getMenuIcon
- Returns:
- Returns the
Iconassociated withUIManager.ToolbarStyle.SMALL.
-
getIconForStyle
Returns theIconassociated with this action and the givenUIManager.ToolbarStyle.- Parameters:
style- "Style" of theIconto be returned. Cannot benull.- Returns:
- This action's
Iconwithstyle"applied." - See Also:
-
getId
- Returns:
- Returns the identifier of this
IdvAction.
-
getCommand
Representation of thisIdvActionas an "IDV action call".- Returns:
- String that is suitable to hand off to the IDV for execution.
-
getAttribute
Returns the value associated with a givenUIManager.ActionAttributefor this action.- Parameters:
attr- ActionAttribute whose value you want. Cannot benull.- Returns:
- Value associated with
attr. - Throws:
NullPointerException- ifattrisnull.
-
getElement
- Returns:
- The XML
Elementused to create thisIdvAction.
-
toString
Returns a brief description of this action. Please note that the format is subject to change and is not intended for serialization.
-