1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.cb.jset.client.model;
21
22 import org.cb.cardboard.Card;
23
24 import java.util.EventObject;
25
26 /***
27 * Event related to the change of state of a card.
28 *
29 * @author jerome@coffeebreaks.org - last modified by $LastChangedBy: jerome $
30 * @version $Id: CardEvent.java 123 2004-04-14 23:45:53Z jerome $
31 */
32 public class CardEvent extends EventObject
33 {
34 /*** the type of a selection event. */
35 public static final int SELECTED = 1;
36 /*** the type of a deselection event. */
37 public static final int DESELECTED = 2;
38 /*** the type of the event. */
39 private final int _type;
40
41 /***
42 * Constructs an instance of <code>CardEvent</code>, given the specified source and type.
43 * @param source
44 * @param type
45 */
46 public CardEvent(final Card source, final int type)
47 {
48 super(source);
49 _type = type;
50 }
51
52 /***
53 * @return the type of the event
54 */
55 public int getType()
56 {
57 return _type;
58 }
59 }