org.ultrawork.wtk.mc
Class Text
java.lang.Object
|
+--org.ultrawork.wtk.mc.Text
- All Implemented Interfaces:
- Component
- public class Text
- extends java.lang.Object
- implements Component
A lightweight component that displays plain text.
It can be associated with a java.util.ResourceBundle
to provide i18n.
- Version:
- 0.2
- Author:
- Nicolas Bonvin
Field Summary |
private java.lang.String |
bundleName
|
private java.lang.String |
key
|
private java.lang.String |
label
|
Constructor Summary |
Text()
|
Text(java.lang.String label)
|
Text(java.lang.String key,
java.lang.String bundleName)
|
Method Summary |
protected java.lang.String |
computeMessage(javax.servlet.http.HttpSession session)
|
java.lang.String |
getBundleName()
Gets the bundleName |
java.lang.String |
getKey()
Gets the key |
java.lang.String |
getLabel()
Gets the value |
void |
setBundleName(java.lang.String bundleName)
Sets the bundleName |
void |
setKey(java.lang.String key)
Sets the key |
void |
setLabel(java.lang.String label)
Sets the value |
java.lang.String |
toString()
|
void |
write(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Writes the component to the http response. |
void |
write(javax.servlet.jsp.PageContext pageContext)
Writes the component to the current page. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
label
private java.lang.String label
key
private java.lang.String key
bundleName
private java.lang.String bundleName
Text
public Text()
Text
public Text(java.lang.String label)
Text
public Text(java.lang.String key,
java.lang.String bundleName)
getLabel
public java.lang.String getLabel()
- Gets the value
- Returns:
- Returns a String
setLabel
public void setLabel(java.lang.String label)
- Sets the value
- Parameters:
value
- The value to set
getKey
public java.lang.String getKey()
- Gets the key
- Returns:
- Returns a String
setKey
public void setKey(java.lang.String key)
- Sets the key
- Parameters:
key
- The key to set
getBundleName
public java.lang.String getBundleName()
- Gets the bundleName
- Returns:
- Returns a String
setBundleName
public void setBundleName(java.lang.String bundleName)
- Sets the bundleName
- Parameters:
bundleName
- The bundleName to set
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
write
public void write(javax.servlet.jsp.PageContext pageContext)
throws java.io.IOException,
javax.servlet.ServletException
- Description copied from interface:
Component
- Writes the component to the current page.
- Specified by:
write
in interface Component
- See Also:
Component.write(PageContext)
computeMessage
protected java.lang.String computeMessage(javax.servlet.http.HttpSession session)
throws java.util.MissingResourceException
write
public void write(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- Description copied from interface:
Component
- Writes the component to the http response.
- Specified by:
write
in interface Component
Copyright © 2002 - ultrawork