01: /* Comment.java
02:
03: {{IS_NOTE
04:
05: Purpose:
06: Description:
07: History:
08: 2001/10/22 20:55:39, Create, 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 Comment.
24: *
25: * @author tomyeh
26: */
27: public class Comment extends AbstractTextual implements
28: org.w3c.dom.Comment {
29: /** Constructor.
30: */
31: public Comment(String text) {
32: super (text);
33: }
34:
35: /** Constructor.
36: */
37: public Comment() {
38: }
39:
40: //-- AbstractTextual --//
41: /**
42: * Returns false to denote it is not part of parent's text,
43: */
44: public final boolean isPartOfParentText() {
45: return false;
46: }
47:
48: protected void checkText(String text) {
49: Verifier.checkCommentData(text, getLocator());
50: }
51:
52: //-- Item --//
53: public final String getName() {
54: return "#comment";
55: }
56:
57: //-- Node --//
58: public final short getNodeType() {
59: return COMMENT_NODE;
60: }
61: }
|