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

Windows Develop

Development Platform:

Java

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