StripChartCustomizer.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.  *    StripChartCustomizer.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 strip chart bean
  29.  *
  30.  * @author <a href="mailto:mhall@cs.waikato.ac.nz">Mark Hall</a>
  31.  * @version 1.0
  32.  */
  33. public class StripChartCustomizer extends JPanel
  34.   implements Customizer {
  35.   private PropertyChangeSupport m_pcSupport = 
  36.     new PropertyChangeSupport(this);
  37.   private PropertySheetPanel m_cvEditor = 
  38.     new PropertySheetPanel();
  39.   public StripChartCustomizer() {
  40.     setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 5, 5, 5));
  41.     setLayout(new BorderLayout());
  42.     add(m_cvEditor, BorderLayout.CENTER);
  43.     add(new javax.swing.JLabel("StripChartCustomizer"), 
  44. BorderLayout.NORTH);
  45.   }
  46.   
  47.   /**
  48.    * Set the StripChart object to be customized
  49.    *
  50.    * @param object a StripChart
  51.    */
  52.   public void setObject(Object object) {
  53.     m_cvEditor.setTarget((StripChart)object);
  54.   }
  55.   /**
  56.    * Add a property change listener
  57.    *
  58.    * @param pcl a <code>PropertyChangeListener</code> value
  59.    */
  60.   public void addPropertyChangeListener(PropertyChangeListener pcl) {
  61.     m_pcSupport.addPropertyChangeListener(pcl);
  62.   }
  63.   
  64.   /**
  65.    * Remove a property change listener
  66.    *
  67.    * @param pcl a <code>PropertyChangeListener</code> value
  68.    */
  69.   public void removePropertyChangeListener(PropertyChangeListener pcl) {
  70.     m_pcSupport.removePropertyChangeListener(pcl);
  71.   }
  72. }