View Javadoc
1 /*** 2 * ClassBrowser 3 * 4 * This is a UI class used for browsing classes that 5 * the InstrumentingClassLoader has loaded. 6 * 7 * 8 * It should be split down the middle vertically. 9 * 10 * On the left, it should have a tree, with Classes 11 * as Folders, and Methods as leafs. 12 * 13 * On the right, it should have a graphical representation 14 * of a state machine. 15 * 16 * Eventually, we should be able to color the state machine 17 * with what has been covered. 18 */ 19 20 package junit.quilt.ui; 21 22 import junit.quilt.cover.state.*; 23 import junit.quilt.util.*; 24 import junit.quilt.framework.*; 25 26 import javax.swing.JFrame; 27 28 public class ClassBrowser 29 extends JFrame 30 { 31 private RegistryBrowser browser = null; 32 private QuiltRegistry registry = null; 33 34 public ClassBrowser(QuiltRegistry registry) { 35 super(); 36 this.registry = registry; 37 browser = new RegistryBrowser( registry, 38 "class"); 39 getContentPane().add( browser ); 40 pack(); 41 } 42 43 public static void main(String args[]) { 44 try { 45 QuiltRegistry registry = new StateMachineRegistry(); 46 47 ClassLoader icl = registry.getInstClassLoader(); 48 49 icl.loadClass("BasicLoad"); 50 icl.loadClass("LongLoad"); 51 icl.loadClass("ExecutionTest"); 52 53 ClassBrowser b = new ClassBrowser(registry); 54 b.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); 55 b.pack(); 56 b.setVisible( true ); 57 } catch (Exception e) { 58 e.printStackTrace(); 59 } 60 } 61 62 63 } 64

This page was automatically generated by Maven