/Users/lyon/j4p/src/classUtils/putils/ClassPathBean.java

1    package classUtils.putils; 
2     
3    import gui.dialogs.BeanDialog; 
4     
5    /** 
6     * Copyright DocJava, inc. User: lyon Date: Sep 6, 
7     * 2004 Time: 10:25:51 AM 
8     */ 
9    public class ClassPathBean { 
10       private String classPaths[] = ClassPathUtils.getClassPaths(); 
11       private String pathSeparator = System.getProperty( 
12               "path.separator"); 
13    
14       public ClassPathBean() { 
15       } 
16    
17       public String toString() { 
18           StringBuffer sb = new StringBuffer(); 
19           for (int i = 0; 
20                i < classPaths.length; 
21                i++) { 
22               sb.append(classPaths[i]); 
23               sb.append(pathSeparator); 
24           } 
25           return sb.toString(); 
26       } 
27    
28       public static void main(String[] args) { 
29           ClassPathBean cpb = getClassPathBeanGui(); 
30           System.out.println(cpb); 
31       } 
32    
33       public static ClassPathBean getClassPathBeanGui() { 
34           ClassPathBean cpb = new ClassPathBean(); 
35           BeanDialog bd = new BeanDialog(cpb); 
36           bd.setSize(500, 500); 
37           bd.show(); 
38           return (ClassPathBean) bd.getData(); 
39       } 
40    
41       public String[] getClassPath() { 
42           return classPaths; 
43       } 
44    
45       public void setClassPath(String classPaths[]) { 
46           this.classPaths = classPaths; 
47       } 
48   } 
49