KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > finalist > jag > template > parser > JagBlock


1 /* Copyright (C) 2003 Finalist IT Group
2  *
3  * This file is part of JAG - the Java J2EE Application Generator
4  *
5  * JAG is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  * JAG is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  * You should have received a copy of the GNU General Public License
14  * along with JAG; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  */

17
18 package com.finalist.jag.template.parser;
19
20
21 import java.util.Collection JavaDoc;
22 import java.util.ArrayList JavaDoc;
23
24 import java.awt.Point JavaDoc;
25
26
27 /**
28  * Interface JagBlock
29  *
30  *
31  * @author Wendel D. de Witte
32  * @version %I%, %G%
33  */

34 public interface JagBlock {
35
36    /**
37     * Add a (rightmost) child to this node
38     *
39     * @param c
40     */

41    public void addChild(JagBlock c);
42
43
44    /**
45     * Get the first child of this node; null if no children
46     *
47     * @return
48     */

49    public JagBlock getFirstChild();
50
51
52    /**
53     * Get the next sibling in line after this one
54     *
55     * @return
56     */

57    public JagBlock getNextSibling();
58
59
60    /**
61     * Get the token text for this node
62     *
63     * @return
64     */

65    public String JavaDoc getText();
66
67
68    /**
69     * Get the token type for this node
70     *
71     * @return
72     */

73    public int getType();
74
75
76    /**
77     * Set the startposition of the token
78     *
79     * @return
80     */

81    public int getStartPos();
82
83
84    /**
85     * Set the endposition of the token
86     *
87     * @return
88     */

89    public int getEndPos();
90
91
92    /**
93     * Method equals
94     *
95     *
96     * @param t
97     *
98     * @return
99     *
100     */

101    public boolean equals(JagBlock t);
102
103
104    /**
105     * Method initialize
106     *
107     *
108     * @param t
109     * @param txt
110     *
111     */

112    public void initialize(int t, String JavaDoc txt);
113
114
115    /**
116     * Method initialize
117     *
118     *
119     * @param t
120     *
121     */

122    public void initialize(JagBlock t);
123
124
125    /**
126     * Set the first child of a node.
127     *
128     * @param c
129     */

130    public void setFirstChild(JagBlock c);
131
132
133    /**
134     * Set the next sibling after this one.
135     *
136     * @param n
137     */

138    public void setNextSibling(JagBlock n);
139
140
141    /**
142     * Set the token text for this node
143     *
144     * @param text
145     */

146    public void setText(String JavaDoc text);
147
148
149    /**
150     * Set the token type for this node
151     *
152     * @param ttype
153     */

154    public void setType(int ttype);
155
156
157    /**
158     * Set the startposition of the token
159     *
160     * @param startPos
161     */

162    public void setStartPos(int startPos);
163
164
165    /**
166     * Set the endposition of the token
167     *
168     * @param endPos
169     */

170    public void setEndPos(int endPos);
171
172
173    /**
174     * Method toString
175     *
176     *
177     * @return
178     *
179     */

180    public String JavaDoc toString();
181 }
Popular Tags