public static enum UIManager.ToolbarStyle extends java.lang.Enum<UIManager.ToolbarStyle>
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 and Description |
---|
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.
|
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
action
Signals that the user selected a specific icon size.
|
private java.lang.String |
label
Label to use in the toolbar customization popup menu.
|
private int |
size
Icon dimensions.
|
private java.lang.String |
sizeAsString
size in String form, merely for use with the IDV's
preference functionality. |
Modifier and Type | Method and Description |
---|---|
protected javax.swing.JMenuItem |
buildMenuItem(UIManager manager)
Convenience method for build the toolbar customization popup menu.
|
java.lang.String |
getAction()
Returns the action command associated with this style.
|
java.lang.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.
|
java.lang.String |
getSizeAsString()
Returns
size as a String to make cooperating with
the IDV preferences code easier. |
java.lang.String |
toString()
Returns a brief description of this
ToolbarStyle . |
static UIManager.ToolbarStyle |
valueOf(java.lang.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.
|
public static final UIManager.ToolbarStyle LARGE
32 x 32
pixels.public static final UIManager.ToolbarStyle MEDIUM
22 x 22
pixels.public static final UIManager.ToolbarStyle SMALL
16 x 16
pixels.private final java.lang.String label
private final java.lang.String action
private final int size
size * size
.private final java.lang.String sizeAsString
size
in String
form, merely for use with the IDV's
preference functionality.public static UIManager.ToolbarStyle[] values()
for (UIManager.ToolbarStyle c : UIManager.ToolbarStyle.values()) System.out.println(c);
public static UIManager.ToolbarStyle valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String getLabel()
public java.lang.String getAction()
public int getSize()
public java.lang.String getSizeAsString()
size
as a String
to make cooperating with
the IDV preferences code easier.public java.lang.String toString()
ToolbarStyle
.
A typical example:
[ToolbarStyle@1337: label="Large Icons", size=32]
Note that the format and details provided are subject to change.
toString
in class java.lang.Enum<UIManager.ToolbarStyle>
ToolbarStyle
instance.protected javax.swing.JMenuItem buildMenuItem(UIManager manager)