source: src/main/java/weka/gui/beans/PredictionAppenderCustomizer.java @ 17

Last change on this file since 17 was 4, checked in by gnappo, 14 years ago

Import di weka.

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