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.
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.
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.
18
* TreeDisplayEvent.java
19
* Copyright (C) 1999 University of Waikato, Hamilton, New Zealand
23
package weka.gui.treevisualizer;
27
* An event containing the user selection from the tree display
29
* @author Malcolm Ware (mfw4@cs.waikato.ac.nz)
30
* @version $Revision: 1.4 $
32
public class TreeDisplayEvent {
33
public static final int NO_COMMAND = 0;
34
public static final int ADD_CHILDREN = 1;
35
public static final int REMOVE_CHILDREN = 2;
37
/** States that the user has accepted the tree. */
38
public static final int ACCEPT = 3;
40
/** Asks for another learning scheme to classify this node. */
41
public static final int CLASSIFY_CHILD = 4;
43
/** Command to remove instances from this node and send them to the
45
public static final int SEND_INSTANCES = 5;
47
/** The int representing the action. */
48
private int m_command;
50
/** The id string for the node to alter. */
51
private String m_nodeId;
54
* Constructs an event with the specified command
55
* and what the command is applied to.
56
* @param ar The event type.
57
* @param id The id string for the node to perform the action on.
59
public TreeDisplayEvent(int ar, String id) {
61
if (ar == 1 || ar == 2 || ar == 3 || ar == 4 || ar == 5) {
62
//then command is good
69
* @return The command.
71
public int getCommand() {
76
* @return The id of the node.
78
public String getID() {