1 package net.sourceforge.jeuclid.test;
2
3 import java.awt.BorderLayout;
4 import java.lang.reflect.InvocationTargetException;
5
6 import javax.swing.JFrame;
7
8 import net.sourceforge.jeuclid.swing.JMathComponent;
9
10 import org.testng.annotations.Test;
11 import org.w3c.dom.Document;
12
13 public class ViewerTest {
14
15
16
17
18 final public static String TEST1 = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><math mode=\"display\">"
19 + "<mrow><munderover><mo>∫</mo><mn>1</mn><mi>x</mi></munderover>"
20 + "<mfrac><mi>dt</mi><mi>t</mi></mfrac></mrow></math>";
21
22 @Test
23 public void testViewer() throws Exception {
24
25
26 }
27
28 public void displayDocument(final Document document)
29 throws InterruptedException, InvocationTargetException {
30 final JFrame frame = new JFrame("Test MathComponent");
31
32 frame.getContentPane().setLayout(new BorderLayout());
33 final JMathComponent component = new JMathComponent();
34 component.setDocument(document);
35 component.setDebug(false);
36 frame.getContentPane().add(component, BorderLayout.CENTER);
37 frame.setVisible(true);
38 frame.pack();
39 frame.dispose();
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54 }
55 }