[29] | 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 | * 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 |
---|
| 34 | extends EventObject { |
---|
| 35 | |
---|
| 36 | /** for serialization */ |
---|
| 37 | private static final long serialVersionUID = 2099494034652519986L; |
---|
| 38 | |
---|
| 39 | protected String m_graphString; |
---|
| 40 | protected String m_graphTitle; |
---|
| 41 | protected int m_graphType; |
---|
| 42 | |
---|
| 43 | /** |
---|
| 44 | * Creates a new <code>GraphEvent</code> instance. |
---|
| 45 | * |
---|
| 46 | * @param source the source of the event |
---|
| 47 | * @param graphString a string describing the graph in "dot" format |
---|
| 48 | * @param graphTitle the title for the graph |
---|
| 49 | * @param graphType the type for the graph |
---|
| 50 | */ |
---|
| 51 | public GraphEvent(Object source, String graphString, |
---|
| 52 | String graphTitle, int graphType) { |
---|
| 53 | super(source); |
---|
| 54 | m_graphString = graphString; |
---|
| 55 | m_graphTitle = graphTitle; |
---|
| 56 | m_graphType = graphType; |
---|
| 57 | } |
---|
| 58 | |
---|
| 59 | /** |
---|
| 60 | * Return the dot string for the graph |
---|
| 61 | * |
---|
| 62 | * @return a <code>String</code> value |
---|
| 63 | */ |
---|
| 64 | public String getGraphString() { |
---|
| 65 | return m_graphString; |
---|
| 66 | } |
---|
| 67 | |
---|
| 68 | /** |
---|
| 69 | * Return the graph title |
---|
| 70 | * |
---|
| 71 | * @return a <code>String</code> value |
---|
| 72 | */ |
---|
| 73 | public String getGraphTitle() { |
---|
| 74 | return m_graphTitle; |
---|
| 75 | } |
---|
| 76 | |
---|
| 77 | /** |
---|
| 78 | * Return the graph type |
---|
| 79 | * |
---|
| 80 | * @return a <code>int</code> value |
---|
| 81 | */ |
---|
| 82 | public int getGraphType() { |
---|
| 83 | return m_graphType; |
---|
| 84 | } |
---|
| 85 | } |
---|