1 | public class SessionEvent extends EventObject↵ | | 1 | public class ObjectTreeListenerEvent extends EventObject
↵
|
2 | {↵ | | 2 | {
↵
|
3 | /** The <CODE>ISession</CODE> involved. */↵ | | 3 | /** The <CODE>ObjectTree</CODE> involved. */
↵
|
4 | private ISession _session;↵ | | 4 | private ↵
|
| | | 5 | ObjectTree _tree;↵
|
| | | 6 |
↵
|
5 | /**↵ | | 7 | /**
↵
|
6 | * Ctor.↵ | | 8 | * Ctor.
↵
|
7 | *↵ | | 9 | *
↵
|
8 | * @param source The <CODE>ISession</CODE> that change has happened to.↵ | | 10 | * @param source The <CODE>ObjectTree</CODE> that change has happened to.
↵
|
9 | *↵ | | 11 | *
↵
|
10 | * @throws IllegalArgumentException↵ | | 12 | * @throws IllegalArgumentException
↵
|
11 | * Thrown if <TT>null</TT>ISession/TT> passed.↵ | | 13 | * Thrown if <TT>null</TT>ObjectTree/TT> passed.
↵
|
12 | */↵ | | 14 | */
↵
|
13 | public SessionEvent(ISession source)↵ | | 15 | ObjectTreeListenerEvent(ObjectTree source)
↵
|
14 | {↵ | | 16 | {
↵
|
15 | super(checkParams(source));↵ | | 17 | super(checkParams(source));
↵
|
16 | _session = source;↵ | | 18 | _tree = source;
↵
|
17 | }↵ | | 19 | }↵
|
|
| | | 20 |
↵
|
18 | /**↵ | | 21 | /**
↵
|
19 | * Return the <CODE>ISession</CODE>.↵ | | 22 | * Return the <CODE>ObjectTree</CODE>.
↵
|
20 | */↵ | | 23 | */
↵
|
21 | public ISession getSession()↵ | | 24 | public ObjectTree getObjectTree()
↵
|
22 | {↵ | | 25 | {
↵
|
23 | return _session;↵ | | 26 | return _↵
|
24 | }↵ | | |
|
| | | 27 | tree;↵
|
| | | 28 | }↵
|
| | | 29 |
↵
|
25 | private static ISession checkParams(ISession source)↵ | | 30 | private static ObjectTree checkParams(ObjectTree source)
↵
|
26 | {↵ | | 31 | {
↵
|
27 | if (source == null)↵ | | 32 | if (source == null)
↵
|
28 | {↵ | | 33 | {
↵
|
29 | throw new IllegalArgumentException("ISession == null");↵ | | 34 | throw new IllegalArgumentException("ObjectTree == null");
↵
|
30 | }↵ | | 35 | }
↵
|
31 | return source | | 36 | return source
|