01: /*
02: * This program is free software; you can redistribute it and/or modify
03: * it under the terms of the GNU General Public License as published by
04: * the Free Software Foundation; either version 2 of the License, or
05: * (at your option) any later version.
06: *
07: * This program is distributed in the hope that it will be useful,
08: * but WITHOUT ANY WARRANTY; without even the implied warranty of
09: * 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: * GraphEvent.java
19: * Copyright (C) 2002 University of Waikato, Hamilton, New Zealand
20: *
21: */
22:
23: package weka.gui.beans;
24:
25: import java.util.EventObject;
26:
27: /**
28: * Event for graphs
29: *
30: * @author <a href="mailto:mhall@cs.waikato.ac.nz">Mark Hall</a>
31: * @version $Revision: 1.5 $
32: */
33: public class GraphEvent extends EventObject {
34:
35: /** for serialization */
36: private static final long serialVersionUID = 2099494034652519986L;
37:
38: protected String m_graphString;
39: protected String m_graphTitle;
40: protected int m_graphType;
41:
42: /**
43: * Creates a new <code>GraphEvent</code> instance.
44: *
45: * @param source the source of the event
46: * @param graphString a string describing the graph in "dot" format
47: * @param graphTitle the title for the graph
48: * @param graphType the type for the graph
49: */
50: public GraphEvent(Object source, String graphString,
51: String graphTitle, int graphType) {
52: super (source);
53: m_graphString = graphString;
54: m_graphTitle = graphTitle;
55: m_graphType = graphType;
56: }
57:
58: /**
59: * Return the dot string for the graph
60: *
61: * @return a <code>String</code> value
62: */
63: public String getGraphString() {
64: return m_graphString;
65: }
66:
67: /**
68: * Return the graph title
69: *
70: * @return a <code>String</code> value
71: */
72: public String getGraphTitle() {
73: return m_graphTitle;
74: }
75:
76: /**
77: * Return the graph type
78: *
79: * @return a <code>int</code> value
80: */
81: public int getGraphType() {
82: return m_graphType;
83: }
84: }
|