WUI : API


org.westofj.wui
Class WLabel

java.lang.Object
  extended byorg.westofj.wui.Widget
      extended byorg.westofj.wui.WLabelWidget
          extended byorg.westofj.wui.WLabel
All Implemented Interfaces:
WDisplayable

public class WLabel
extends WLabelWidget

Renders text to the display.

Version:
$Revision: 1.5 $, $Date: 2004/05/03 02:02:49 $
Author:
bill

Constructor Summary
WLabel()
          Constructs a label.
WLabel(String text)
          Constructs a label with the specified text.
WLabel(String text, WFont font)
          Constructs a label with the specified text and font.
WLabel(String text, WFont font, Color color)
          Constructs a label with the specified text, font and color.
WLabel(WDisplayable text)
          Constructs a label with the specified text.
WLabel(WDisplayable text, WFont font)
          Constructs a label with the specified text and font.
WLabel(WDisplayable text, WFont font, Color color)
          Constructs a label with the specified text, font and color.
 
Method Summary
 WDisplayable getText()
          Returns the text of the label.
 String getText(WRunner runner)
          Returns the textual view of the instance.
 void setText(String text)
          Sets the text of the label.
 void setText(WDisplayable text)
          Sets the text of the label.
 
Methods inherited from class org.westofj.wui.WLabelWidget
getColor, getFont, render, setColor, setFont
 
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

WLabel

public WLabel()
Constructs a label.


WLabel

public WLabel(String text)
Constructs a label with the specified text.

Parameters:
text - the text of the label.

WLabel

public WLabel(String text,
              WFont font)
Constructs a label with the specified text and font.

Parameters:
text - the text of the label.

WLabel

public WLabel(String text,
              WFont font,
              Color color)
Constructs a label with the specified text, font and color.

Parameters:
text - the text of the label.

WLabel

public WLabel(WDisplayable text)
Constructs a label with the specified text.

Parameters:
text - the text of the label.

WLabel

public WLabel(WDisplayable text,
              WFont font)
Constructs a label with the specified text and font.

Parameters:
text - the text of the label.

WLabel

public WLabel(WDisplayable text,
              WFont font,
              Color color)
Constructs a label with the specified text, font and color.

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

getText

public WDisplayable getText()
Returns the text of the label.

Returns:
WDisplayable the text of the label.

getText

public String getText(WRunner runner)
Description copied from interface: WDisplayable
Returns the textual view of the instance.

Parameters:
runner - the current runner context.
Returns:
String the textual view of the instance.

setText

public void setText(String text)
Sets the text of the label.

Parameters:
text - the text of the label.

setText

public void setText(WDisplayable text)
Sets the text of the label.

Parameters:
text - the text of the label.

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