43 |
import java.io.Serializable; |
import java.io.Serializable; |
44 |
|
|
45 |
import javax.swing.text.BadLocationException; |
import javax.swing.text.BadLocationException; |
46 |
|
import javax.swing.text.Document; |
47 |
import javax.swing.text.MutableAttributeSet; |
import javax.swing.text.MutableAttributeSet; |
48 |
import javax.swing.text.StyledEditorKit; |
import javax.swing.text.StyledEditorKit; |
49 |
|
import javax.swing.text.html.parser.ParserDelegator; |
50 |
|
|
51 |
/** |
/** |
52 |
* This class is NOT implemented. This file currently holds only |
* This class is NOT implemented. This file currently holds only |
98 |
/** |
/** |
99 |
* The parser calls this method after it finishes parsing the document. |
* The parser calls this method after it finishes parsing the document. |
100 |
*/ |
*/ |
101 |
public void flush() |
public void flush() throws BadLocationException |
|
throws BadLocationException |
|
102 |
{ |
{ |
103 |
|
// TODO: What to do here, if anything? |
104 |
} |
} |
105 |
|
|
106 |
/** |
/** |
110 |
*/ |
*/ |
111 |
public void handleComment(char[] comment, int position) |
public void handleComment(char[] comment, int position) |
112 |
{ |
{ |
113 |
|
// TODO: What to do here, if anything? |
114 |
} |
} |
115 |
|
|
116 |
/** |
/** |
121 |
*/ |
*/ |
122 |
public void handleEndOfLineString(String end_of_line) |
public void handleEndOfLineString(String end_of_line) |
123 |
{ |
{ |
124 |
|
// TODO: What to do here, if anything? |
125 |
} |
} |
126 |
|
|
127 |
/** |
/** |
133 |
*/ |
*/ |
134 |
public void handleEndTag(HTML.Tag tag, int position) |
public void handleEndTag(HTML.Tag tag, int position) |
135 |
{ |
{ |
136 |
|
// TODO: What to do here, if anything? |
137 |
} |
} |
138 |
|
|
139 |
/** |
/** |
144 |
*/ |
*/ |
145 |
public void handleError(String message, int position) |
public void handleError(String message, int position) |
146 |
{ |
{ |
147 |
|
// TODO: What to do here, if anything? |
148 |
} |
} |
149 |
|
|
150 |
/** |
/** |
155 |
* @param position The tag position in the text being parsed. |
* @param position The tag position in the text being parsed. |
156 |
*/ |
*/ |
157 |
public void handleSimpleTag(HTML.Tag tag, MutableAttributeSet attributes, |
public void handleSimpleTag(HTML.Tag tag, MutableAttributeSet attributes, |
158 |
int position |
int position) |
|
) |
|
159 |
{ |
{ |
160 |
|
// TODO: What to do here, if anything? |
161 |
} |
} |
162 |
|
|
163 |
/** |
/** |
171 |
int position |
int position |
172 |
) |
) |
173 |
{ |
{ |
174 |
|
// TODO: What to do here, if anything? |
175 |
} |
} |
176 |
|
|
177 |
/** |
/** |
181 |
*/ |
*/ |
182 |
public void handleText(char[] text, int position) |
public void handleText(char[] text, int position) |
183 |
{ |
{ |
184 |
|
// TODO: What to do here, if anything? |
185 |
} |
} |
186 |
} |
} |
187 |
|
|
255 |
* The "ident paragraph right" action. |
* The "ident paragraph right" action. |
256 |
*/ |
*/ |
257 |
public static final String PARA_INDENT_RIGHT = "html-para-indent-right"; |
public static final String PARA_INDENT_RIGHT = "html-para-indent-right"; |
|
} |
|
258 |
|
|
259 |
|
/** |
260 |
|
* Create a text storage model for this type of editor. |
261 |
|
* |
262 |
|
* @return the model |
263 |
|
*/ |
264 |
|
public Document createDefaultDocument() |
265 |
|
{ |
266 |
|
HTMLDocument document = new HTMLDocument(); |
267 |
|
return document; |
268 |
|
} |
269 |
|
|
270 |
|
/** |
271 |
|
* Get the parser that this editor kit uses for reading HTML streams. This |
272 |
|
* method can be overridden to use the alternative parser. |
273 |
|
* |
274 |
|
* @return the HTML parser (by default, {@link ParserDelegator}). |
275 |
|
*/ |
276 |
|
protected Parser getParser() |
277 |
|
{ |
278 |
|
return new ParserDelegator(); |
279 |
|
} |
280 |
|
} |