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.
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.
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.
18
* CrossValidationFoldMakerCustomizer.java
19
* Copyright (C) 2002 University of Waikato, Hamilton, New Zealand
23
package weka.gui.beans;
25
import weka.gui.PropertySheetPanel;
27
import java.awt.BorderLayout;
28
import java.beans.Customizer;
29
import java.beans.PropertyChangeListener;
30
import java.beans.PropertyChangeSupport;
32
import javax.swing.JPanel;
35
* GUI Customizer for the cross validation fold maker bean
37
* @author <a href="mailto:mhall@cs.waikato.ac.nz">Mark Hall</a>
38
* @version $Revision: 1.3 $
40
public class CrossValidationFoldMakerCustomizer
42
implements Customizer {
44
/** for serialization */
45
private static final long serialVersionUID = 1229878140258668581L;
47
private PropertyChangeSupport m_pcSupport =
48
new PropertyChangeSupport(this);
50
private PropertySheetPanel m_cvEditor =
51
new PropertySheetPanel();
53
public CrossValidationFoldMakerCustomizer() {
54
setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 5, 5, 5));
56
setLayout(new BorderLayout());
57
add(m_cvEditor, BorderLayout.CENTER);
58
add(new javax.swing.JLabel("CrossValidationFoldMakerCustomizer"),
63
* Set the object to be edited
65
* @param object a CrossValidationFoldMaker object
67
public void setObject(Object object) {
68
m_cvEditor.setTarget((CrossValidationFoldMaker)object);
72
* Add a property change listener
74
* @param pcl a <code>PropertyChangeListener</code> value
76
public void addPropertyChangeListener(PropertyChangeListener pcl) {
77
m_pcSupport.addPropertyChangeListener(pcl);
81
* Remove a property change listener
83
* @param pcl a <code>PropertyChangeListener</code> value
85
public void removePropertyChangeListener(PropertyChangeListener pcl) {
86
m_pcSupport.removePropertyChangeListener(pcl);