echopoint
Class PushButton

java.lang.Object
  extended by nextapp.echo.AbstractComponent
      extended by nextapp.echo.AbstractButton
          extended by nextapp.echo.Button
              extended by echopoint.PushButton
All Implemented Interfaces:
Borderable, MouseCursorable, ToolTipPopUpSupport, ReflectionSetter, ValidationSubmitter, java.io.Serializable, Component, ToolTipSupport
Direct Known Subclasses:
ConfirmButton, ExitButton, JavaScriptButton, SubmitButton

public class PushButton
extends Button
implements ToolTipPopUpSupport, Borderable, MouseCursorable, ValidationSubmitter, ReflectionSetter

The PushButton class is another implementation of the basic echo Button class.
This class use a more functional control on the client (if available) to represent button behavior.
If these controls are not available on the client, then the behavior of the base Button class is used.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface echopoint.positionable.Borderable
Borderable.NestedStyleInfo
 
Nested classes/interfaces inherited from interface echopoint.positionable.MouseCursorable
MouseCursorable.NestedStyleInfo
 
Field Summary
static java.lang.String HEIGHT_CHANGED_PROPERTY
           
static java.lang.String RENDERING_CHANGED_PROPERTY
           
static java.lang.String STYLE_BUTTON_HEIGHT
          A style constant for the Button height property.
static java.lang.String STYLE_BUTTON_WIDTH
          A style constant for the Button width property.
static java.lang.String WIDTH_CHANGED_PROPERTY
           
 
Fields inherited from class nextapp.echo.AbstractButton
ACTION_COMMAND_CHANGED_PROPERTY, CSS_CLASS_CHANGED_PROPERTY, DISABLED_CSS_CLASS_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, ICON_TEXT_MARGIN_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, NOTABSTOP_CHANGED_PROPERTY, ROLLOVER_BACKGROUND_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_FONT_CHANGED_PROPERTY, ROLLOVER_FOREGROUND_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, STYLE_HORIZONTAL_ALIGNMENT, STYLE_HORIZONTAL_TEXT_POSITION, STYLE_ICON_TEXT_MARGIN, STYLE_ROLLOVER_BACKGROUND, STYLE_ROLLOVER_ENABLED, STYLE_ROLLOVER_FONT, STYLE_ROLLOVER_FOREGROUND, STYLE_VERTICAL_ALIGNMENT, STYLE_VERTICAL_TEXT_POSITION, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
 
Fields inherited from interface nextapp.echo.ToolTipSupport
TOOL_TIP_TEXT_CHANGED_PROPERTY
 
Fields inherited from interface echopoint.positionable.Borderable
BORDER_DASHED, BORDER_DOTTED, BORDER_DOUBLE, BORDER_GROOVE, BORDER_INSET, BORDER_NONE, BORDER_OUTSET, BORDER_RIDGE, BORDER_SOLID, borderStyleSymbolics, STYLE_BORDER_COLOR, STYLE_BORDER_SIZE, STYLE_BORDER_STYLE, STYLE_BOTTOM_BORDER_COLOR, STYLE_BOTTOM_BORDER_SIZE, STYLE_BOTTOM_BORDER_STYLE, STYLE_LEFT_BORDER_COLOR, STYLE_LEFT_BORDER_SIZE, STYLE_LEFT_BORDER_STYLE, STYLE_RIGHT_BORDER_COLOR, STYLE_RIGHT_BORDER_SIZE, STYLE_RIGHT_BORDER_STYLE, STYLE_TOP_BORDER_COLOR, STYLE_TOP_BORDER_SIZE, STYLE_TOP_BORDER_STYLE
 
Fields inherited from interface echopoint.positionable.MouseCursorable
borderStyleSymbolics, CURSOR_AUTO, CURSOR_CROSSHAIR, CURSOR_CUSTOM_URI, CURSOR_DEFAULT, CURSOR_E_RESIZE, CURSOR_HELP, CURSOR_MOVE, CURSOR_N_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE, CURSOR_POINTER, CURSOR_S_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE, CURSOR_TEXT, CURSOR_W_RESIZE, CURSOR_WAIT, STYLE_MOUSE_CURSOR, STYLE_MOUSE_CURSOR_URI
 
