Source code: javax/ide/IDEEvent.java
1 package javax.ide;
2
3 import java.util.EventObject;
4
5 /**
6 * The IDEEvent is the parameter passed to the {@link IDEListener}
7 * methods when the active state of the IDE application has changed. <p>
8 *
9 * The <code>IDEEvent</code> source is the IDE instance whose state
10 * is changing. The convenience method {@link #getIDE} can be used to
11 * retrieve the IDE instance.
12 */
13 public final class IDEEvent extends EventObject
14 {
15 /**
16 * Constructor.
17 *
18 * @param ide the IDE where the event happened.
19 */
20 public IDEEvent( IDE ide )
21 {
22 super(ide);
23 }
24
25 /**
26 * Get the {@link IDE} where the event happened.
27 * This is functionally equivalent to casting the result of getSource() to
28 * a <code>IDE</code> object.
29 *
30 * @return the {@link IDE} whose state has changed.
31 */
32 public IDE getIDE()
33 {
34 return (IDE)getSource();
35 }
36 }