Class CommandButtonDisplayState
java.lang.Object
org.pushingpixels.flamingo.api.common.CommandButtonDisplayState
Display state for command buttons. This class provides a number of core
display states, and it is possible to create additional custom states by
using the protected constructor and implementing the relevant abstract
methods.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CommandButtonDisplayState
Big state.static final CommandButtonDisplayState
Fit to icon state.static final CommandButtonDisplayState
Medium state.static final CommandButtonDisplayState
Small state.static final CommandButtonDisplayState
Tile state. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CommandButtonDisplayState
(String displayName, int preferredIconSize) Creates a new element state. -
Method Summary
Modifier and TypeMethodDescriptionabstract CommandButtonLayoutManager
createLayoutManager
(AbstractCommandButton commandButton) Creates a layout manager for the specified button.Returns the display name for this state.int
Returns the preferred icon size for this state.toString()
-
Field Details
-
FIT_TO_ICON
Fit to icon state. -
BIG
Big state. -
TILE
Tile state. -
MEDIUM
Medium state. -
SMALL
Small state.
-
-
Constructor Details
-
CommandButtonDisplayState
Creates a new element state.- Parameters:
displayName
- Display name.preferredIconSize
- Preferred icon size.
-
-
Method Details
-
getDisplayName
Returns the display name for this state.- Returns:
- The display name for this state.
- See Also:
-
getPreferredIconSize
public int getPreferredIconSize()Returns the preferred icon size for this state.- Returns:
- The preferred icon size for this state.
- See Also:
-
createLayoutManager
Creates a layout manager for the specified button.- Parameters:
commandButton
- Command button.- Returns:
- A layout manager for the specified button.
-
toString
-