home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1998 February
/
VPR9802A.ISO
/
APP_DEMO
/
VC
/
SOURCE.BIN
/
SquareBeanInfo.java
< prev
next >
Wrap
Text File
|
1997-10-27
|
2KB
|
83 lines
package symantec.itools.awt.shape;
import java.beans.*;
import symantec.itools.beans.*;
/**
* BeanInfo for Square.
*
*/
public class SquareBeanInfo extends SimpleBeanInfo {
/**
* Constructs a SquareBeanInfo object.
*/
public SquareBeanInfo() {
}
/**
* Gets a BeanInfo for the superclass of this bean.
* @return BeanInfo[] containing this bean's superclass BeanInfo
*/
public BeanInfo[] getAdditionalBeanInfo() {
try {
BeanInfo[] bi = new BeanInfo[1];
bi[0] = Introspector.getBeanInfo(beanClass.getSuperclass());
return bi;
}
catch (IntrospectionException e) { throw new Error(e.toString());}
}
/**
* Gets the SymantecBeanDescriptor for this bean.
* @return an object of type SymantecBeanDescriptor
* @see symantec.itools.beans.SymantecBeanDescriptor
*/
public BeanDescriptor getBeanDescriptor() {
SymantecBeanDescriptor bd = new SymantecBeanDescriptor(beanClass);
bd.setFolder("図形");
bd.setToolbar("図形");
// bd.setFolder("Shapes");
// bd.setToolbar("Shapes");
bd.setWinHelp("0x123BE");
bd.addAdditionalConnections(getAdditionalBeanInfo());
return (BeanDescriptor) bd;
}
/**
* Gets an image that may be used to visually represent this bean
* (in the toolbar, on a form, etc).
* @param iconKind the type of icon desired, one of: BeanInfo.ICON_MONO_16x16,
* BeanInfo.ICON_COLOR_16x16, BeanInfo.ICON_MONO_32x32, or BeanInfo.ICON_COLOR_32x32.
* @return an image for this bean, always color even if requested monochrome
* @see BeanInfo#ICON_MONO_16x16
* @see BeanInfo#ICON_COLOR_16x16
* @see BeanInfo#ICON_MONO_32x32
* @see BeanInfo#ICON_COLOR_32x32
*/
public java.awt.Image getIcon(int iconKind) {
if (iconKind == BeanInfo.ICON_MONO_16x16 ||
iconKind == BeanInfo.ICON_COLOR_16x16) {
java.awt.Image img = loadImage("SquareC16.gif");
return img;
}
if (iconKind == BeanInfo.ICON_MONO_32x32 ||
iconKind == BeanInfo.ICON_COLOR_32x32) {
java.awt.Image img = loadImage("SquareC32.gif");
return img;
}
return null;
}
public MethodDescriptor[] getMethodDescriptors() { return new MethodDescriptor[0]; }
public PropertyDescriptor[] getPropertyDescriptors() { return new PropertyDescriptor[0]; }
private final static Class beanClass = Square.class;
} // end of class SquareBeanInfo