Fields inherited from interface echopoint.validation.ValidationSubmitter
RULESETS_RUN_ALL, RULESETS_RUN_DEFAULT
 
Fields inherited from interface nextapp.echo.Component
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, SELECTABLE_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
PushButton()
          Creates a PushButton with no text or icon.
PushButton(ImageReference icon)
          Creates a PushButton with an icon.
PushButton(java.lang.String text)
          Creates a PushButton with text.
PushButton(java.lang.String text, ImageReference icon)
          Creates a PushButton with text and an icon.
 
Method Summary
 void applyStyle(Style style)
          Sets stylistic properties of this component based on a Style object.
 Color getBorderColor()
           
 int getBorderSize()
           
 int getBorderStyle()
          Returns the border style of the Borderable.
 Color getBottomBorderColor()
           
 int getBottomBorderSize()
           
 int getBottomBorderStyle()
           
 int getHeight()
           
 Color getLeftBorderColor()
           
 int getLeftBorderSize()
           
 int getLeftBorderStyle()
           
 int getMouseCursor()
          Returns the current mouse cursor in use.
 java.lang.String getMouseCursorURI()
           
 Color getRightBorderColor()
           
 int getRightBorderSize()
           
 int getRightBorderStyle()
           
 int getRunOptions()
          Returns the server submit validation run options.
 ToolTipPopUp getToolTipPopUp()
          Returns the ToolTipPopUp component used to configure the rich tool tip support.
 java.lang.String getToolTipText()
          Returns the default tool tip text.
 Color getTopBorderColor()
           
 int getTopBorderSize()
           
 int getTopBorderStyle()
           
 int getWidth()
           
 boolean isAsync()
           
 boolean isComplexRendering()
          Controls whether the PushButton will be rendered for more complex client browsers or whether it will gracefully fall back to standard Button rendering behaviour.
 boolean isValidationEnabled()
          Retruns whether server submit validation will occur.
 java.lang.Object set(java.lang.reflect.Field field, java.lang.Object newValue)
          Called to save the old value of a field, set in a new value and return the old value of a field.
 void setAsync(boolean async)
           
 void setBorderColor(Color newBorderColor)
          Sets the Color of the Borderable's border.
 void setBorderSize(int newBorderSize)
          Sets the size of the Borderables's border.
 void setBorderStyle(int borderStyle)
          Sets the border style of the Borderable.
 void setBottomBorderColor(Color borderColor)
          Sets the Color of the Borderable's bottom border.
 void setBottomBorderSize(int borderSize)
          Sets the size of the Borderables's bottom border.
 void setBottomBorderStyle(int borderStyle)
          Sets the border style of the Borderables's bottom border.
 void setComplexRendering(boolean newRendering)
          Controls whether the PushButton will be rendered for more complex client browsers or whether it will gracefully fall back to standard Button rendering behaviour.
 void setHeight(int height)
           
 void setLeftBorderColor(Color borderColor)
          Sets the Color of the Borderable's left border.
 void setLeftBorderSize(int borderSize)
          Sets the size of the Borderables's left border.
 void setLeftBorderStyle(int borderStyle)
          Sets the border style of the Borderables's left border.
 void setMouseCursor(int mouseCursor)
          Sets the mouse cursor to use.
 void setMouseCursorURI(java.lang.String mouseCursorURI)
          Sets the URI to a custom platform mouse cursor.
 void setRightBorderColor(Color borderColor)
          Sets the Color of the Borderable's right border.
 void setRightBorderSize(int borderSize)
          Sets the size of the Borderables's right border.
 void setRightBorderStyle(int borderStyle)
          Sets the border style of the Borderables's right border.
 void setRunOptions(int runOptions)
          Sets the server submit validation run options.
 void setToolTipText(java.lang.String newValue)
          Sets the default tool tip text.
 void setTopBorderColor(Color borderColor)
          Sets the Color of the Borderable's top border.
 void setTopBorderSize(int borderSize)
          Sets the size of the Borderables's top border.
 void setTopBorderStyle(int borderStyle)
          Sets the border style of the Borderables's top border.
 void setValidationEnabled(boolean validationEnabled)
          Controls whether server submit validation will occur.
 void setWidth(int width)
           
 void validate()
          Validates this component.
 
