Enum Class SGToolbarButtonType
- All Implemented Interfaces:
Serializable,Comparable<SGToolbarButtonType>,Constable
Represents pre-defined types for toolbar buttons.
These can be used to easily re-define the buttons used in a toolbar, without
creating an entirely custom toolbar implementation.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe "current page" indicator button (doesn't necessarily have an action associated).The "next page" pagination button.The "previous page" pagination button.No pre-defined action or button. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Map<Integer, SGToolbarButtonType> The default mappings between slot number andSGToolbarButtonType. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SGToolbarButtonTypegetDefaultForSlot(int slot) Returns the default mapping between a given toolbar slot number (from 0 to 8), andSGToolbarButtonType.static SGToolbarButtonTypeReturns the enum constant of this class with the specified name.static SGToolbarButtonType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PREV_BUTTON
The "previous page" pagination button. -
CURRENT_BUTTON
The "current page" indicator button (doesn't necessarily have an action associated). -
NEXT_BUTTON
The "next page" pagination button. -
UNASSIGNED
No pre-defined action or button.
-
-
Field Details
-
DEFAULT_MAPPINGS
The default mappings between slot number andSGToolbarButtonType. This intended for use in setting (or falling back to) defaults for toolbar buttons, or for minor tweaks to existing buttons in a toolbar, as opposed to entirely new custom toolbars.
-
-
Constructor Details
-
SGToolbarButtonType
private SGToolbarButtonType()
-
-
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
-
getDefaultForSlot
Returns the default mapping between a given toolbar slot number (from 0 to 8), andSGToolbarButtonType. This intended for use in setting (or falling back to) defaults for toolbar buttons, or for minor tweaks to existing buttons in a toolbar, as opposed to entirely new custom toolbars.- Parameters:
slot- The slot number to get the default button type mapping for.- Returns:
- The default button type mapping for the specified slot.
Alternatively,
UNASSIGNEDif there isn't one.
-