78
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2006, 2008 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.value.IObservableValue;
|
81
|
13 import org.eclipse.core.databinding.observable.value.IValueChangeListener;
|
78
|
14
|
|
15 import java.lang.all;
|
|
16
|
|
17 import org.eclipse.core.databinding.observable.IObservable;
|
|
18 import org.eclipse.core.databinding.observable.Realm;
|
|
19
|
|
20 /**
|
|
21 * A value whose changes can be tracked by value change listeners.
|
|
22 *
|
|
23 * @noextend This interface is not intended to be extended by clients.
|
|
24 * @noimplement This interface is not intended to be implemented by clients.
|
|
25 * Clients should instead subclass one of the classes that
|
|
26 * implement this interface. Note that direct implementers of this
|
|
27 * interface outside of the framework will be broken in future
|
|
28 * releases when methods are added to this interface.
|
|
29 *
|
|
30 * @see AbstractObservableValue
|
|
31 *
|
|
32 * @since 1.0
|
|
33 */
|
|
34 public interface IObservableValue : IObservable {
|
|
35
|
|
36 /**
|
|
37 * The value type of this observable value, or <code>null</code> if this
|
|
38 * observable value is untyped.
|
|
39 *
|
|
40 * @return the value type, or <code>null</null>
|
|
41 */
|
|
42 public Object getValueType();
|
|
43
|
|
44 /**
|
|
45 * Returns the value. Must be invoked in the {@link Realm} of the observable.
|
|
46 *
|
|
47 * @return the current value
|
|
48 * @TrackedGetter
|
|
49 */
|
|
50 public Object getValue();
|
|
51
|
|
52 /**
|
|
53 * Sets the value. Must be invoked in the {@link Realm} of the observable.
|
|
54 *
|
|
55 * @param value
|
|
56 * the value to set
|
|
57 * @throws UnsupportedOperationException
|
|
58 * if this observable value cannot be set.
|
|
59 */
|
|
60 public void setValue(Object value);
|
|
61
|
|
62 /**
|
|
63 *
|
|
64 * @param listener
|
|
65 */
|
|
66 public void addValueChangeListener(IValueChangeListener listener);
|
|
67
|
|
68 /**
|
|
69 * @param listener
|
|
70 */
|
|
71 public void removeValueChangeListener(IValueChangeListener listener);
|
|
72 }
|