Methods inherited from class nextapp.echo.AbstractButton
addActionListener, addChangeListener, addItemListener, doAction, fireActionPerformed, fireItemStateChanged, fireStateChanged, getActionCommand, getCssClass, getCssClassDisabled, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextMargin, getModel, getRolloverBackground, getRolloverFont, getRolloverForeground, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getText, getVerticalAlignment, getVerticalTextPosition, hasActionListeners, isNoTabStop, isRolloverEnabled, isSelected, removeActionListener, removeChangeListener, removeItemListener, setActionCommand, setCssClass, setCssClassDisabled, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextMargin, setModel, setNoTabStop, setRolloverBackground, setRolloverEnabled, setRolloverFont, setRolloverForeground, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setVerticalAlignment, setVerticalTextPosition
 
Methods inherited from class nextapp.echo.AbstractComponent
add, add, addHierarchyListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getClientId, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getListenerList, getLocale, getParent, indexOf, init, isAncestorOf, isDifferent, isEnabled, isFocused, isRecursivelyVisible, isRegistered, isSelectableForScriptRecorder, isShowing, isVisible, processHierarchyEvent, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setClientId, setEnabled, setFocused, setFont, setForeground, setIdentifier, setLocale, setParent, setRegistered, setSelectableForScriptRecorder, setVisible, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STYLE_BUTTON_WIDTH

public static final java.lang.String STYLE_BUTTON_WIDTH
A style constant for the Button width property. Values of this key must be of type java.lang.Integer.

See Also:
Constant Field Values

STYLE_BUTTON_HEIGHT

public static final java.lang.String STYLE_BUTTON_HEIGHT
A style constant for the Button height property. Values of this key must be of type java.lang.Integer.

See Also:
Constant Field Values

WIDTH_CHANGED_PROPERTY

public static final java.lang.String WIDTH_CHANGED_PROPERTY
See Also:
Constant Field Values

HEIGHT_CHANGED_PROPERTY

public static final java.lang.String HEIGHT_CHANGED_PROPERTY
See Also:
Constant Field Values

RENDERING_CHANGED_PROPERTY

public static final java.lang.String RENDERING_CHANGED_PROPERTY
See Also:
Constant Field Values
Constructor Detail

PushButton

public PushButton()
Creates a PushButton with no text or icon.


PushButton

public PushButton(java.lang.String text)
Creates a PushButton with text.

Parameters:
text - A text label to display in the button.

PushButton

public PushButton(java.lang.String text,
                  ImageReference icon)
Creates a PushButton with text and an icon.

Parameters:
text - A text label to display in the button.
icon - An icon to display in the button.

PushButton

public PushButton(ImageReference icon)
Creates a PushButton with an icon.

Parameters:
icon - An icon to display in the button.
Method Detail

getHeight

public int getHeight()

setHeight

public void setHeight(int height)

getWidth

public int getWidth()

setWidth

public void setWidth(int width)

isComplexRendering

public boolean isComplexRendering()
Controls whether the PushButton will be rendered for more complex client browsers or whether it will gracefully fall back to standard Button rendering behaviour.

Returns:
true or false

setComplexRendering

public void setComplexRendering(boolean newRendering)
Controls whether the PushButton will be rendered for more complex client browsers or whether it will gracefully fall back to standard Button rendering behaviour.


getBorderColor

public Color getBorderColor()
Specified by:
getBorderColor in interface Borderable
Returns:
The Color of the Borderable's border.
See Also:
Borderable.getBorderColor()

getBorderSize

public int getBorderSize()
Specified by:
getBorderSize in interface Borderable
Returns:
The size of the Borderables's border.
See Also:
Borderable.getBorderSize()

getBorderStyle

public int getBorderStyle()
Description copied from interface: Borderable
Returns the border style of the Borderable. This will be one of the following values :

