[4] | 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 | /* |
---|
| 18 | * PredictionAppenderBeanInfo.java |
---|
| 19 | * Copyright (C) 2003 University of Waikato, Hamilton, New Zealand |
---|
| 20 | * |
---|
| 21 | */ |
---|
| 22 | |
---|
| 23 | package weka.gui.beans; |
---|
| 24 | |
---|
| 25 | import java.beans.*; |
---|
| 26 | |
---|
| 27 | /** |
---|
| 28 | * Bean info class for PredictionAppender. |
---|
| 29 | * |
---|
| 30 | * @author <a href="mailto:mhall@cs.waikato.ac.nz">Mark Hall</a> |
---|
| 31 | * @version $Revision: 1.3 $ |
---|
| 32 | * @since 1.0 |
---|
| 33 | * @see SimpleBeanInfo |
---|
| 34 | */ |
---|
| 35 | public class PredictionAppenderBeanInfo extends SimpleBeanInfo { |
---|
| 36 | |
---|
| 37 | /** |
---|
| 38 | * Get the event set descriptors pertinent to data sources |
---|
| 39 | * |
---|
| 40 | * @return an <code>EventSetDescriptor[]</code> value |
---|
| 41 | */ |
---|
| 42 | public EventSetDescriptor [] getEventSetDescriptors() { |
---|
| 43 | try { |
---|
| 44 | EventSetDescriptor [] esds = |
---|
| 45 | { new EventSetDescriptor(PredictionAppender.class, |
---|
| 46 | "dataSet", |
---|
| 47 | DataSourceListener.class, |
---|
| 48 | "acceptDataSet"), |
---|
| 49 | new EventSetDescriptor(PredictionAppender.class, |
---|
| 50 | "instance", |
---|
| 51 | InstanceListener.class, |
---|
| 52 | "acceptInstance"), |
---|
| 53 | new EventSetDescriptor(PredictionAppender.class, |
---|
| 54 | "trainingSet", |
---|
| 55 | TrainingSetListener.class, |
---|
| 56 | "acceptTrainingSet"), |
---|
| 57 | new EventSetDescriptor(PredictionAppender.class, |
---|
| 58 | "testSet", |
---|
| 59 | TestSetListener.class, |
---|
| 60 | "acceptTestSet") |
---|
| 61 | }; |
---|
| 62 | return esds; |
---|
| 63 | } catch (Exception ex) { |
---|
| 64 | ex.printStackTrace(); |
---|
| 65 | } |
---|
| 66 | return null; |
---|
| 67 | } |
---|
| 68 | |
---|
| 69 | /** |
---|
| 70 | * Return the property descriptors for this bean |
---|
| 71 | * |
---|
| 72 | * @return a <code>PropertyDescriptor[]</code> value |
---|
| 73 | */ |
---|
| 74 | public PropertyDescriptor[] getPropertyDescriptors() { |
---|
| 75 | try { |
---|
| 76 | PropertyDescriptor p1; |
---|
| 77 | p1 = new PropertyDescriptor("appendPredictedProbabilities", |
---|
| 78 | PredictionAppender.class); |
---|
| 79 | PropertyDescriptor [] pds = { p1 }; |
---|
| 80 | return pds; |
---|
| 81 | } catch (Exception ex) { |
---|
| 82 | ex.printStackTrace(); |
---|
| 83 | } |
---|
| 84 | return null; |
---|
| 85 | } |
---|
| 86 | |
---|
| 87 | /** |
---|
| 88 | * Return the bean descriptor for this bean |
---|
| 89 | * |
---|
| 90 | * @return a <code>BeanDescriptor</code> value |
---|
| 91 | */ |
---|
| 92 | public BeanDescriptor getBeanDescriptor() { |
---|
| 93 | return new BeanDescriptor(weka.gui.beans.PredictionAppender.class, |
---|
| 94 | PredictionAppenderCustomizer.class); |
---|
| 95 | } |
---|
| 96 | } |
---|