1 package junit.quilt.ui;
2
3 /***
4 * CoverAction
5 *
6 * These are actions for selecting the
7 * Coverage technique.
8 */
9
10 import java.awt.event.ActionEvent;
11
12 import junit.quilt.framework.*;
13
14 public class CoverAction
15 extends ResourceAction
16 {
17 private Quilt quilt;
18
19 public CoverAction(Quilt quilt,
20 String resName) {
21 super( resName );
22 this.quilt = quilt;
23 }
24
25 public void actionPerformed( ActionEvent event ) {
26 try {
27 String className = (String) getValue( "RegistryClass" );
28
29 Class clazz = Class.forName( className );
30 QuiltRegistry registry = (QuiltRegistry) clazz.newInstance();
31
32 quilt.setRegistry( registry );
33 } catch (Exception e) {
34 System.err.println("Oops.");
35 e.printStackTrace();
36 }
37 }
38 }
This page was automatically generated by Maven