public static final class UIManager.IdvActions extends java.lang.Object
IdvActions
in an idiom
that can be easily used by both the IDV and McIDAS-V.Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.util.Set<UIManager.IdvAction>> |
groupToActions
Collects
IdvActions "under" common
group values. |
private java.util.Map<java.lang.String,UIManager.IdvAction> |
idToAction
Maps "id" values to
IdvActions . |
Constructor and Description |
---|
IdvActions(ucar.unidata.idv.IntegratedDataViewer idv,
ucar.unidata.idv.IdvResourceManager.XmlIdvResource collectionId)
Creates an object that represents the application's
IdvActions . |
Modifier and Type | Method and Description |
---|---|
UIManager.IdvAction |
getAction(java.lang.String actionId)
Attempts to return the
UIManager.IdvAction associated with the given
actionId . |
java.util.Set<UIManager.IdvAction> |
getActionsForGroup(java.lang.String group)
|
java.util.List<UIManager.IdvAction> |
getAllActions() |
java.util.List<java.lang.String> |
getAllGroups() |
java.lang.String |
getAttributeForAction(java.lang.String actionId,
UIManager.ActionAttribute attr)
Searches for the action associated with
actionId and
returns the value associated with the given UIManager.ActionAttribute . |
java.util.List<java.lang.String> |
getAttributes(UIManager.ActionAttribute attr) |
org.w3c.dom.Element |
getElementForAction(java.lang.String actionId)
Attempts to return the XML
Element that
"represents" the action associated with actionId . |
javax.swing.Icon |
getStyledIconFor(java.lang.String actionId,
UIManager.ToolbarStyle style)
|
java.lang.String |
toString()
Returns a summary of the known IDV actions.
|
private final java.util.Map<java.lang.String,UIManager.IdvAction> idToAction
IdvActions
.private final java.util.Map<java.lang.String,java.util.Set<UIManager.IdvAction>> groupToActions
IdvActions
"under" common
group values.public IdvActions(ucar.unidata.idv.IntegratedDataViewer idv, ucar.unidata.idv.IdvResourceManager.XmlIdvResource collectionId)
IdvActions
.idv
- Reference to the IDV "god" object.
Cannot be null
.collectionId
- IDV resource collection that contains our
actions. Cannot be null
.java.lang.NullPointerException
- if idv
or collectionId
is null
.public UIManager.IdvAction getAction(java.lang.String actionId)
UIManager.IdvAction
associated with the given
actionId
.actionId
- Identifier to use in the search. Cannot be
null
.IdvAction
that matches actionId
or null
if there was no match.java.lang.NullPointerException
- if actionId
is null
.public java.lang.String getAttributeForAction(java.lang.String actionId, UIManager.ActionAttribute attr)
actionId
and
returns the value associated with the given UIManager.ActionAttribute
.actionId
- Identifier to search for. Cannot be null
.attr
- Attribute whose value is desired. Cannot be null
.null
if actionId
has no associated action.java.lang.NullPointerException
- if either actionId
or
attr
is null
.public org.w3c.dom.Element getElementForAction(java.lang.String actionId)
Element
that
"represents" the action associated with actionId
.actionId
- Identifier whose XML element is desired.
Cannot be null
.actionId
or
null
.java.lang.NullPointerException
- if actionId
is null
.UIManager.IdvAction.originalElement
public javax.swing.Icon getStyledIconFor(java.lang.String actionId, UIManager.ToolbarStyle style)
actionId
- ID of the action whose "styled" icon is
desired. Cannot be null
.style
- Desired Icon
style. Cannot be null
.Icon
associated with actionId
and style
, or null
.java.lang.NullPointerException
- if either actionId
or
style
is null
.public java.util.List<java.lang.String> getAttributes(UIManager.ActionAttribute attr)
public java.util.List<UIManager.IdvAction> getAllActions()
IdvAction
s.public java.util.List<java.lang.String> getAllGroups()
UIManager.ActionAttribute.GROUP
,
getActionsForGroup(String)
public java.util.Set<UIManager.IdvAction> getActionsForGroup(java.lang.String group)
group
- Group whose associated actions you want. Cannot be
null
.IdvAction
s associated with
group
. A blank collection is returned if there are no actions
associated with group
.java.lang.NullPointerException
- if group
is null
.UIManager.ActionAttribute.GROUP
,
getAllGroups()
public java.lang.String toString()
toString
in class java.lang.Object
[IdvActions@HASHCODE: actions=...]
.