Package edu.wisc.ssec.mcidasv.ui
Class UIManager.IdvActions
java.lang.Object
edu.wisc.ssec.mcidasv.ui.UIManager.IdvActions
- Enclosing class:
UIManager
Represents the set of known
IdvActions in an idiom
that can be easily used by both the IDV and McIDAS-V.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<String, Set<UIManager.IdvAction>> CollectsIdvActions"under" common group values.private final Map<String, UIManager.IdvAction> Maps "id" values toIdvActions. -
Constructor Summary
ConstructorsConstructorDescriptionIdvActions(IntegratedDataViewer idv, IdvResourceManager.XmlIdvResource collectionId) Creates an object that represents the application'sIdvActions. -
Method Summary
Modifier and TypeMethodDescriptionAttempts to return theUIManager.IdvActionassociated with the givenactionId.getActionsForGroup(String group) getAttributeForAction(String actionId, UIManager.ActionAttribute attr) Searches for the action associated withactionIdand returns the value associated with the givenUIManager.ActionAttribute.getElementForAction(String actionId) Attempts to return the XMLElementthat "represents" the action associated withactionId.getStyledIconFor(String actionId, UIManager.ToolbarStyle style) toString()Returns a summary of the known IDV actions.
-
Field Details
-
idToAction
Maps "id" values toIdvActions. -
groupToActions
CollectsIdvActions"under" common group values.
-
-
Constructor Details
-
IdvActions
Creates an object that represents the application'sIdvActions.- Parameters:
idv- Reference to the IDV "god" object. Cannot benull.collectionId- IDV resource collection that contains our actions. Cannot benull.- Throws:
NullPointerException- ifidvorcollectionIdisnull.
-
-
Method Details
-
getAction
Attempts to return theUIManager.IdvActionassociated with the givenactionId.- Parameters:
actionId- Identifier to use in the search. Cannot benull.- Returns:
- Either the
IdvActionthat matchesactionIdornullif there was no match. - Throws:
NullPointerException- ifactionIdisnull.
-
getAttributeForAction
Searches for the action associated withactionIdand returns the value associated with the givenUIManager.ActionAttribute.- Parameters:
actionId- Identifier to search for. Cannot benull.attr- Attribute whose value is desired. Cannot benull.- Returns:
- Either the desired attribute value of the desired action,
or
nullifactionIdhas no associated action. - Throws:
NullPointerException- if eitheractionIdorattrisnull.
-
getElementForAction
Attempts to return the XMLElementthat "represents" the action associated withactionId.- Parameters:
actionId- Identifier whose XML element is desired. Cannot benull.- Returns:
- Either the XML element associated with
actionIdornull. - Throws:
NullPointerException- ifactionIdisnull.- See Also:
-
getStyledIconFor
- Parameters:
actionId- ID of the action whose "styled" icon is desired. Cannot benull.style- DesiredIconstyle. Cannot benull.- Returns:
- Either the
Iconassociated withactionIdandstyle, ornull. - Throws:
NullPointerException- if eitheractionIdorstyleisnull.
-
getAttributes
-
getAllActions
- Returns:
- List of all known
IdvActions.
-
getAllGroups
- Returns:
- List of all known action groupings.
- See Also:
-
getActionsForGroup
- Parameters:
group- Group whose associated actions you want. Cannot benull.- Returns:
- Collection of
IdvActions associated withgroup. A blank collection is returned if there are no actions associated withgroup. - Throws:
NullPointerException- ifgroupisnull.- See Also:
-
toString
Returns a summary of the known IDV actions. Please note that this format is subject to change, and is not intended for serialization.
-