Class CommandButtonDisplayState
- java.lang.Object
-
- org.pushingpixels.flamingo.api.common.CommandButtonDisplayState
-
public abstract class CommandButtonDisplayState extends Object
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
Fields Modifier and Type Field Description static CommandButtonDisplayState
BIG
Big state.static CommandButtonDisplayState
FIT_TO_ICON
Fit to icon state.static CommandButtonDisplayState
MEDIUM
Medium state.static CommandButtonDisplayState
SMALL
Small state.static CommandButtonDisplayState
TILE
Tile state.
-
Constructor Summary
Constructors Modifier Constructor Description protected
CommandButtonDisplayState(String displayName, int preferredIconSize)
Creates a new element state.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract CommandButtonLayoutManager
createLayoutManager(AbstractCommandButton commandButton)
Creates a layout manager for the specified button.String
getDisplayName()
Returns the display name for this state.int
getPreferredIconSize()
Returns the preferred icon size for this state.String
toString()
-
-
-
Field Detail
-
FIT_TO_ICON
public static final CommandButtonDisplayState FIT_TO_ICON
Fit to icon state.
-
BIG
public static final CommandButtonDisplayState BIG
Big state.
-
TILE
public static final CommandButtonDisplayState TILE
Tile state.
-
MEDIUM
public static final CommandButtonDisplayState MEDIUM
Medium state.
-
SMALL
public static final CommandButtonDisplayState SMALL
Small state.
-
-
Constructor Detail
-
CommandButtonDisplayState
protected CommandButtonDisplayState(String displayName, int preferredIconSize)
Creates a new element state.- Parameters:
displayName
- Display name.preferredIconSize
- Preferred icon size.
-
-
Method Detail
-
getDisplayName
public String getDisplayName()
Returns the display name for this state.- Returns:
- The display name for this state.
- See Also:
CommandButtonDisplayState(String, int)
-
getPreferredIconSize
public int getPreferredIconSize()
Returns the preferred icon size for this state.- Returns:
- The preferred icon size for this state.
- See Also:
CommandButtonDisplayState(String, int)
-
createLayoutManager
public abstract CommandButtonLayoutManager createLayoutManager(AbstractCommandButton commandButton)
Creates a layout manager for the specified button.- Parameters:
commandButton
- Command button.- Returns:
- A layout manager for the specified button.
-
-