FilterBeanInfo.java
Upload User: rhdiban
Upload Date: 2013-08-09
Package Size: 15085k
Code Size: 2k
Category:

Windows Develop

Development Platform:

Java

  1. /*  *    This program is free software; you can redistribute it and/or modify  *    it under the terms of the GNU General Public License as published by  *    the Free Software Foundation; either version 2 of the License, or  *    (at your option) any later version.  *  *    This program is distributed in the hope that it will be useful,  *    but WITHOUT ANY WARRANTY; without even the implied warranty of  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  *    GNU General Public License for more details.  *  *    You should have received a copy of the GNU General Public License  *    along with this program; if not, write to the Free Software  *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */ /*  *    FilterBeanInfo.java  *    Copyright (C) 2002 Mark Hall  *  */ package weka.gui.beans;
  2. import java.beans.*;
  3. /**
  4.  * Bean info class for the Filter bean
  5.  *
  6.  * @author <a href="mailto:mhall@cs.waikato.ac.nz">Mark Hall</a>
  7.  * @versio $Revision: 1.1 $
  8.  */
  9. public class FilterBeanInfo extends SimpleBeanInfo {
  10.    
  11.   /**
  12.    * Get the event set descriptors for this bean
  13.    *
  14.    * @return an <code>EventSetDescriptor[]</code> value
  15.    */
  16.   public EventSetDescriptor [] getEventSetDescriptors() {
  17.     try {
  18.       EventSetDescriptor [] esds = { 
  19. new EventSetDescriptor(TrainingSetProducer.class, 
  20.        "trainingSet", 
  21.        TrainingSetListener.class, 
  22.        "acceptTrainingSet"),
  23. new EventSetDescriptor(TestSetProducer.class, 
  24.        "testSet", 
  25.        TestSetListener.class, 
  26.        "acceptTestSet"),
  27. new EventSetDescriptor(DataSource.class,
  28.        "dataSet",
  29.        DataSourceListener.class,
  30.        "acceptDataSet"),
  31. new EventSetDescriptor(DataSource.class, 
  32.        "instance", 
  33.        InstanceListener.class, 
  34.        "acceptInstance")
  35.   };
  36.       return esds;
  37.     } catch (Exception ex) {
  38.       ex.printStackTrace();
  39.     }
  40.     return null;
  41.   }
  42.   /**
  43.    * Get the bean descriptor for this bean
  44.    *
  45.    * @return a <code>BeanDescriptor</code> value
  46.    */
  47.   public BeanDescriptor getBeanDescriptor() {
  48.     return new BeanDescriptor(weka.gui.beans.Filter.class,
  49.       FilterCustomizer.class);
  50.   }
  51. }