source: trunk/src/org/expeditee/items/ItemParentStateChangedEvent.java@ 284

Last change on this file since 284 was 169, checked in by bjn8, 16 years ago

Improvements for widgets and popups

File size: 1.3 KB
Line 
1package org.expeditee.items;
2
3import org.expeditee.gui.Frame;
4
5/**
6 * Raised whenever the items parent (Frame) changes - when the frame is no longer in view
7 * or becomes in view, or if the item has no parent / has a new parent.
8 *
9 * @author Brook Novak
10 *
11 */
12public class ItemParentStateChangedEvent {
13
14 private Frame _src;
15 private Permission _overlayLevel;
16 private int _eventType;
17
18 public static final int EVENT_TYPE_SHOWN = 1;
19 public static final int EVENT_TYPE_SHOWN_VIA_OVERLAY = 2;
20 public static final int EVENT_TYPE_HIDDEN = 3;
21 public static final int EVENT_TYPE_ADDED = 4;
22 public static final int EVENT_TYPE_ADDED_VIA_OVERLAY = 5;
23 public static final int EVENT_TYPE_REMOVED = 6;
24 public static final int EVENT_TYPE_REMOVED_VIA_OVERLAY = 7;
25
26
27 public ItemParentStateChangedEvent(Frame src, int eventType) {
28 this(src, eventType, Permission.none);
29 }
30
31 public ItemParentStateChangedEvent(Frame src, int eventType, Permission overlayLevel) {
32 _src = src;
33 _overlayLevel = overlayLevel;
34 _eventType = eventType;
35 }
36
37 /**
38 *
39 * @return
40 */
41 public Permission getOverlayLevel() {
42 return _overlayLevel;
43 }
44
45 /**
46 * The parent that the item has been added to, removed from, shown on or hidden on.
47 * @return
48 */
49 public Frame getSource() {
50 return _src;
51 }
52
53 public int getEventType() {
54 return _eventType;
55 }
56
57
58
59}
Note: See TracBrowser for help on using the repository browser.