Last change
on this file since 55 was 55, checked in by davidb, 16 years ago |
Fixed bug with widgets movement and scaling
|
File size:
1.3 KB
|
Line | |
---|
1 | package org.expeditee.items;
|
---|
2 |
|
---|
3 | import 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 | * @author Brook Novak
|
---|
9 | *
|
---|
10 | */
|
---|
11 | public class ItemParentStateChangedEvent {
|
---|
12 |
|
---|
13 | private Frame _src;
|
---|
14 | private int _overlayLevel;
|
---|
15 | private int _eventType;
|
---|
16 |
|
---|
17 | public static final int EVENT_TYPE_SHOWN = 1;
|
---|
18 | public static final int EVENT_TYPE_SHOWN_VIA_OVERLAY = 2;
|
---|
19 | public static final int EVENT_TYPE_HIDDEN = 3;
|
---|
20 | public static final int EVENT_TYPE_ADDED = 4;
|
---|
21 | public static final int EVENT_TYPE_ADDED_VIA_OVERLAY = 5;
|
---|
22 | public static final int EVENT_TYPE_REMOVED = 6;
|
---|
23 | public static final int EVENT_TYPE_REMOVED_VIA_OVERLAY = 7;
|
---|
24 |
|
---|
25 | public ItemParentStateChangedEvent(Frame src, int eventType) {
|
---|
26 | this(src, eventType, 0);
|
---|
27 | }
|
---|
28 |
|
---|
29 | public ItemParentStateChangedEvent(Frame src, int eventType, int overlayLevel) {
|
---|
30 | _src = src;
|
---|
31 | _overlayLevel = overlayLevel;
|
---|
32 | _eventType = eventType;
|
---|
33 | }
|
---|
34 |
|
---|
35 | /**
|
---|
36 | *
|
---|
37 | * @return
|
---|
38 | */
|
---|
39 | public int getOverlayLevel() {
|
---|
40 | return _overlayLevel;
|
---|
41 | }
|
---|
42 |
|
---|
43 | /**
|
---|
44 | * The parent that the item has been added to, removed from, shown on or hidden on.
|
---|
45 | * @return
|
---|
46 | */
|
---|
47 | public Frame getSource() {
|
---|
48 | return _src;
|
---|
49 | }
|
---|
50 |
|
---|
51 | public int getEventType() {
|
---|
52 | return _eventType;
|
---|
53 | }
|
---|
54 |
|
---|
55 |
|
---|
56 |
|
---|
57 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.