WUI : API


org.westofj.wui
Class WParamText

java.lang.Object
  extended byorg.westofj.wui.WLocalizedText
      extended byorg.westofj.wui.WParamText
All Implemented Interfaces:
WDisplayable

public class WParamText
extends WLocalizedText

Represents a parameterized localized resource. Maps a bundle name and a key to a resource in a resource bundle.

Version:
$Revision: 1.2 $, $Date: 2004/03/08 01:57:35 $
Author:
bill

Constructor Summary
WParamText(String bundleName, String key)
          Constructs a parameterized localized text instance.
WParamText(String bundleName, String key, List args)
          Constructs a parameterized localized text instance.
 
Method Summary
 void add(Object arg)
          Adds the specified argument to the end of the list of arguments.
 void clear()
          Removes all arguments.
 List getArgs()
          Returns an unmodifiable list of the arguments.
 String getText(WRunner runner)
          Returns the textual view of the instance.
 void set(int index, Object arg)
          Sets the value of the argument at the specified index.
 
Methods inherited from class org.westofj.wui.WLocalizedText
equals, getBundleName, getKey, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WParamText

public WParamText(String bundleName,
                  String key)
Constructs a parameterized localized text instance.

Parameters:
bundleName - the name of the resource bundle containing the resource.
key - the name of the resource within the resource bundle.

WParamText

public WParamText(String bundleName,
                  String key,
                  List args)
Constructs a parameterized localized text instance.

Parameters:
bundleName - the name of the resource bundle containing the resource.
key - the name of the resource within the resource bundle.
args - the list of arguments to utilized when constructing the actual text.
Method Detail

add

public void add(Object arg)
Adds the specified argument to the end of the list of arguments.

Parameters:
arg - the argument to add.

set

public void set(int index,
                Object arg)
Sets the value of the argument at the specified index.

Parameters:
index - the index of the argument.
arg - the value of the argument.

getArgs

public List getArgs()
Returns an unmodifiable list of the arguments.

Returns:
List

clear

public void clear()
Removes all arguments.


getText

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

Specified by:
getText in interface WDisplayable
Overrides:
getText in class WLocalizedText

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