Specified by:
getBorderStyle in interface Borderable
Returns:
int the current border style
See Also:
Borderable.getBorderStyle()

setBorderColor

public void setBorderColor(Color newBorderColor)
Description copied from interface: Borderable
Sets the Color of the Borderable's border. This will also set the left, top, right and bottom border color.

Specified by:
setBorderColor in interface Borderable
See Also:
Borderable.setBorderColor(nextapp.echo.Color)

setBorderSize

public void setBorderSize(int newBorderSize)
Description copied from interface: Borderable
Sets the size of the Borderables's border. This will also set the left, top, right and bottom border size.

Specified by:
setBorderSize in interface Borderable
See Also:
Borderable.setBorderSize(int)

setBorderStyle

public void setBorderStyle(int borderStyle)
Description copied from interface: Borderable
Sets the border style of the Borderable. This must be one of the following values : This will also set the left, top, right and bottom border style.

Specified by:
setBorderStyle in interface Borderable
See Also:
Borderable.setBorderStyle(int)

getLeftBorderColor

public Color getLeftBorderColor()
Specified by:
getLeftBorderColor in interface Borderable
Returns:
The Color of the Borderable's left border.
See Also:
Borderable.getLeftBorderColor()

getLeftBorderSize

public int getLeftBorderSize()
Specified by:
getLeftBorderSize in interface Borderable
Returns:
The size of the Borderables's left border.
See Also:
Borderable.getLeftBorderSize()

getLeftBorderStyle

public int getLeftBorderStyle()
Specified by:
getLeftBorderStyle in interface Borderable
Returns:
The style of the Borderables's left border.
See Also:
Borderable.getLeftBorderStyle()

setLeftBorderColor

public void setLeftBorderColor(Color borderColor)
Description copied from interface: Borderable
Sets the Color of the Borderable's left border.

Specified by:
setLeftBorderColor in interface Borderable
See Also:
Borderable.setLeftBorderColor(nextapp.echo.Color)

setLeftBorderSize

public void setLeftBorderSize(int borderSize)
Description copied from interface: Borderable
Sets the size of the Borderables's left border.

Specified by:
setLeftBorderSize in interface Borderable
See Also:
Borderable.setLeftBorderSize(int)

setLeftBorderStyle

public void setLeftBorderStyle(int borderStyle)
Description copied from interface: Borderable
Sets the border style of the Borderables's left border.

Specified by:
setLeftBorderStyle in interface Borderable
See Also:
Borderable.setLeftBorderStyle(int)

getTopBorderColor

public Color getTopBorderColor()
Specified by:
getTopBorderColor in interface Borderable
Returns:
The Color of the Borderable's top border.
See Also:
Borderable.getTopBorderColor()

getTopBorderSize

public int getTopBorderSize()
Specified by:
getTopBorderSize in interface Borderable
Returns:
The size of the Borderables's top border.
See Also:
Borderable.getTopBorderSize()

getTopBorderStyle

public int getTopBorderStyle()
Specified by:
getTopBorderStyle in interface Borderable
Returns:
The style of the Borderables's top border.
See Also:
Borderable.getTopBorderStyle()

setTopBorderColor

public void setTopBorderColor(Color borderColor)
Description copied from interface: Borderable
Sets the Color of the Borderable's top border.

Specified by:
setTopBorderColor in interface Borderable
See Also:
Borderable.setTopBorderColor(nextapp.echo.Color)

setTopBorderSize

public void setTopBorderSize(int borderSize)
Description copied from interface: Borderable
Sets the size of the Borderables's top border.

Specified by:
setTopBorderSize in interface Borderable
See Also:
Borderable.setTopBorderSize(int)

setTopBorderStyle

public void setTopBorderStyle(int borderStyle)
Description copied from interface: Borderable
Sets the border style of the Borderables's top border.

Specified by:
setTopBorderStyle in interface Borderable
See Also:
Borderable.setTopBorderStyle(int)

getRightBorderColor

public Color getRightBorderColor()
Specified by:
getRightBorderColor in interface Borderable
Returns:
The Color of the Borderable's right border.
See Also:
Borderable.getRightBorderColor()

