WUI : API


org.westofj.wui
Class WResetButton

java.lang.Object
  extended byorg.westofj.wui.Widget
      extended byorg.westofj.wui.WResetButton

public class WResetButton
extends Widget

Implements an HTML reset button. This buttons actions are entirely client side.

Version:
$Revision: 1.3 $, $Date: 2004/03/14 21:27:46 $
Author:
bill

Constructor Summary
WResetButton()
          Constructs a reset button without a label.
WResetButton(String text)
          Constructs a reset button with the specified label.
WResetButton(WDisplayable text)
          Constructs a reset button with the specified label.
 
Method Summary
 WFont getFont()
          Returns the font.
 int getHeight()
          Returns the height.
 WDisplayable getText()
          Returns the label of the reset button.
 String getText(WRunner runner)
          Returns the label of the reset button as a string.
 int getWidth()
          Returns the wdith.
 boolean isEnabled()
          Returns true if the reset button is enabled, false otherwise.
 void render(WRunner runner, WRenderContext context, PrintWriter out)
          Renders the widget to the display.
 void setEnabled(boolean enabled)
          Enables or disables the reset button.
 void setFont(WFont font)
          Sets the font.
 void setHeight(int height)
          Sets the height.
 void setText(String text)
          Sets the label of the reset button to the specified value.
 void setText(WDisplayable text)
          Sets the label of the reset button to the specified value.
 void setWidth(int width)
          Sets the width.
 
Methods inherited from class org.westofj.wui.Widget
addChangeListener, getRunner, handleNoParams, handleParams, hasChangeListeners, removeChangeListener, stateChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WResetButton

public WResetButton()
Constructs a reset button without a label.


WResetButton

public WResetButton(String text)
Constructs a reset button with the specified label.

Parameters:
text - the label of the reset button.

WResetButton

public WResetButton(WDisplayable text)
Constructs a reset button with the specified label.

Parameters:
text - the label of the reset button.
Method Detail

getFont

public WFont getFont()
Returns the font.

Returns:
Returns the font.

getHeight

public int getHeight()
Returns the height.

Returns:
Returns the height.

getText

public WDisplayable getText()
Returns the label of the reset button.

Returns:
WDisplayable the label of the button.

getText

public final String getText(WRunner runner)
Returns the label of the reset button as a string.

Parameters:
runner - the current runner context.
Returns:
String the label of the reset button.

getWidth

public int getWidth()
Returns the wdith.

Returns:
Returns the width.

isEnabled

public boolean isEnabled()
Returns true if the reset button is enabled, false otherwise.

Returns:
boolean true if the reset button is enabled, false otherwise.

render

public void render(WRunner runner,
                   WRenderContext context,
                   PrintWriter out)
Description copied from class: Widget
Renders the widget to the display.

Specified by:
render in class Widget
Parameters:
runner - the current runner context.
out - the output for the display.

setEnabled

public void setEnabled(boolean enabled)
Enables or disables the reset button.

Parameters:
enabled - true if the reset button is enabled, false otherwise.

setFont

public void setFont(WFont font)
Sets the font.

Parameters:
font - The font to set.

setHeight

public void setHeight(int height)
Sets the height.

Parameters:
height - The height to set.

setText

public void setText(String text)
Sets the label of the reset button to the specified value.

Parameters:
text - the label of the reset button.

setText

public void setText(WDisplayable text)
Sets the label of the reset button to the specified value.

Parameters:
text - the label of the reset button.

setWidth

public void setWidth(int width)
Sets the width.

Parameters:
width - The width to set.

Copyright (c) 2003 West of J - All rights reserved.