01: package test.xoetrope.swing;
02:
03: import java.awt.BorderLayout;
04: import java.awt.Dimension;
05: import javax.swing.JApplet;
06: import javax.swing.JButton;
07: import javax.swing.JFrame;
08: import javax.swing.JPanel;
09: import javax.swing.SwingUtilities;
10:
11: //import com.tinyline.app.PPSVGCanvas;
12: //import com.tinyline.app.StatusBar;
13: //import com.xoetrope.swing.XSvgCanvas;
14: //import com.xoetrope.swing.XSvgIcon;
15:
16: /**
17: * Test the XSvgIcon class
18: * <p>Copyright (c) Xoetrope Ltd., 2004</p>
19: * @version 1.0
20: */
21: public class TestXSvgIcon extends JApplet //implements StatusBar
22: {
23: // XSvgCanvas canvas;
24: // JButton button1, button2, button3;
25: // XSvgIcon icon;
26: // PPSVGCanvas canvas2;
27: //
28: // public TestXSvgIcon()
29: // {
30: // init();
31: // }
32: //
33: // public void init()
34: // {
35: // setSize( 640, 480 );
36: // JPanel panel = new JPanel();
37: // panel.setLayout( new BorderLayout());
38: // getContentPane().setLayout( new BorderLayout());
39: // getContentPane().add( panel, BorderLayout.CENTER );
40: //
41: // button1 = new JButton();
42: // icon = new XSvgIcon( "file:///C:/Tools/tinylinepp/samples/tgirl.svg", 30, 30 );
43: // button1.setIcon( icon );
44: //
45: // button1.setMinimumSize( new Dimension( 100, 70 ));
46: // button1.setPreferredSize( new Dimension( 100, 70 ));
47: // panel.add( button1, BorderLayout.NORTH );
48: //
49: // canvas = new XSvgCanvas();
50: // canvas.setSize( 200, 200 );
51: // panel.add( canvas, BorderLayout.CENTER );
52: // SwingUtilities.invokeLater( new Runnable()
53: // {
54: // public void run()
55: // {
56: // canvas.goURL( "file:///C:/Tools/tinylinepp/samples/tgirl.svg" );
57: // }
58: // } );
59: // }
60: //
61: // public static void main( String[] args )
62: // {
63: // JFrame frame = new JFrame( "Test" );
64: // TestXSvgIcon tsvg = new TestXSvgIcon();
65: // frame.getContentPane().add( tsvg );
66: // frame.setSize( 640, 480 );
67: // frame.setVisible( true );
68: // tsvg.setVisible( true );
69: // }
70: //
71: // public void alertError(String s)
72: // {
73: // repaint();
74: // }
75: // public void alertWait(String s)
76: // {
77: // repaint();
78: // }
79: // public void alertInit(String s)
80: // {
81: // repaint();
82: // }
83: }
|