home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1998 April A
/
Pcwk4a98.iso
/
Lotus
/
Beanmach
/
DATA1.CAB
/
Sample_Files
/
samples
/
newbeans
/
BlinkingText.jar
/
BlinkingTextBeanInfo.java
< prev
next >
Wrap
Text File
|
1997-08-01
|
1KB
|
50 lines
/**
* The only thing we define in the Juggler BeanInfo is a GIF icon.
*/
import java.beans.*;
public class BlinkingTextBeanInfo extends SimpleBeanInfo
{
static Class beanClass = BlinkingText.class;
public PropertyDescriptor[] getPropertyDescriptors()
{
try
{
PropertyDescriptor background = new PropertyDescriptor("background", beanClass);
PropertyDescriptor foreground = new PropertyDescriptor("foreground", beanClass);
PropertyDescriptor font = new PropertyDescriptor("font", beanClass);
PropertyDescriptor text = new PropertyDescriptor("text", beanClass);
PropertyDescriptor speed = new PropertyDescriptor("speed", beanClass);
PropertyDescriptor autoStart = new PropertyDescriptor("autoStart", beanClass);
PropertyDescriptor rv[] = {background, foreground, font, text, speed, autoStart};
return rv;
}
catch (IntrospectionException e)
{
throw new Error(e.toString());
}
}
public int getDefaultPropertyIndex()
{
// the index for the "text" property
return 3;
}
public java.awt.Image getIcon(int iconKind)
{
if (iconKind == BeanInfo.ICON_COLOR_32x32)
{
java.awt.Image img = loadImage("blinkingText.gif");
return img;
}
return null;
}
}