1 | class ViewUpdate extends EBMessage↵ | | 1 | class EditPaneUpdate extends EBMessage↵
|
2 | {↵ | | 2 | {↵
|
3 | /**↵ | | 3 | /**↵
|
4 | * View created.↵ | | 4 | * Edit pane created.↵
|
5 | */↵ | | 5 | */↵
|
6 | public static final Object CREATED = "CREATED";↵ | | 6 | public static final Object CREATED = "CREATED";↵
|
|
7 | /**↵ | | 7 | /**↵
|
8 | * View closed.↵ | | 8 | * Edit pane destroyed.↵
|
9 | */↵ | | 9 | */↵
|
10 | public static final Object CLOSED = "CLOSED";↵ | | 10 | public static final Object DESTROYED = "DESTROYED";↵
|
|
11 | /**↵ | | 11 | /**↵
|
12 | * Active edit pane changed.↵ | | 12 | * Edit pane buffer changed.↵
|
13 | * @since jEdit 4.1pre1↵ | | 13 | ↵
|
14 | */↵ | | 14 | */↵
|
15 | public static final Object EDIT_PANE_CHANGED = "EDIT_PANE_CHANGED";↵ | | 15 | public static final Object BUFFER_CHANGED = "BUFFER_CHANGED";↵
|
|
16 | //{{{ ViewUpdate constructor↵ | | |
|
17 | /**↵ | | 16 | /**↵
|
18 | * Creates a new view update message.↵ | | 17 | * Creates a new edit pane update message.↵
|
19 | * @param view The view↵ | | 18 | * @param editPane The edit pane↵
|
20 | * @param what What happened↵ | | 19 | * @param what What happened↵
|
21 | */↵ | | 20 | */↵
|
22 | public ViewUpdate(View view, Object what)↵ | | 21 | public EditPaneUpdate(EditPane editPane, Object what)↵
|
23 | {↵ | | 22 | {↵
|
24 | super(view);↵ | | 23 | super(editPane);↵
|
|
25 | if(what == null)↵ | | 24 | if(what == null)↵
|
26 | throw new NullPointerException("What must be non-null");↵ | | 25 | throw new NullPointerException("What must be non-null");↵
|
|
27 | this.what = what;↵ | | 26 | this.what = what;↵
|
28 | } //}}}↵ | | 27 | }↵
|
|
29 | //{{{ getWhat() method↵ | | |
|
|
30 | /**↵ | | 28 | /**↵
|
31 | * Returns what caused this view update.↵ | | 29 | * Returns what caused this edit pane update.↵
|
32 | */↵ | | 30 | */↵
|
33 | public Object getWhat()↵ | | 31 | public Object getWhat()↵
|
34 | {↵ | | 32 | {↵
|
35 | return what;↵ | | 33 | return what;↵
|
36 | } //}}}↵ | | 34 | }↵
|
|
37 | //{{{ getView() method↵ | | |
|
|
38 | /**↵ | | 35 | /**↵
|
39 | * Returns the view involved.↵ | | 36 | * Returns the edit pane involved.↵
|
40 | */↵ | | 37 | */↵
|
41 | public View getView()↵ | | 38 | public EditPane getEditPane()↵
|
42 | {↵ | | 39 | {↵
|
43 | return (View)getSource();↵ | | 40 | return (EditPane)getSource();↵
|
44 | } //}}}↵ | | 41 | }↵
|
|
45 | //{{{ paramString() method↵ | | |
|
|
46 | public String paramString()↵ | | 42 | public String paramString()↵
|
47 | {↵ | | 43 | {↵
|
48 | return "what=" + what + "," + super.paramString();↵ | | 44 | return "what=" + what + "," + super.paramString();↵
|
49 | } //}}}↵ | | 45 | }↵
|
|
50 | //{{{ P↵ | | |
|
|
51 | rivate members↵ | | 46 | // private members↵
|
52 | private Object what;↵ | | 47 | private Object what;↵
|
53 | //}}}↵ | | |
|
54 | } | | 48 | }
|