| 1 |
// Copyright 2002, SLAC, Stanford University, U.S.A. |
| 2 |
package org.freehep.graphicsio.test; |
| 3 |
|
| 4 |
import javax.swing.JEditorPane; |
| 5 |
import javax.swing.text.html.HTMLEditorKit; |
| 6 |
|
| 7 |
/** |
| 8 |
* |
| 9 |
* @author Mark Donszelmann |
| 10 |
* @version $Id: freehep-graphicsio-tests/src/main/java/org/freehep/graphicsio/test/TestHTML.java f493ff6e61b2 2005/12/01 18:46:43 duns $ |
| 11 |
*/ |
| 12 |
public class TestHTML extends TestingPanel { |
| 13 |
|
| 14 |
private String text; |
| 15 |
|
| 16 |
public TestHTML(String[] args) throws Exception { |
| 17 |
super(args); |
| 18 |
setName("HTML"); |
| 19 |
text = "<Vector<sup><b>Graphics</b></sup> & Adapter<i><sub>Card</sub></i> " |
| 20 |
+ "= e<sup>x<sup>2</sup>y<sup>3</sup></sup>>"; |
| 21 |
|
| 22 |
JEditorPane pane = new JEditorPane(); |
| 23 |
pane.setContentType("text/html"); |
| 24 |
pane.setEditorKit(new HTMLEditorKit()); |
| 25 |
pane.setText(text); |
| 26 |
pane.setEditable(false); |
| 27 |
add(pane); |
| 28 |
} |
| 29 |
|
| 30 |
public static void main(String[] args) throws Exception { |
| 31 |
new TestHTML(args).runTest(); |
| 32 |
} |
| 33 |
} |