WUI : API


org.westofj.wui
Class WTextField

java.lang.Object
  extended byorg.westofj.wui.Widget
      extended byorg.westofj.wui.WTextWidget
          extended byorg.westofj.wui.WTextField
Direct Known Subclasses:
WPasswordField

public class WTextField
extends WTextWidget

A text input widget.

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

Constructor Summary
WTextField()
          Constructs a text input widget.
WTextField(String text)
          Constructs a text input widget that initially contains the specified text.
WTextField(String text, int maxLength, int visibleSize)
          Constructs a text input widget that initially contains the specified text with the specified maximum length and visible size.
 
Method Summary
 int getMaxLength()
          Returns the maximum length in characters of text input to the widget.
 int getVisibleSize()
          Returns the visible horizontal size of the text input widget.
 void render(WRunner runner, WRenderContext context, PrintWriter out)
          Renders the widget to the display.
 void setMaxLength(int maxLength)
          Sets the maximum length in characters of text input to the widget.
 void setVisibleSize(int visibleSize)
          Sets the visible horizontal size of the text input widget.
 
Methods inherited from class org.westofj.wui.WTextWidget
getColor, getFont, getText, handleParams, setColor, setFont, setText
 
Methods inherited from class org.westofj.wui.Widget
addChangeListener, getRunner, handleNoParams, hasChangeListeners, removeChangeListener, stateChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WTextField

public WTextField()
Constructs a text input widget.


WTextField

public WTextField(String text)
Constructs a text input widget that initially contains the specified text.

Parameters:
text - the initial text of the widget.

WTextField

public WTextField(String text,
                  int maxLength,
                  int visibleSize)
Constructs a text input widget that initially contains the specified text with the specified maximum length and visible size.

Parameters:
text - the initial text of the widget.
maxLength - the maximum length in characters of text input to the widget.
visibleSize - the visible horizontal size of the text input widget.
Method Detail

getMaxLength

public int getMaxLength()
Returns the maximum length in characters of text input to the widget.

Returns:
int the maximum length in characters of text input to the widget.

getVisibleSize

public int getVisibleSize()
Returns the visible horizontal size of the text input widget.

Returns:
int the visible horizontal size of the text input widget.

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.

setMaxLength

public void setMaxLength(int maxLength)
Sets the maximum length in characters of text input to the widget.

Parameters:
maxLength - the maximum length in characters of text input to the widget.

setVisibleSize

public void setVisibleSize(int visibleSize)
Sets the visible horizontal size of the text input widget.

Parameters:
visibleSize - the visible horizontal size of the text input widget.

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