View Javadoc

1   /*
2    * Created on May 10, 2005, Copyright UC Regents
3    */
4   package org.telscenter.pas.steps;
5   
6   import java.awt.Image;
7   import java.beans.BeanDescriptor;
8   import java.beans.BeanInfo;
9   import java.beans.Introspector;
10  import java.beans.SimpleBeanInfo;
11  
12  import org.telscenter.pas.beans.PasStep;
13  import org.telscenter.pas.steps.icons.PasStepIconProvider;
14  
15  /***
16   * BeanInfo for Pas step type, <i>bookmark</i>.
17   * 
18   * @author aperritano
19   */
20  public class BookmarkBeanInfo extends SimpleBeanInfo {
21  
22  	public BeanInfo[] getAdditionalBeanInfo() {
23  		try {
24  			BeanInfo[] additional = new BeanInfo[2];
25  			additional[0] = Introspector.getBeanInfo(PasStep.class);
26  			additional[1] = Introspector.getBeanInfo(AbstractUrlStep.class);
27  			additional[1] = Introspector.getBeanInfo(BrowseWeb.class);
28  			return additional;
29  		} catch (Exception e) {
30  			return super.getAdditionalBeanInfo();
31  		}
32  	}
33  
34  	public Image getIcon(int iconKind) {
35  		return PasStepIconProvider.getIcon("bookmark", iconKind); //$NON-NLS-1$
36  	}
37  
38  	public BeanDescriptor getBeanDescriptor() {
39  		BeanDescriptor d = new BeanDescriptor(Bookmark.class);
40  		d.setShortDescription("Students can have bookmarks");
41  		return d;
42  	}
43  
44  //	public PropertyDescriptor[] getPropertyDescriptors() {
45  //		try {
46  //			PropertyDescriptor[] d = new PropertyDescriptor[2];
47  //			d[0] = new PropertyDescriptor("instructionalText", Bookmark.class); //$NON-NLS-1$
48  //			d[0].setDisplayName("instructional Text");
49  //			d[0].setShortDescription("Text on what to do");
50  //			
51  //			d[1] = new PropertyDescriptor("outsideURL", Bookmark.class); //$NON-NLS-1$
52  //			d[0].setDisplayName("Outside Url");
53  //			d[0].setShortDescription("where the student starts");
54  //			
55  //			return d;
56  //		} catch (IntrospectionException e) {
57  //			// TODO Auto-generated catch block
58  //			return null;
59  //		}
60  //	}
61  
62  }