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

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

public static enum UIManager.ToolbarStyle
extends Enum<UIManager.ToolbarStyle>

A ToolbarStyle is a representation of the way icons associated with current toolbar actions should be displayed. This notion is so far limited to the sizing of icons, but that may change.


Enum Constant Summary
LARGE
          Represents the current toolbar actions as large icons.
MEDIUM
          Represents the current toolbar actions as medium icons.
SMALL
          Represents the current toolbar actions as small icons.
 
Field Summary
private  String action
          Signals that the user selected a specific icon size.
private  String label
          Label to use in the toolbar customization popup menu.
private  int size
          Icon dimensions.
private  String sizeAsString
          size in String form, merely for use with the IDV's preference functionality.
 
Method Summary
protected  JMenuItem buildMenuItem(UIManager manager)
          Convenience method for build the toolbar customization popup menu.
 String getAction()
          Returns the action command associated with this style.
 String getLabel()
          Returns the label to use as a brief description of this style.
 int getSize()
          Returns the dimensions of icons used in this style.
 String getSizeAsString()
          Returns size as a String to make cooperating with the IDV preferences code easier.
 String toString()
          Returns a brief description of this ToolbarStyle.
static UIManager.ToolbarStyle valueOf(String name)
          Returns the enum constant of this type with the specified name.
static UIManager.ToolbarStyle[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LARGE

public static final UIManager.ToolbarStyle LARGE
Represents the current toolbar actions as large icons. Currently, "large" is defined as 32 x 32 pixels.


MEDIUM

public static final UIManager.ToolbarStyle MEDIUM
Represents the current toolbar actions as medium icons. Currently, "medium" is defined as 22 x 22 pixels.


SMALL

public static final UIManager.ToolbarStyle SMALL
Represents the current toolbar actions as small icons. Currently, "small" is defined as 16 x 16 pixels.

Field Detail

label

private final String label
Label to use in the toolbar customization popup menu.


action

private final String action
Signals that the user selected a specific icon size.


size

private final int size
Icon dimensions. Each icon should be size * size.


sizeAsString

private final String sizeAsString
size in String form, merely for use with the IDV's preference functionality.

Method Detail

values

public static UIManager.ToolbarStyle[] 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.ToolbarStyle c : UIManager.ToolbarStyle.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.ToolbarStyle 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

getLabel

public String getLabel()
Returns the label to use as a brief description of this style.


getAction

public String getAction()
Returns the action command associated with this style.


getSize

public int getSize()
Returns the dimensions of icons used in this style.


getSizeAsString

public String getSizeAsString()
Returns size as a String to make cooperating with the IDV preferences code easier.


toString

public String toString()
Returns a brief description of this ToolbarStyle. A typical example:
[ToolbarStyle@1337: label="Large Icons", size=32]

Note that the format and details provided are subject to change.

Overrides:
toString in class Enum<UIManager.ToolbarStyle>

buildMenuItem

protected JMenuItem buildMenuItem(UIManager manager)
Convenience method for build the toolbar customization popup menu.

Parameters:
manager - UIManager that will be listening for action commands.
Returns:
Menu item that has manager listening for action.