getRightBorderSize

public int getRightBorderSize()
Specified by:
getRightBorderSize in interface Borderable
Returns:
The size of the Borderables's right border.
See Also:
Borderable.getRightBorderSize()

getRightBorderStyle

public int getRightBorderStyle()
Specified by:
getRightBorderStyle in interface Borderable
Returns:
The style of the Borderables's right border.
See Also:
Borderable.getRightBorderStyle()

setRightBorderColor

public void setRightBorderColor(Color borderColor)
Description copied from interface: Borderable
Sets the Color of the Borderable's right border.

Specified by:
setRightBorderColor in interface Borderable
See Also:
Borderable.setRightBorderColor(nextapp.echo.Color)

setRightBorderSize

public void setRightBorderSize(int borderSize)
Description copied from interface: Borderable
Sets the size of the Borderables's right border.

Specified by:
setRightBorderSize in interface Borderable
See Also:
Borderable.setRightBorderSize(int)

setRightBorderStyle

public void setRightBorderStyle(int borderStyle)
Description copied from interface: Borderable
Sets the border style of the Borderables's right border.

Specified by:
setRightBorderStyle in interface Borderable
See Also:
Borderable.setRightBorderStyle(int)

getBottomBorderColor

public Color getBottomBorderColor()
Specified by:
getBottomBorderColor in interface Borderable
Returns:
The Color of the Borderable's bottom border.
See Also:
Borderable.getBottomBorderColor()

getBottomBorderSize

public int getBottomBorderSize()
Specified by:
getBottomBorderSize in interface Borderable
Returns:
The size of the Borderables's bottom border.
See Also:
Borderable.getBottomBorderSize()

getBottomBorderStyle

public int getBottomBorderStyle()
Specified by:
getBottomBorderStyle in interface Borderable
Returns:
The style of the Borderables's bottom border.
See Also:
Borderable.getBottomBorderStyle()

setBottomBorderColor

public void setBottomBorderColor(Color borderColor)
Description copied from interface: Borderable
Sets the Color of the Borderable's bottom border.

Specified by:
setBottomBorderColor in interface Borderable
See Also:
Borderable.setBottomBorderColor(nextapp.echo.Color)

setBottomBorderSize

public void setBottomBorderSize(int borderSize)
Description copied from interface: Borderable
Sets the size of the Borderables's bottom border.

Specified by:
setBottomBorderSize in interface Borderable
See Also:
Borderable.setBottomBorderSize(int)

setBottomBorderStyle

public void setBottomBorderStyle(int borderStyle)
Description copied from interface: Borderable
Sets the border style of the Borderables's bottom border.

Specified by:
setBottomBorderStyle in interface Borderable
See Also:
Borderable.setBottomBorderStyle(int)

getToolTipPopUp

public ToolTipPopUp getToolTipPopUp()
Description copied from interface: ToolTipPopUpSupport
Returns the ToolTipPopUp component used to configure the rich tool tip support.

Specified by:
getToolTipPopUp in interface ToolTipPopUpSupport
Returns:
a ToolTipPopUp component
See Also:
ToolTipPopUpSupport.getToolTipPopUp()

getToolTipText

public java.lang.String getToolTipText()
Description copied from interface: ToolTipSupport
Returns the default tool tip text.

Specified by:
getToolTipText in interface ToolTipSupport
Overrides:
getToolTipText in class AbstractButton
Returns:
The tool tip text.
See Also:
ToolTipSupport.getToolTipText()

setToolTipText

public void setToolTipText(java.lang.String newValue)
Description copied from interface: ToolTipSupport
Sets the default tool tip text.

Specified by:
setToolTipText in interface ToolTipSupport
Overrides:
setToolTipText in class AbstractButton
Parameters:
newValue - The new tool tip text.
See Also:
ToolTipSupport.setToolTipText(java.lang.String)

isValidationEnabled

public boolean isValidationEnabled()
Retruns whether server submit validation will occur.

Specified by:
isValidationEnabled in interface ValidationSubmitter
Returns:
whether server submit validation will occur.
See Also:
ValidationSubmitter.isValidationEnabled()

