/** * AlarmBeanBeanInfo.java 1.00 97/07/09 Merlin Hughes * * Copyright (c) 1997 Merlin Hughes, All Rights Reserved. * * Permission to use, copy, modify, and distribute this software * for commercial and non-commercial purposes and without fee is * hereby granted provided that this copyright notice appears in * all copies. * * http://prominence.com/ ego@merlin.org */ package org.merlin.beans.alarm; import java.awt.*; import java.beans.*; public class AlarmBeanBeanInfo extends SimpleBeanInfo { public BeanDescriptor getBeanDescriptor () { return new BeanDescriptor (AlarmBean.class, AlarmBeanCustomizer.class); } public PropertyDescriptor[] getPropertyDescriptors () { try { PropertyDescriptor[] descriptors = { new PropertyDescriptor ("timeout (ms)", AlarmBean.class, "getTimeout", "setTimeout") }; return descriptors; } catch (Exception ex) { return null; } } public MethodDescriptor[] getMethodDescriptors () { try { MethodDescriptor[] descriptors = { new MethodDescriptor (AlarmBean.class.getMethod ("start", new Class[0])), new MethodDescriptor (AlarmBean.class.getMethod ("stop", new Class[0])) }; return descriptors; } catch (Exception ex) { return null; } } public Image getIcon (int iconKind) { if (iconKind == ICON_COLOR_16x16) { return loadImage ("AlarmBeanIconColor16.gif"); } else { return null; } } }