KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > internal > databinding > provisional > observable > mapping > AbstractObservableMapping


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.jface.internal.databinding.provisional.observable.mapping;
13
14
15 import org.eclipse.jface.internal.databinding.provisional.observable.ObservableTracker;
16
17 /**
18  * @since 1.0
19  *
20  */

21 public abstract class AbstractObservableMapping extends BaseObservableMapping
22         implements IObservableMapping {
23
24     final public Object JavaDoc getMappingValue(Object JavaDoc element) {
25         ObservableTracker.getterCalled(this);
26         return doGetMappingValue(element);
27     }
28     
29     public void setMappingValue(Object JavaDoc element, Object JavaDoc value) {
30         throw new UnsupportedOperationException JavaDoc();
31     }
32
33     /**
34      * @return the value of this mapping for the given element
35      */

36     abstract protected Object JavaDoc doGetMappingValue(Object JavaDoc element);
37
38     public boolean isStale() {
39         return false;
40     }
41     
42     public void dispose() {
43         mappingChangeListeners = null;
44         super.dispose();
45     }
46 }
47
Popular Tags