Package org.pushingpixels.flamingo.api.common

# 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 final CommandButtonDisplayState`
`BIG`
Big state.
`static final CommandButtonDisplayState`
`FIT_TO_ICON`
Fit to icon state.
`static final CommandButtonDisplayState`
`MEDIUM`
Medium state.
`static final CommandButtonDisplayState`
`SMALL`
Small state.
`static final CommandButtonDisplayState`
`TILE`
Tile state.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`CommandButtonDisplayState(String displayName, int preferredIconSize)`
Creates a new element state.

## Method Summary

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()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### 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 Details

### CommandButtonDisplayState

protected CommandButtonDisplayState(String displayName, int preferredIconSize)
Creates a new element state.

Parameters:
  `displayName` - Display name.
  `preferredIconSize` - Preferred icon size.

## Method Details

### 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.

### toString

public String toString()

Overrides:
  `toString` in class `Object`