|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.edit.provider.DecoratorAdapterFactory
public abstract class DecoratorAdapterFactory
This abstract class provides support for creating IItemProviderDecorator
s
for the adapters created by another AdapterFactory
.
Field Summary | |
---|---|
protected ChangeNotifier |
changeNotifier
This keeps track of all the Viewers. |
protected AdapterFactory |
decoratedAdapterFactory
This keeps the AdapterFactory being decorated. |
protected java.util.HashMap<java.lang.Object,IItemProviderDecorator> |
itemProviderDecorators
|
protected ComposedAdapterFactory |
parentAdapterFactory
This is used to implement the ComposeableAdapterFactory interface. |
Constructor Summary | |
---|---|
DecoratorAdapterFactory(AdapterFactory decoratedAdapterFactory)
This creates an instance that decorates the adapters from the given adapter factory. |
Method Summary | |
---|---|
Adapter |
adapt(Notifier target,
java.lang.Object type)
This delegates to adapt(Object,Object) |
java.lang.Object |
adapt(java.lang.Object target,
java.lang.Object type)
All adapter creation is delegated to this method, which yields decorated item providers. |
void |
adaptAllNew(Notifier target)
Creates a new associated adapter of each type of adapter supported by this factory, as necessary. |
Adapter |
adaptNew(Notifier target,
java.lang.Object type)
This interface is not support; an exception will be thrown. |
void |
addListener(INotifyChangedListener notifyChangedListener)
This adds another listener. |
protected abstract IItemProviderDecorator |
createItemProviderDecorator(java.lang.Object target,
java.lang.Object Type)
This is called when a new decorator is needed by adapt(Object,Object) . |
void |
dispose()
This is called to dispose the object. |
void |
fireNotifyChanged(Notification notification)
This calls notifyChanged for each listener. |
AdapterFactory |
getDecoratedAdapterFactory()
This returns the adapter factory whose adapters are being decorated. |
ComposeableAdapterFactory |
getRootAdapterFactory()
This returns the root adapter factory that delegates to this factory. |
boolean |
isFactoryForType(java.lang.Object type)
This just delegates to the decoratedAdapterFactory . |
void |
removeListener(INotifyChangedListener notifyChangedListener)
This removes a listener. |
void |
setDecoratedAdapterFactory(AdapterFactory decoratedAdapterFactory)
This sets the adapter factory whose adapters will be decorated. |
void |
setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
This sets the direct parent adapter factory into which this factory is composed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.HashMap<java.lang.Object,IItemProviderDecorator> itemProviderDecorators
protected AdapterFactory decoratedAdapterFactory
AdapterFactory
being decorated.
protected ComposedAdapterFactory parentAdapterFactory
ComposeableAdapterFactory
interface.
protected ChangeNotifier changeNotifier
Constructor Detail |
---|
public DecoratorAdapterFactory(AdapterFactory decoratedAdapterFactory)
Method Detail |
---|
public boolean isFactoryForType(java.lang.Object type)
decoratedAdapterFactory
.
isFactoryForType
in interface AdapterFactory
type
- the key indicating the type of adapter in question.
Adapter.isAdapterForType(java.lang.Object)
public AdapterFactory getDecoratedAdapterFactory()
public void setDecoratedAdapterFactory(AdapterFactory decoratedAdapterFactory)
protected abstract IItemProviderDecorator createItemProviderDecorator(java.lang.Object target, java.lang.Object Type)
adapt(Object,Object)
.
public java.lang.Object adapt(java.lang.Object target, java.lang.Object type)
createItemProviderDecorator(java.lang.Object, java.lang.Object)
to the adapters returned by decoratedAdapterFactory
.
adapt
in interface AdapterFactory
target
- arbitrary object to adapt.type
- the key indicating the type of adapter required.
public Adapter adapt(Notifier target, java.lang.Object type)
adapt(Object,Object)
adapt
in interface AdapterFactory
target
- the notifier to adapt.type
- the key indicating the type of adapter required.
Adapter.setTarget(org.eclipse.emf.common.notify.Notifier)
,
AdapterFactory.adaptNew(org.eclipse.emf.common.notify.Notifier, java.lang.Object)
public Adapter adaptNew(Notifier target, java.lang.Object type)
adaptNew
in interface AdapterFactory
target
- the notifier to adapt.type
- the key indicating the type of adapter required.
Adapter.setTarget(org.eclipse.emf.common.notify.Notifier)
,
Notifier.eAdapters()
public void adaptAllNew(Notifier target)
AdapterFactory
adaptAllNew
in interface AdapterFactory
target
- notifier to adapt.AdapterFactory.adaptNew(org.eclipse.emf.common.notify.Notifier, java.lang.Object)
public ComposeableAdapterFactory getRootAdapterFactory()
getRootAdapterFactory
in interface ComposeableAdapterFactory
public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
setParentAdapterFactory
in interface ComposeableAdapterFactory
public void addListener(INotifyChangedListener notifyChangedListener)
IChangeNotifier
addListener
in interface IChangeNotifier
public void removeListener(INotifyChangedListener notifyChangedListener)
IChangeNotifier
removeListener
in interface IChangeNotifier
public void fireNotifyChanged(Notification notification)
IChangeNotifier
notifyChanged
for each listener.
fireNotifyChanged
in interface IChangeNotifier
public void dispose()
IDisposable
dispose
in interface IDisposable
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |