KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > directwebremoting > webwork > DefaultAjaxTextResult


1 package org.directwebremoting.webwork;
2
3 /**
4  * Default implementation of <code>AjaxTextResult</code>
5  *
6  * @author <a HREF='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
7  */

8 public class DefaultAjaxTextResult implements AjaxTextResult
9 {
10     private String JavaDoc m_text;
11
12     /**
13      * Empty constructor.
14      *
15      * @see #setText
16      */

17     public DefaultAjaxTextResult()
18     {
19     }
20
21     /**
22      * Creates an <code>DefaultAjaxTextResult</code> wrapping the given string.
23      *
24      * @param text the string to be wrapped
25      */

26     public DefaultAjaxTextResult(String JavaDoc text)
27     {
28         m_text = text;
29     }
30
31     /**
32      * @see org.directwebremoting.webwork.AjaxTextResult#getText()
33      */

34     public String JavaDoc getText()
35     {
36         return m_text;
37     }
38
39     /**
40      * Sets the wrapped string.
41      *
42      * @param text the string to be wrapped in this result
43      */

44     public void setText(String JavaDoc text)
45     {
46         m_text = text;
47     }
48
49     /**
50      * @see java.lang.Object#toString()
51      */

52     public String JavaDoc toString()
53     {
54         return "[AjaxTextResult: '" + m_text + "']";
55     }
56
57 }
58
Popular Tags