TrainTestSplitMakerCustomizer.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.  *    TrainTestSplitMakerCustomizer.java
  18.  *    Copyright (C) 2002 Mark Hall
  19.  *
  20.  */
  21. package weka.gui.beans;
  22. import java.io.File;
  23. import java.beans.*;
  24. import java.awt.BorderLayout;
  25. import javax.swing.JPanel;
  26. import weka.gui.PropertySheetPanel;
  27. /**
  28.  * GUI customizer for the train test split maker bean
  29.  *
  30.  * @author <a href="mailto:mhall@cs.waikato.ac.nz">Mark Hall</a>
  31.  * @version $Revsion: 1.0 $
  32.  */
  33. public class TrainTestSplitMakerCustomizer extends JPanel
  34.   implements Customizer {
  35.   private PropertyChangeSupport m_pcSupport = 
  36.     new PropertyChangeSupport(this);
  37.   private PropertySheetPanel m_splitEditor = 
  38.     new PropertySheetPanel();
  39.   public TrainTestSplitMakerCustomizer() {
  40.     setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 5, 5, 5));
  41.     
  42.     setLayout(new BorderLayout());
  43.     add(m_splitEditor, BorderLayout.CENTER);
  44.     add(new javax.swing.JLabel("TrainTestSplitMakerCustomizer"), 
  45. BorderLayout.NORTH);
  46.   }
  47.   
  48.   /**
  49.    * Set the TrainTestSplitMaker to be customized
  50.    *
  51.    * @param object an <code>Object</code> value
  52.    */
  53.   public void setObject(Object object) {
  54.     m_splitEditor.setTarget((TrainTestSplitMaker)object);
  55.   }
  56.   /**
  57.    * Add a property change listener
  58.    *
  59.    * @param pcl a <code>PropertyChangeListener</code> value
  60.    */
  61.   public void addPropertyChangeListener(PropertyChangeListener pcl) {
  62.     m_pcSupport.addPropertyChangeListener(pcl);
  63.   }
  64.   
  65.   /**
  66.    * Remove a property change listener
  67.    *
  68.    * @param pcl a <code>PropertyChangeListener</code> value
  69.    */
  70.   public void removePropertyChangeListener(PropertyChangeListener pcl) {
  71.     m_pcSupport.removePropertyChangeListener(pcl);
  72.   }
  73. }