KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > databinding > observable > value > IObservableValue


1 /*******************************************************************************
2  * Copyright (c) 2006 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 package org.eclipse.core.databinding.observable.value;
13
14 import org.eclipse.core.databinding.observable.IObservable;
15 import org.eclipse.core.databinding.observable.Realm;
16
17 /**
18  * A value whose changes can be tracked by value change listeners.
19  *
20  * <p>
21  * This interface is not intended to be implemented by clients. Clients should
22  * instead subclass one of the classes that implement this interface. Note that
23  * direct implementers of this interface outside of the framework will be broken
24  * in future releases when methods are added to this interface.
25  * </p>
26  *
27  * @since 1.0
28  *
29  */

30 public interface IObservableValue extends IObservable {
31
32     /**
33      * The value type of this observable value, or <code>null</code> if this
34      * observable value is untyped.
35      *
36      * @return the value type, or <code>null</null>
37      */

38     public Object JavaDoc getValueType();
39
40     /**
41      * Returns the value. Must be invoked in the {@link Realm} of the observable.
42      *
43      * @return the current value
44      * @TrackedGetter
45      */

46     public Object JavaDoc getValue();
47
48     /**
49      * Sets the value. Must be invoked in the {@link Realm} of the observable.
50      *
51      * @param value
52      * the value to set
53      * @throws UnsupportedOperationException
54      * if this observable value cannot be set.
55      */

56     public void setValue(Object JavaDoc value);
57
58     /**
59      *
60      * @param listener
61      */

62     public void addValueChangeListener(IValueChangeListener listener);
63
64     /**
65      * @param listener
66      */

67     public void removeValueChangeListener(IValueChangeListener listener);
68 }
69
Popular Tags