Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/* SelectionChangeEvent.java
*
* created: Tue Oct 27 1998
*
* This file is part of Artemis
*
* Copyright (C) 1998,1999,2000 Genome Research Limited
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/SelectionChangeEvent.java,v 1.1 2004-06-09 09:45:05 tjc Exp $
**/
package uk.ac.sanger.artemis;
/**
* This event is sent when the currently selected object changes.
*
* @author Kim Rutherford
* @version $Id: SelectionChangeEvent.java,v 1.1 2004-06-09 09:45:05 tjc Exp $
**/
public class SelectionChangeEvent extends ChangeEvent {
/**
* Create a new SelectionChangeEvent object.
* @param source The Object that generated the event - probably a component.
* @param type The type of event. Should be one of OBJECT_ADDED,
* OBJECT_REMOVED or OBJECT_CHANGED.
**/
public SelectionChangeEvent (final Object source,
final int type) {
super (source);
this.type = type;
}
/**
* Return the type that was passed to the constructor.
**/
public int getType () {
return type;
}
/**
* Flag used when the event is caused by the addition or removal of an
* object from the selection.
**/
public final static int SELECTION_CHANGED = 1;
/**
* Flag used for all other events. Examples include the case when a
* qualifier or location changes for a selected feature.
**/
public final static int OBJECT_CHANGED = 3;
/**
* The event type that was passed to the constructor.
**/
private int type;
}