comparison org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/value/IObservableValue.d @ 78:0a55d2d5a946

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