KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > swing > NullURITest


1 /*
2
3    Copyright 2002-2003 The Apache Software Foundation
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16
17  */

18 package org.apache.batik.swing;
19
20 import java.awt.Dimension JavaDoc;
21
22 import javax.swing.JFrame JavaDoc;
23
24 import org.apache.batik.swing.gvt.GVTTreeRendererAdapter;
25 import org.apache.batik.swing.gvt.GVTTreeRendererEvent;
26 import org.apache.batik.swing.svg.SVGDocumentLoaderAdapter;
27 import org.apache.batik.swing.svg.SVGDocumentLoaderEvent;
28 import org.apache.batik.test.AbstractTest;
29 import org.apache.batik.test.TestReport;
30
31 /**
32  * This test makes sure that setting the canvas's document uri to
33  * null does not cause a NullPointerException
34  *
35  * @author <a HREF="mailto:vincent.hardy@sun.com">Vincent Hardy</a>
36  * @version $Id: NullURITest.java,v 1.8 2004/08/18 07:16:54 vhardy Exp $
37  */

38 public class NullURITest extends NullSetSVGDocumentTest {
39     public String JavaDoc getName() { return getId(); }
40
41     public Runnable JavaDoc getRunnable(final JSVGCanvas canvas) {
42         return new Runnable JavaDoc () {
43                 public void run() {
44                     canvas.setURI(null);
45                 }};
46     }
47 }
48
Popular Tags