setValidationEnabled

public void setValidationEnabled(boolean validationEnabled)
Controls whether server submit validation will occur.

Parameters:
validationEnabled - - true if validation should occur

getRunOptions

public int getRunOptions()
Returns the server submit validation run options.

Specified by:
getRunOptions in interface ValidationSubmitter
Returns:
the run options in place
See Also:
ValidationSubmitter.getRunOptions()

setRunOptions

public void setRunOptions(int runOptions)
Sets the server submit validation run options.

Parameters:
runOptions - - the server submit validation run options.
See Also:
ValidationSubmitter.getRunOptions()

getMouseCursor

public int getMouseCursor()
Description copied from interface: MouseCursorable
Returns the current mouse cursor in use. This will be one of the following values.

Specified by:
getMouseCursor in interface MouseCursorable
Returns:
The current mouse cursor in use.
See Also:
MouseCursorable.getMouseCursor()

getMouseCursorURI

public java.lang.String getMouseCursorURI()
Specified by:
getMouseCursorURI in interface MouseCursorable
Returns:
The custom URI for the mouse cursor or null
See Also:
MouseCursorable.getMouseCursorURI()

setMouseCursor

public void setMouseCursor(int mouseCursor)
Description copied from interface: MouseCursorable
Sets the mouse cursor to use. This will be one of the following values.

Specified by:
setMouseCursor in interface MouseCursorable
Parameters:
mouseCursor - - the mouse cursor to use
See Also:
MouseCursorable.setMouseCursor(int)

setMouseCursorURI

public void setMouseCursorURI(java.lang.String mouseCursorURI)
Description copied from interface: MouseCursorable
Sets the URI to a custom platform mouse cursor. This will only be used if the mosue cusor is set to CURSOR_CUSTOM.

Specified by:
setMouseCursorURI in interface MouseCursorable
Parameters:
mouseCursorURI - the URI to a custom platform mouse cursor.
See Also:
MouseCursorable.setMouseCursorURI(java.lang.String)

validate

public void validate()
Description copied from interface: Component
Validates this component. This method will be called by the application container before the component is rendered. This method should be overridden if the component needs to be updated before being rendered. Validation occurs from the top of the component hierarchy down. Overriding methods should take care to first call super.validate() to ensure the superclass is validated as well.

If components above this one in the hierarchy are modified by an overriding implementation of this method, those components WILL NOT be automatically revalidated. Thus, performing such operations in validate() is not inadvisable.

Specified by:
validate in interface Component
Overrides:
validate in class AbstractComponent
See Also:
Component.validate()

applyStyle

public void applyStyle(Style style)
Description copied from interface: Component
Sets stylistic properties of this component based on a Style object. The version of this method in Component will set foreground and background colors and the font from the style if they are present. Components should override this method if they allow more properties to be set from a style object, and should call super.applyStyle() if necessary.

Specified by:
applyStyle in interface Borderable
Specified by:
applyStyle in interface MouseCursorable
Specified by:
applyStyle in interface Component
Overrides:
applyStyle in class AbstractButton
Parameters:
style - The style object from which to retrieve properties for this Component.
See Also:
Borderable.applyStyle(nextapp.echo.Style)

set

public java.lang.Object set(java.lang.reflect.Field field,
                            java.lang.Object newValue)
                     throws java.lang.Exception
Description copied from interface: ReflectionSetter
Called to save the old value of a field, set in a new value and return the old value of a field. This interface allows a field set operation to be "delegated" back into the class that has permission to perform the field set.

 public Object set(Field f, Object newValue) throws Exception {
      Object oldValue = f.get(this);
      f.set(this,newValue);
      return oldValue;
 }
 

Specified by:
set in interface ReflectionSetter
Parameters:
field - - the field to be set
newValue - - the new value to be set
Returns:
the oldValue of the field
Throws:
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.NullPointerException
java.lang.Exception
See Also:
ReflectionSetter.set(Field, Object)

isAsync

public boolean isAsync()
Overrides:
isAsync in class AbstractButton

setAsync

public void setAsync(boolean async)
Overrides:
setAsync in class AbstractButton