~ubuntu-branches/ubuntu/precise/weka/precise

« back to all changes in this revision

Viewing changes to weka/gui/beans/CrossValidationFoldMakerCustomizer.java

  • Committer: Bazaar Package Importer
  • Author(s): Soeren Sonnenburg
  • Date: 2008-02-24 09:18:45 UTC
  • Revision ID: james.westby@ubuntu.com-20080224091845-1l8zy6fm6xipbzsr
Tags: upstream-3.5.7+tut1
ImportĀ upstreamĀ versionĀ 3.5.7+tut1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 *    CrossValidationFoldMakerCustomizer.java
 
19
 *    Copyright (C) 2002 University of Waikato, Hamilton, New Zealand
 
20
 *
 
21
 */
 
22
 
 
23
package weka.gui.beans;
 
24
 
 
25
import weka.gui.PropertySheetPanel;
 
26
 
 
27
import java.awt.BorderLayout;
 
28
import java.beans.Customizer;
 
29
import java.beans.PropertyChangeListener;
 
30
import java.beans.PropertyChangeSupport;
 
31
 
 
32
import javax.swing.JPanel;
 
33
 
 
34
/**
 
35
 * GUI Customizer for the cross validation fold maker bean
 
36
 *
 
37
 * @author <a href="mailto:mhall@cs.waikato.ac.nz">Mark Hall</a>
 
38
 * @version $Revision: 1.3 $
 
39
 */
 
40
public class CrossValidationFoldMakerCustomizer
 
41
  extends JPanel
 
42
  implements Customizer {
 
43
 
 
44
  /** for serialization */
 
45
  private static final long serialVersionUID = 1229878140258668581L;
 
46
 
 
47
  private PropertyChangeSupport m_pcSupport = 
 
48
    new PropertyChangeSupport(this);
 
49
 
 
50
  private PropertySheetPanel m_cvEditor = 
 
51
    new PropertySheetPanel();
 
52
 
 
53
  public CrossValidationFoldMakerCustomizer() {
 
54
    setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 5, 5, 5));
 
55
 
 
56
    setLayout(new BorderLayout());
 
57
    add(m_cvEditor, BorderLayout.CENTER);
 
58
    add(new javax.swing.JLabel("CrossValidationFoldMakerCustomizer"), 
 
59
        BorderLayout.NORTH);
 
60
  }
 
61
  
 
62
  /**
 
63
   * Set the object to be edited
 
64
   *
 
65
   * @param object a CrossValidationFoldMaker object
 
66
   */
 
67
  public void setObject(Object object) {
 
68
    m_cvEditor.setTarget((CrossValidationFoldMaker)object);
 
69
  }
 
70
 
 
71
  /**
 
72
   * Add a property change listener
 
73
   *
 
74
   * @param pcl a <code>PropertyChangeListener</code> value
 
75
   */
 
76
  public void addPropertyChangeListener(PropertyChangeListener pcl) {
 
77
    m_pcSupport.addPropertyChangeListener(pcl);
 
78
  }
 
79
  
 
80
  /**
 
81
   * Remove a property change listener
 
82
   *
 
83
   * @param pcl a <code>PropertyChangeListener</code> value
 
84
   */
 
85
  public void removePropertyChangeListener(PropertyChangeListener pcl) {
 
86
    m_pcSupport.removePropertyChangeListener(pcl);
 
87
  }
 
88
}