edu.wisc.ssec.mcidasv.ui
Enum UIManager.ActionAttribute

java.lang.Object
  extended by java.lang.Enum<UIManager.ActionAttribute>
      extended by edu.wisc.ssec.mcidasv.ui.UIManager.ActionAttribute
All Implemented Interfaces:
Serializable, Comparable<UIManager.ActionAttribute>
Enclosing class:
UIManager

protected static enum UIManager.ActionAttribute
extends Enum<UIManager.ActionAttribute>

Represents what McIDAS-V "knows" about IDV actions.


Enum Constant Summary
ACTION
          Actual method call used to invoke a given IDV action.
DESCRIPTION
          Brief description of a IDV action.
GROUP
          Allows actions to be clustered into arbitrary groups.
ICON
          Path to an icon for this action.
ID
          Unique identifier for an IDV action.
 
Field Summary
private  String defaultValue
          A blank String if this is a required attribute, or a String value to use in case this attribute has not been specified by a given IDV action.
private  String idvString
          String representation of this attribute as used by the IDV.
private  boolean required
          Whether or not this attribute is required.
 
Method Summary
 String asIdvString()
           
 String defaultValue()
           
 boolean isRequired()
           
static UIManager.ActionAttribute valueOf(String name)
          Returns the enum constant of this type with the specified name.
static UIManager.ActionAttribute[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ID

public static final UIManager.ActionAttribute ID
Unique identifier for an IDV action. Required attribute.

See Also:
IdvUIManager.ATTR_ID

ICON

public static final UIManager.ActionAttribute 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 as image="/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() or IdvAction#getIconForStyle(ToolbarStyle).

See Also:
IdvUIManager.ATTR_IMAGE, UIManager.IdvAction.getRawIconPath(), UIManager.IdvAction.getMenuIcon(), IdvAction#getIconForStyle(ToolbarStyle)

DESCRIPTION

public static final UIManager.ActionAttribute DESCRIPTION
Brief description of a IDV action. Required attribute.

See Also:
IdvUIManager.ATTR_DESCRIPTION

GROUP

public static final UIManager.ActionAttribute GROUP
Allows actions to be clustered into arbitrary groups. Currently optional; defaults to "General".

See Also:
IdvUIManager.ATTR_GROUP

ACTION

public static final UIManager.ActionAttribute ACTION
Actual method call used to invoke a given IDV action. Required attribute.

See Also:
IdvUIManager.ATTR_ACTION
Field Detail

defaultValue

private final String defaultValue
A blank String if this is a required attribute, or a String value to use in case this attribute has not been specified by a given IDV action.


idvString

private final String idvString
String representation of this attribute as used by the IDV.

See Also:
asIdvString()

required

private final boolean required
Whether or not this attribute is required.

Method Detail

values

public static UIManager.ActionAttribute[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (UIManager.ActionAttribute c : UIManager.ActionAttribute.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static UIManager.ActionAttribute valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
NullPointerException - if the argument is null

asIdvString

public String asIdvString()
Returns:
The String representation of this attribute, as is used by the IDV.
See Also:
IdvUIManager.ATTR_ACTION, IdvUIManager.ATTR_DESCRIPTION, IdvUIManager.ATTR_GROUP, IdvUIManager.ATTR_ID, IdvUIManager.ATTR_IMAGE

defaultValue

public String defaultValue()
Returns:
"Default value" for this attribute. Blank Strings imply that the attribute is required (and thus lacks a true default value).

isRequired

public boolean isRequired()
Returns:
Whether or not this attribute is a required attribute for valid UIManager.IdvActions.