Skip to main content
summaryrefslogtreecommitdiffstats
blob: 80c57c2a24ca6511a727fe4e5e86d9d27e0d6131 (plain) (blame)
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
/*******************************************************************************
 *  Copyright (c) 2006, 2007 Oracle. All rights reserved. This
 *  program and the accompanying materials are made available under the terms of
 *  the Eclipse Public License v1.0 which accompanies this distribution, and is
 *  available at http://www.eclipse.org/legal/epl-v10.html
 *  
 *  Contributors: Oracle. - initial API and implementation
 *  
 *******************************************************************************/
package org.eclipse.jpt.ui.internal.selection;

import java.util.EventObject;

public class JpaSelectionEvent extends EventObject 
{
	/**
	 * Serializable uid
	 * @since 0.5
	 */
	private static final long serialVersionUID = 1L;
    
	
	/**
	 * Indicates that the selection object is now selected
	 */
	public static int SELECTION = 1;
	
	/**
	 * Indicates that the selection object has now been deselected
	 */
	public static int DESELECTION = 2;
	
	
	/**
	 * The selection object whose selection status has changed
	 */
	private JpaSelection selection;
	
	/**
	 * The type of the selection event, either a SELECTION or a DESELECTION
	 */
	private int type;
	
	
	public JpaSelectionEvent(JpaSelection theSelection, int theType, Object source) {
		super(source);
		selection = theSelection;
		type = theType;
	}
	
	/**
	 * Return the selection object whose selection status has changed
	 */
	public JpaSelection getSelection() {
		return selection;
	}
	
	/**
	 * Return the type of selection event, either a SELECTION or a DESELECTION
	 */
	public int getType() {
		return type;
	}
}

Back to the top