Package edu.wisc.ssec.mcidasv.ui
Enum Class UIManager.ToolbarStyle
- All Implemented Interfaces:
Serializable
,Comparable<UIManager.ToolbarStyle>
,Constable
- Enclosing class:
UIManager
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.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ToolbarStyle
(String label, String action, int size) Initializes a toolbar style. -
Method Summary
Modifier and TypeMethodDescriptionprotected JMenuItem
buildMenuItem
(UIManager manager) Convenience method for build the toolbar customization popup menu.Returns the action command associated with this style.getLabel()
Returns the label to use as a brief description of this style.int
getSize()
Returns the dimensions of icons used in this style.toString()
Returns a brief description of thisToolbarStyle
.static UIManager.ToolbarStyle
Returns the enum constant of this class with the specified name.static UIManager.ToolbarStyle[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LARGE
Represents the current toolbar actions as large icons. Currently, "large" is defined as32 x 32
pixels. -
MEDIUM
Represents the current toolbar actions as medium icons. Currently, "medium" is defined as22 x 22
pixels. -
SMALL
Represents the current toolbar actions as small icons. Currently, "small" is defined as16 x 16
pixels.
-
-
Field Details
-
label
Label to use in the toolbar customization popup menu. -
action
Signals that the user selected a specific icon size. -
size
Icon dimensions. Each icon should besize * size
. -
sizeAsString
-
-
Constructor Details
-
ToolbarStyle
Initializes a toolbar style.- Parameters:
label
- Label used in the toolbar popup menu.action
- Command that signals the user selected this toolbar style.size
- Dimensions of the icons.- Throws:
NullPointerException
- iflabel
oraction
are null.IllegalArgumentException
- ifsize
is not positive.
-
-
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
-
getLabel
Returns the label to use as a brief description of this style.- Returns:
- Description of style (suitable for a label).
-
getAction
Returns the action command associated with this style.- Returns:
- This style's "action command".
-
getSize
Returns the dimensions of icons used in this style.- Returns:
- Dimensions of this style's icons.
-
getSizeAsString
- Returns:
- String representation of this style's icon dimensions.
-
toString
Returns a brief description of thisToolbarStyle
.A typical example:
[ToolbarStyle@1337: label="Large Icons", size=32]
Note that the format and details provided are subject to change.
- Overrides:
toString
in classEnum<UIManager.ToolbarStyle>
- Returns:
- String representation of this
ToolbarStyle
instance.
-
buildMenuItem
Convenience method for build the toolbar customization popup menu.
-