1 /*
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
253 * <ul style="color: red;">
254 * <li>List Item</li>
255 * </ul>
256 * </td>
257 * </tr>
258 * </table>
259 *
260 * <p><strong>Warning:</strong> Serialized objects of this class will
261 * not be compatible with future Swing releases. The current
262 * serialization support is appropriate for short term storage or RMI
263 * between applications running the same version of Swing. As of 1.4,
264 * support for long term storage of all JavaBeans™
265 * has been added to the
266 * <code>java.beans</code> package. Please see {@link
267 * java.beans.XMLEncoder}.</p>
268 *
269 * @author Timothy Prinzing
270 * @author Scott Violet
271 * @author Sunita Mani
272 */
273 public class HTMLDocument extends DefaultStyledDocument {
274 /**
275 * Constructs an HTML document using the default buffer size
276 * and a default <code>StyleSheet</code>. This is a convenience
277 * method for the constructor
278 * <code>HTMLDocument(Content, StyleSheet)</code>.
279 */
280 public HTMLDocument() {
281 this(new GapContent(BUFFER_SIZE_DEFAULT), new StyleSheet());
282 }
283
284 /**
285 * Constructs an HTML document with the default content
286 * storage implementation and the specified style/attribute
287 * storage mechanism. This is a convenience method for the
288 * constructor
289 * <code>HTMLDocument(Content, StyleSheet)</code>.
290 *
291 * @param styles the styles
292 */
|
1 /*
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
253 * <ul style="color: red;">
254 * <li>List Item</li>
255 * </ul>
256 * </td>
257 * </tr>
258 * </table>
259 *
260 * <p><strong>Warning:</strong> Serialized objects of this class will
261 * not be compatible with future Swing releases. The current
262 * serialization support is appropriate for short term storage or RMI
263 * between applications running the same version of Swing. As of 1.4,
264 * support for long term storage of all JavaBeans™
265 * has been added to the
266 * <code>java.beans</code> package. Please see {@link
267 * java.beans.XMLEncoder}.</p>
268 *
269 * @author Timothy Prinzing
270 * @author Scott Violet
271 * @author Sunita Mani
272 */
273 @SuppressWarnings("serial") // Same-version serialization only
274 public class HTMLDocument extends DefaultStyledDocument {
275 /**
276 * Constructs an HTML document using the default buffer size
277 * and a default <code>StyleSheet</code>. This is a convenience
278 * method for the constructor
279 * <code>HTMLDocument(Content, StyleSheet)</code>.
280 */
281 public HTMLDocument() {
282 this(new GapContent(BUFFER_SIZE_DEFAULT), new StyleSheet());
283 }
284
285 /**
286 * Constructs an HTML document with the default content
287 * storage implementation and the specified style/attribute
288 * storage mechanism. This is a convenience method for the
289 * constructor
290 * <code>HTMLDocument(Content, StyleSheet)</code>.
291 *
292 * @param styles the styles
293 */
|