Update of /cvsroot/xdoclet/xdoclet2/src/java/xdoclet/sdk/beans
In directory sc8-pr-cvs1:/tmp/cvs-serv5707/src/java/xdoclet/sdk/beans
Modified Files:
BeanInfo.vm
Log Message:
Added icon support for BeanInfo and added some ugly icons for jelly and velocity.
Index: BeanInfo.vm
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet2/src/java/xdoclet/sdk/beans/BeanInfo.vm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** BeanInfo.vm 12 Mar 2003 23:41:03 -0000 1.2
--- BeanInfo.vm 16 Mar 2003 20:38:54 -0000 1.3
***************
*** 31,34 ****
--- 31,36 ----
private final BeanInfo _introspectedBeanInfo;
+ private Map _icons = new HashMap();
+
#set( $beanTag = $class.doc.getTag("bean.class", false) )
***************
*** 92,95 ****
--- 94,111 ----
#end
+ #set( $iconTag = $class.doc.getTag("bean.icon", false) )
+ #if( $iconTag.getAttributeValue("color16") )
+ _icons.put( new Integer(ICON_COLOR_16x16), loadImage(
"$iconTag.getAttributeValue("color16")" ) );
+ #end
+ #if( $iconTag.getAttributeValue("color32") )
+ _icons.put( new Integer(ICON_COLOR_32x32), loadImage(
"$iconTag.getAttributeValue("color32")" ) );
+ #end
+ #if( $iconTag.getAttributeValue("mono16") )
+ _icons.put( new Integer(ICON_MONO_16x16), loadImage(
"$iconTag.getAttributeValue("mono16")" ) );
+ #end
+ #if( $iconTag.getAttributeValue("mono32") )
+ _icons.put( new Integer(ICON_MONO_32x32), loadImage(
"$iconTag.getAttributeValue("mono32")" ) );
+ #end
+
// Set property descriptors from superclass
BeanInfo info =
Introspector.getBeanInfo(getBeanDescriptor().getBeanClass().getSuperclass());
***************
*** 120,126 ****
bi.add(Introspector.getBeanInfo(cl));
}
! result = (BeanInfo[]) bi.toAray(mew BeanInfo[bi.size()]);
#end
return result;
}
--- 136,146 ----
bi.add(Introspector.getBeanInfo(cl));
}
! result = (BeanInfo[]) bi.toArray(mew BeanInfo[bi.size()]);
#end
return result;
+ }
+
+ public Image getIcon( int iconKind ) {
+ return (Image) _icons.get( new Integer( iconKind ) );
}
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel