WUI : API


org.westofj.wui
Class WSelectList

java.lang.Object
  extended byorg.westofj.wui.Widget
      extended byorg.westofj.wui.WList
          extended byorg.westofj.wui.WSelectList

public class WSelectList
extends WList

Presents the user a selection of values as a select box. A single value may be selected.

Version:
$Revision: 1.5 $, $Date: 2004/03/14 22:23:17 $
Author:
bill

Constructor Summary
WSelectList()
          Constructs an empty selection list.
WSelectList(List options)
          Constructs a selection list with the specified options.
WSelectList(Object[] options)
          Constructs a selection list with the specified options.
 
Method Summary
 Color getColor()
          Returns the color of the list.
 WFont getFont()
          Returns the font of the list.
 int getVisibleRowCount()
          Returns the height of the selection box in visible rows.
 int getWidth()
          Returns the width of the selection box in pixels.
protected  void handleParams(WRunner runner, String[] values)
           
 void render(WRunner runner, WRenderContext context, PrintWriter out)
          Renders the widget to the display.
 void setColor(Color color)
          Sets the color of the list.
 void setFont(WFont font)
          Sets the font of the list.
 void setVisibleRowCount(int visibleRowCount)
          Sets the height of the selection box in visible rows.
 void setWidth(int pixelWidth)
          Sets the width of the selection box in pixels.
 
Methods inherited from class org.westofj.wui.WList
clearSelection, getOptions, getSelectedIndex, getSelectedValue, isSelectedIndex, setOptions, setOptions, setSelectedIndex, setSelectedValue
 
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

WSelectList

public WSelectList()
Constructs an empty selection list.


WSelectList

public WSelectList(List options)
Constructs a selection list with the specified options.

Parameters:
options - the list of selectable options.

WSelectList

public WSelectList(Object[] options)
Constructs a selection list with the specified options.

Parameters:
options - the array of selectable options.
Method Detail

getColor

public Color getColor()
Returns the color of the list.

Returns:
Returns the color of the list.

getFont

public WFont getFont()
Returns the font of the list.

Returns:
Returns the font of the list.

getVisibleRowCount

public int getVisibleRowCount()
Returns the height of the selection box in visible rows.

Returns:
int the height of the selection box in visible rows.

getWidth

public int getWidth()
Returns the width of the selection box in pixels.

Returns:
int the width of the selection box in pixels.

handleParams

protected void handleParams(WRunner runner,
                            String[] values)
Overrides:
handleParams in class Widget

render

public void render(WRunner runner,
                   WRenderContext context,
                   PrintWriter out)
            throws WRenderException
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.
Throws:
WRenderException

setColor

public void setColor(Color color)
Sets the color of the list.

Parameters:
color - The color to set.

setFont

public void setFont(WFont font)
Sets the font of the list.

Parameters:
font - The font to set.

setVisibleRowCount

public void setVisibleRowCount(int visibleRowCount)
Sets the height of the selection box in visible rows.

Parameters:
visibleRowCount - the height of the selection box in visible rows.

setWidth

public void setWidth(int pixelWidth)
Sets the width of the selection box in pixels.

Parameters:
pixelWidth - the width of the selection box in pixels.

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