org.jvnet.flamingo.common
Class CommandButtonDisplayState

java.lang.Object
  extended by org.jvnet.flamingo.common.CommandButtonDisplayState

public abstract class CommandButtonDisplayState
extends java.lang.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.

Author:
Kirill Grouchnikov

Nested Class Summary
static class CommandButtonDisplayState.CommandButtonSeparatorOrientation
          Enumerates the available values for separator orientations.
 
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.
 
Method Summary
abstract  CommandButtonLayoutManager createLayoutManager(AbstractCommandButton commandButton)
          Creates a layout manager for the specified button.
 java.lang.String getDisplayName()
          Returns the display name for this state.
 int getPreferredIconSize()
          Returns the preferred icon size for this state.
abstract  CommandButtonDisplayState.CommandButtonSeparatorOrientation getSeparatorOrientation()
          Returns the separator orientation for this state.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, 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.

Method Detail

getDisplayName

public java.lang.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.

getSeparatorOrientation

public abstract CommandButtonDisplayState.CommandButtonSeparatorOrientation getSeparatorOrientation()
Returns the separator orientation for this state.

Returns:
The separator orientation for this state.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object