01: /* Text.java
02:
03: {{IS_NOTE
04:
05: Purpose:
06: Description:
07: History:
08: C2001/10/22 20:48:21, reate, Tom M. Yeh
09: }}IS_NOTE
10:
11: Copyright (C) 2001 Potix Corporation. All Rights Reserved.
12:
13: {{IS_RIGHT
14: This program is distributed under GPL Version 2.0 in the hope that
15: it will be useful, but WITHOUT ANY WARRANTY.
16: }}IS_RIGHT
17: */
18: package org.zkoss.idom;
19:
20: import org.zkoss.idom.impl.*;
21:
22: /**
23: * The iDOM Text.
24: *
25: * @author tomyeh
26: * @see CData
27: */
28: public class Text extends AbstractTextual implements org.w3c.dom.Text {
29: /** Constructor.
30: */
31: public Text(String text) {
32: super (text);
33: }
34:
35: /** Constructor.
36: */
37: public Text() {
38: }
39:
40: //-- AbstractTextual --//
41: /**
42: * Always returns true to denote it allows to be coalesced
43: * with its siblings with the same type (class).
44: */
45: public final boolean isCoalesceable() {
46: return true;
47: }
48:
49: //-- Item --//
50: public final String getName() {
51: return "#text";
52: }
53:
54: //-- Node --//
55: public final short getNodeType() {
56: return TEXT_NODE;
57: }
58: }
|