source: branches/MetisMQI/src/main/java/weka/gui/visualize/VisualizePanelEvent.java @ 38

Last change on this file since 38 was 29, checked in by gnappo, 14 years ago

Taggata versione per la demo e aggiunto branch.

File size: 3.0 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 *    VisualizePanelEvent.java
19 *    Copyright (C) 1999 University of Waikato, Hamilton, New Zealand
20 *
21 */
22
23
24package weka.gui.visualize;
25
26import weka.core.*;
27
28
29/**
30 * This event Is fired to a listeners 'userDataEvent' function when
31 * The user on the VisualizePanel clicks submit. It contains the attributes
32 * selected at the time and a FastVector containing the various shapes
33 * that had been drawn into the panel.
34 *
35 * @author Malcolm Ware (mfw4@cs.waikato.ac.nz)
36 * @version $Revision: 1.4 $
37 */
38public class VisualizePanelEvent {
39 
40  /** No longer used */
41  public static int NONE = 0;
42  public static int RECTANGLE = 1;
43  public static int OVAL = 2;
44  public static int POLYGON = 3;
45  public static int LINE = 4;
46  public static int VLINE = 5;
47  public static int HLINE = 6;
48 
49 
50  /** Contains FastVectors, each one containing the points for an object. */
51  private FastVector m_values;
52  /** The instances that fall inside the shapes described in m_values. */
53  private Instances m_inst;
54  /** The instances that fall outside the shapes described in m_values. */
55  private Instances m_inst2;
56  /** The attribute along the x axis. */
57  private int m_attrib1;
58  /** The attribute along the y axis. */
59  private int m_attrib2;
60 
61
62  /**
63   * This constructor creates the event with all the parameters set.
64   * @param ar The list of shapes.
65   * @param i The instances that lie in these shapes.
66   * @param i2 The instances that lie outside these shapes.
67   * @param at1 The attribute that was along the x axis.
68   * @param at2 The attribute that was along the y axis.
69   */
70  public VisualizePanelEvent(FastVector ar, Instances i, Instances i2, int at1,
71                             int at2) {
72    m_values = ar;
73    m_inst = i;
74    m_inst2 = i2;
75    m_attrib1 = at1;
76    m_attrib2 = at2;
77   
78   
79  }
80
81  /**
82   * @return The list of shapes.
83   */
84  public FastVector getValues() {
85    return m_values;
86  }
87 
88  /**
89   * @return The instances that lie in the shapes.
90   */
91  public Instances getInstances1() {
92    return m_inst;
93  }
94 
95  /**
96   * @return The instances that lie outside the shapes.
97   */
98  public Instances getInstances2() {
99    return m_inst2;
100  }
101
102  /**
103   * @return The x axis attribute.
104   */
105  public int getAttribute1() {
106    return m_attrib1;
107  }
108 
109  /**
110   * @return The y axis attribute.
111   */
112  public int getAttribute2() {
113    return m_attrib2;
114  }
115
116
117
118
119
120}
Note: See TracBrowser for help on using the repository browser.