78
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2006, 2007 IBM Corporation and others.
|
|
3 * All rights reserved. This program and the accompanying materials
|
|
4 * are made available under the terms of the Eclipse Public License v1.0
|
|
5 * which accompanies this distribution, and is available at
|
|
6 * http://www.eclipse.org/legal/epl-v10.html
|
|
7 *
|
|
8 * Contributors:
|
|
9 * IBM Corporation - initial API and implementation
|
|
10 *******************************************************************************/
|
|
11
|
|
12 module org.eclipse.core.databinding.observable.ChangeEvent;
|
81
|
13 import org.eclipse.core.databinding.observable.IChangeListener;
|
|
14 import org.eclipse.core.databinding.observable.ObservableEvent;
|
|
15 import org.eclipse.core.databinding.observable.IObservable;
|
|
16 import org.eclipse.core.databinding.observable.IObservablesListener;
|
78
|
17
|
|
18 import java.lang.all;
|
|
19
|
|
20 /**
|
|
21 * Generic change event denoting that the state of an {@link IObservable} object
|
|
22 * has changed. This event does not carry information about the kind of change
|
|
23 * that occurred.
|
|
24 *
|
|
25 * @since 1.0
|
|
26 *
|
|
27 */
|
|
28 public class ChangeEvent : ObservableEvent {
|
|
29
|
|
30 /**
|
|
31 *
|
|
32 */
|
85
|
33 private static const long serialVersionUID = -3241193109844979384L;
|
|
34 static const Object TYPE;
|
|
35 static this(){
|
|
36 TYPE = new Object();
|
|
37 }
|
78
|
38
|
|
39 /**
|
|
40 * Creates a new change event object.
|
|
41 *
|
|
42 * @param source
|
|
43 * the observable that changed state
|
|
44 */
|
|
45 public this(IObservable source) {
|
|
46 super(source);
|
|
47 }
|
|
48
|
|
49 protected void dispatch(IObservablesListener listener) {
|
|
50 (cast(IChangeListener) listener).handleChange(this);
|
|
51 }
|
|
52
|
|
53 protected Object getListenerType() {
|
|
54 return TYPE;
|
|
55 }
|
|
56
|
|
57 }
|