org.pushingpixels.flamingo.api.common
Class CommandButtonDisplayState

java.lang.Object
  extended by 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
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
protected CommandButtonDisplayState(String displayName, int preferredIconSize)
          Creates a new element state.
 
Method Summary
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 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.

toString

public String toString()
Overrides:
toString in class Object