Eclipse Platform
Kepler (4.3)

org.eclipse.core.databinding.observable.map
Class DecoratingObservableMap

java.lang.Object
  extended by org.eclipse.core.databinding.observable.AbstractObservable
      extended by org.eclipse.core.databinding.observable.DecoratingObservable
          extended by org.eclipse.core.databinding.observable.map.DecoratingObservableMap
All Implemented Interfaces:
java.util.Map, IDecoratingObservable, IObservable, IObservableMap
Direct Known Subclasses:
BidiObservableMap

public class DecoratingObservableMap
extends DecoratingObservable
implements IObservableMap

An observable map which decorates another observable map.

Since:
1.2

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
DecoratingObservableMap(IObservableMap decorated, boolean disposeDecoratedOnDispose)
          Constructs a DecoratingObservableMap which decorates the given observable.
 
Method Summary
protected  void addListener(java.lang.Object listenerType, IObservablesListener listener)
           
 void addMapChangeListener(IMapChangeListener listener)
           
 void clear()
           
protected  java.lang.Object clone()
           
 boolean containsKey(java.lang.Object key)
           
 boolean containsValue(java.lang.Object value)
           
 void dispose()
          Disposes of this observable object, removing all listeners registered with this object, and all listeners this object might have registered on other objects.
 java.util.Set entrySet()
           
 boolean equals(java.lang.Object obj)
           
protected  void fireChange()
           
protected  void fireEvent(ObservableEvent event)
           
protected  void fireMapChange(MapDiff diff)
           
protected  void firstListenerAdded()
           
 java.lang.Object get(java.lang.Object key)
           
 java.lang.Object getKeyType()
          Returns the element type for the keyset of this observable map, or null if the keyset is untyped.
 Realm getRealm()
           
 java.lang.Object getValueType()
          Returns the element type for the values of this observable map, or null if the values collection is untyped.
protected  void handleMapChange(MapChangeEvent event)
          Called whenever a MapChangeEvent is received from the decorated observable.
 int hashCode()
           
protected  boolean hasListeners()
           
 boolean isEmpty()
           
 java.util.Set keySet()
           
protected  void lastListenerRemoved()
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
           
 void putAll(java.util.Map m)
           
 java.lang.Object remove(java.lang.Object key)
           
protected  void removeListener(java.lang.Object listenerType, IObservablesListener listener)
           
 void removeMapChangeListener(IMapChangeListener listener)
           
 int size()
           
 java.lang.String toString()
           
 java.util.Collection values()
           
 
Methods inherited from class org.eclipse.core.databinding.observable.DecoratingObservable
getDecorated, getterCalled, handleStaleEvent, isStale
 
Methods inherited from class org.eclipse.core.databinding.observable.AbstractObservable
addChangeListener, addDisposeListener, addStaleListener, checkRealm, fireStale, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.core.databinding.observable.IObservable
addChangeListener, addDisposeListener, addStaleListener, getRealm, isDisposed, isStale, removeChangeListener, removeDisposeListener, removeStaleListener
 

Constructor Detail

DecoratingObservableMap

public DecoratingObservableMap(IObservableMap decorated,
                               boolean disposeDecoratedOnDispose)
Constructs a DecoratingObservableMap which decorates the given observable.

Parameters:
decorated - the observable map being decorated
disposeDecoratedOnDispose -
Method Detail

addMapChangeListener

public void addMapChangeListener(IMapChangeListener listener)
Specified by:
addMapChangeListener in interface IObservableMap

removeMapChangeListener

public void removeMapChangeListener(IMapChangeListener listener)
Specified by:
removeMapChangeListener in interface IObservableMap

getKeyType

public java.lang.Object getKeyType()
Description copied from interface: IObservableMap
Returns the element type for the keyset of this observable map, or null if the keyset is untyped.

Specified by:
getKeyType in interface IObservableMap
Returns:
the element type for the keyset of this observable map, or null if the keyset is untyped.

getValueType

public java.lang.Object getValueType()
Description copied from interface: IObservableMap
Returns the element type for the values of this observable map, or null if the values collection is untyped.

Specified by:
getValueType in interface IObservableMap
Returns:
the element type for the values of this observable map, or null if the values collection is untyped.

fireMapChange

protected void fireMapChange(MapDiff diff)

fireChange

protected void fireChange()
Overrides:
fireChange in class AbstractObservable

firstListenerAdded

protected void firstListenerAdded()
Overrides:
firstListenerAdded in class DecoratingObservable

lastListenerRemoved

protected void lastListenerRemoved()
Overrides:
lastListenerRemoved in class DecoratingObservable

handleMapChange

protected void handleMapChange(MapChangeEvent event)
Called whenever a MapChangeEvent is received from the decorated observable. By default, this method fires the map change event again, with the decorating observable as the event source. Subclasses may override to provide different behavior.

Parameters:
event - the change event received from the decorated observable

clear

public void clear()
Specified by:
clear in interface java.util.Map

containsKey

public boolean containsKey(java.lang.Object key)
Specified by:
containsKey in interface java.util.Map
Specified by:
containsKey in interface IObservableMap

containsValue

public boolean containsValue(java.lang.Object value)
Specified by:
containsValue in interface java.util.Map
Specified by:
containsValue in interface IObservableMap

entrySet

public java.util.Set entrySet()
Specified by:
entrySet in interface java.util.Map
Specified by:
entrySet in interface IObservableMap

get

public java.lang.Object get(java.lang.Object key)
Specified by:
get in interface java.util.Map
Specified by:
get in interface IObservableMap

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Map
Specified by:
isEmpty in interface IObservableMap

keySet

public java.util.Set keySet()
Specified by:
keySet in interface java.util.Map
Specified by:
keySet in interface IObservableMap

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Specified by:
put in interface java.util.Map
Specified by:
put in interface IObservableMap

putAll

public void putAll(java.util.Map m)
Specified by:
putAll in interface java.util.Map

remove

public java.lang.Object remove(java.lang.Object key)
Specified by:
remove in interface java.util.Map
Specified by:
remove in interface IObservableMap

size

public int size()
Specified by:
size in interface java.util.Map
Specified by:
size in interface IObservableMap

values

public java.util.Collection values()
Specified by:
values in interface java.util.Map
Specified by:
values in interface IObservableMap

equals

public boolean equals(java.lang.Object obj)
Specified by:
equals in interface java.util.Map
Specified by:
equals in interface IObservableMap
Overrides:
equals in class DecoratingObservable

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.Map
Specified by:
hashCode in interface IObservableMap
Overrides:
hashCode in class DecoratingObservable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

dispose

public void dispose()
Description copied from interface: IObservable
Disposes of this observable object, removing all listeners registered with this object, and all listeners this object might have registered on other objects.

Specified by:
dispose in interface IObservable
Overrides:
dispose in class DecoratingObservable

addListener

protected void addListener(java.lang.Object listenerType,
                           IObservablesListener listener)
Parameters:
listenerType -
listener -

removeListener

protected void removeListener(java.lang.Object listenerType,
                              IObservablesListener listener)
Parameters:
listenerType -
listener -

hasListeners

protected boolean hasListeners()

fireEvent

protected void fireEvent(ObservableEvent event)

getRealm

public Realm getRealm()
Returns:
Returns the realm.

clone

protected java.lang.Object clone()
                          throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

Eclipse Platform
Kepler (4.3)

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2012. All rights reserved.