Package edu.wisc.ssec.mcidasv.ui
Enum Class UIManager.ActionAttribute
- All Implemented Interfaces:
Serializable,Comparable<UIManager.ActionAttribute>,Constable
- Enclosing class:
UIManager
Represents what McIDAS-V "knows" about IDV actions.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionActual method call used to invoke a given IDV action.Brief description of a IDV action.Allows actions to be clustered into arbitrary groups.Path to an icon for this action.Unique identifier for an IDV action. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringA blankStringif this is a required attribute, or aStringvalue to use in case this attribute has not been specified by a given IDV action.private final StringString representation of this attribute as used by the IDV.private final booleanWhether or not this attribute is required. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateActionAttribute(String idvString) Creates a constant that represents a required IDV action attribute.privateActionAttribute(String idvString, String defValue) Creates a constant that represents an optional IDV action attribute. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic UIManager.ActionAttributeReturns the enum constant of this class with the specified name.static UIManager.ActionAttribute[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ID
Unique identifier for an IDV action. Required attribute.- See Also:
-
ICON
Path to an icon for this action. Currently required. Note that McIDAS-V differs from the IDV in that actions must support different icon sizes. This is implemented in McIDAS-V by simply having the value of this path be a valid "format string", such asimage="/edu/wisc/ssec/mcidasv/resources/icons/toolbar/background-image%d.png"The upshot is that this value will not be a valid path in McIDAS-V. Use either
UIManager.IdvAction.getMenuIcon()orUIManager.IdvAction.getIconForStyle(edu.wisc.ssec.mcidasv.ui.UIManager.ToolbarStyle).- See Also:
-
DESCRIPTION
Brief description of a IDV action. Required attribute.- See Also:
-
GROUP
Allows actions to be clustered into arbitrary groups. Currently optional; defaults to "General".- See Also:
-
ACTION
Actual method call used to invoke a given IDV action. Required attribute.- See Also:
-
-
Field Details
-
defaultValue
A blankStringif this is a required attribute, or aStringvalue to use in case this attribute has not been specified by a given IDV action. -
idvString
String representation of this attribute as used by the IDV.- See Also:
-
required
Whether or not this attribute is required.
-
-
Constructor Details
-
ActionAttribute
Creates a constant that represents a required IDV action attribute.- Parameters:
idvString- Corresponding IDV attributeString. Cannot benull.- Throws:
NullPointerException- ifidvStringisnull.
-
ActionAttribute
Creates a constant that represents an optional IDV action attribute.- Parameters:
idvString- Corresponding IDV attributeString. Cannot benull.defValue- Default value for actions that do not have this attribute. Cannot benullor an emptyString.- Throws:
NullPointerException- if eitheridvStringordefValueisnull.IllegalArgumentException- ifdefValueis an emptyString.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
asIdvString
- Returns:
- The
Stringrepresentation of this attribute, as is used by the IDV. - See Also:
-
defaultValue
- Returns:
- "Default value" for this attribute.
Blank
Strings imply that the attribute is required (and thus lacks a true default value).
-
isRequired
- Returns:
- Whether or not this attribute is a required attribute for
valid
UIManager.IdvActions.
-