src/share/classes/javax/swing/text/html/HTMLDocument.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 181,191 **** * <h3>Summary</h3> * * <p>The following table shows the example document and the results * of various methods described above.</p> * ! * <table border=1 cellspacing=0> * <tr> * <th>Example</th> * <th><code>insertAfterStart</code></th> * <th><code>insertBeforeEnd</code></th> * <th><code>insertBeforeStart</code></th> --- 181,191 ---- * <h3>Summary</h3> * * <p>The following table shows the example document and the results * of various methods described above.</p> * ! * <table border=1 cellspacing=0 summary="HTML Content of example above"> * <tr> * <th>Example</th> * <th><code>insertAfterStart</code></th> * <th><code>insertBeforeEnd</code></th> * <th><code>insertBeforeStart</code></th>
*** 992,1011 **** * &lt;p&gt; &lt;p&gt; * </pre> * * <p>Invoking <code>setInnerHTML(elem, "&lt;ul&gt;&lt;li&gt;")</code> * results in the following structure (new elements are <font ! * color="red">in red</font>).</p> * * <pre> * &lt;body&gt; * | * <b>&lt;div&gt;</b> * \ ! * <font color="red">&lt;ul&gt;</font> * \ ! * <font color="red">&lt;li&gt;</font> * </pre> * * <p>Parameter <code>elem</code> must not be a leaf element, * otherwise an <code>IllegalArgumentException</code> is thrown. * If either <code>elem</code> or <code>htmlText</code> parameter --- 992,1011 ---- * &lt;p&gt; &lt;p&gt; * </pre> * * <p>Invoking <code>setInnerHTML(elem, "&lt;ul&gt;&lt;li&gt;")</code> * results in the following structure (new elements are <font ! * style="color: red;">in red</font>).</p> * * <pre> * &lt;body&gt; * | * <b>&lt;div&gt;</b> * \ ! * <font style="color: red;">&lt;ul&gt;</font> * \ ! * <font style="color: red;">&lt;li&gt;</font> * </pre> * * <p>Parameter <code>elem</code> must not be a leaf element, * otherwise an <code>IllegalArgumentException</code> is thrown. * If either <code>elem</code> or <code>htmlText</code> parameter
*** 1073,1090 **** * &lt;p&gt; &lt;p&gt; * </pre> * * <p>Invoking <code>setOuterHTML(elem, "&lt;ul&gt;&lt;li&gt;")</code> * results in the following structure (new elements are <font ! * color="red">in red</font>).</p> * * <pre> * &lt;body&gt; * | ! * <font color="red">&lt;ul&gt;</font> * \ ! * <font color="red">&lt;li&gt;</font> * </pre> * * <p>If either <code>elem</code> or <code>htmlText</code> * parameter is <code>null</code>, no changes are made to the * document.</p> --- 1073,1090 ---- * &lt;p&gt; &lt;p&gt; * </pre> * * <p>Invoking <code>setOuterHTML(elem, "&lt;ul&gt;&lt;li&gt;")</code> * results in the following structure (new elements are <font ! * style="color: red;">in red</font>).</p> * * <pre> * &lt;body&gt; * | ! * <font style="color: red;">&lt;ul&gt;</font> * \ ! * <font style="color: red;">&lt;li&gt;</font> * </pre> * * <p>If either <code>elem</code> or <code>htmlText</code> * parameter is <code>null</code>, no changes are made to the * document.</p>
*** 1143,1162 **** * &lt;p&gt; &lt;p&gt; * </pre> * * <p>Invoking <code>insertAfterStart(elem, * "&lt;ul&gt;&lt;li&gt;")</code> results in the following structure ! * (new elements are <font color="red">in red</font>).</p> * * <pre> * &lt;body&gt; * | * <b>&lt;div&gt;</b> * / | \ ! * <font color="red">&lt;ul&gt;</font> &lt;p&gt; &lt;p&gt; * / ! * <font color="red">&lt;li&gt;</font> * </pre> * * <p>Unlike the <code>insertBeforeStart</code> method, new * elements become <em>children</em> of the specified element, * not siblings.</p> --- 1143,1162 ---- * &lt;p&gt; &lt;p&gt; * </pre> * * <p>Invoking <code>insertAfterStart(elem, * "&lt;ul&gt;&lt;li&gt;")</code> results in the following structure ! * (new elements are <font style="color: red;">in red</font>).</p> * * <pre> * &lt;body&gt; * | * <b>&lt;div&gt;</b> * / | \ ! * <font style="color: red;">&lt;ul&gt;</font> &lt;p&gt; &lt;p&gt; * / ! * <font style="color: red;">&lt;li&gt;</font> * </pre> * * <p>Unlike the <code>insertBeforeStart</code> method, new * elements become <em>children</em> of the specified element, * not siblings.</p>
*** 1213,1232 **** * &lt;p&gt; &lt;p&gt; * </pre> * * <p>Invoking <code>insertBeforeEnd(elem, "&lt;ul&gt;&lt;li&gt;")</code> * results in the following structure (new elements are <font ! * color="red">in red</font>).</p> * * <pre> * &lt;body&gt; * | * <b>&lt;div&gt;</b> * / | \ ! * &lt;p&gt; &lt;p&gt; <font color="red">&lt;ul&gt;</font> * \ ! * <font color="red">&lt;li&gt;</font> * </pre> * * <p>Unlike the <code>insertAfterEnd</code> method, new elements * become <em>children</em> of the specified element, not * siblings.</p> --- 1213,1232 ---- * &lt;p&gt; &lt;p&gt; * </pre> * * <p>Invoking <code>insertBeforeEnd(elem, "&lt;ul&gt;&lt;li&gt;")</code> * results in the following structure (new elements are <font ! * style="color: red;">in red</font>).</p> * * <pre> * &lt;body&gt; * | * <b>&lt;div&gt;</b> * / | \ ! * &lt;p&gt; &lt;p&gt; <font style="color: red;">&lt;ul&gt;</font> * \ ! * <font style="color: red;">&lt;li&gt;</font> * </pre> * * <p>Unlike the <code>insertAfterEnd</code> method, new elements * become <em>children</em> of the specified element, not * siblings.</p>
*** 1280,1297 **** * &lt;p&gt; &lt;p&gt; * </pre> * * <p>Invoking <code>insertBeforeStart(elem, * "&lt;ul&gt;&lt;li&gt;")</code> results in the following structure ! * (new elements are <font color="red">in red</font>).</p> * * <pre> * &lt;body&gt; * / \ ! * <font color="red">&lt;ul&gt;</font> <b>&lt;div&gt;</b> * / / \ ! * <font color="red">&lt;li&gt;</font> &lt;p&gt; &lt;p&gt; * </pre> * * <p>Unlike the <code>insertAfterStart</code> method, new * elements become <em>siblings</em> of the specified element, not * children.</p> --- 1280,1297 ---- * &lt;p&gt; &lt;p&gt; * </pre> * * <p>Invoking <code>insertBeforeStart(elem, * "&lt;ul&gt;&lt;li&gt;")</code> results in the following structure ! * (new elements are <font style="color: red;">in red</font>).</p> * * <pre> * &lt;body&gt; * / \ ! * <font style="color: red;">&lt;ul&gt;</font> <b>&lt;div&gt;</b> * / / \ ! * <font style="color: red;">&lt;li&gt;</font> &lt;p&gt; &lt;p&gt; * </pre> * * <p>Unlike the <code>insertAfterStart</code> method, new * elements become <em>siblings</em> of the specified element, not * children.</p>
*** 1338,1355 **** * &lt;p&gt; &lt;p&gt; * </pre> * * <p>Invoking <code>insertAfterEnd(elem, "&lt;ul&gt;&lt;li&gt;")</code> * results in the following structure (new elements are <font ! * color="red">in red</font>).</p> * * <pre> * &lt;body&gt; * / \ ! * <b>&lt;div&gt;</b> <font color="red">&lt;ul&gt;</font> * / \ \ ! * &lt;p&gt; &lt;p&gt; <font color="red">&lt;li&gt;</font> * </pre> * * <p>Unlike the <code>insertBeforeEnd</code> method, new elements * become <em>siblings</em> of the specified element, not * children.</p> --- 1338,1355 ---- * &lt;p&gt; &lt;p&gt; * </pre> * * <p>Invoking <code>insertAfterEnd(elem, "&lt;ul&gt;&lt;li&gt;")</code> * results in the following structure (new elements are <font ! * style="color: red;">in red</font>).</p> * * <pre> * &lt;body&gt; * / \ ! * <b>&lt;div&gt;</b> <font style="color: red;">&lt;ul&gt;</font> * / \ \ ! * &lt;p&gt; &lt;p&gt; <font style="color: red;">&lt;li&gt;</font> * </pre> * * <p>Unlike the <code>insertBeforeEnd</code> method, new elements * become <em>siblings</em> of the specified element, not * children.</p>