public class TreeCompareInputAdapterFactory extends TreeAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable
Modifier and Type | Field and Description |
---|---|
protected IChangeNotifier |
changeNotifier
This is used to implement
IChangeNotifier . |
protected Disposable |
disposable
This is used to implement
IDisposable . |
protected ComposedAdapterFactory |
parentAdapterFactory
This keeps track of the root adapter factory that delegates to this adapter factory.
|
protected Collection<Object> |
supportedTypes
This keeps track of all the supported types checked by
isFactoryForType . |
modelPackage, modelSwitch
Constructor and Description |
---|
TreeCompareInputAdapterFactory()
Creates an
ComposeableAdapterFactory with the following supported types:
ICompareInput . |
Modifier and Type | Method and Description |
---|---|
Adapter |
adapt(Notifier notifier,
Object type)
This implementation substitutes the factory itself as the key for the adapter.
|
Object |
adapt(Object object,
Object type) |
Adapter |
adaptNew(Notifier object,
Object type)
This records adapters for subsequent disposable.
|
void |
addListener(INotifyChangedListener notifyChangedListener)
This adds a listener.
|
Adapter |
createTreeNodeAdapter() |
void |
dispose()
This disposes all the disposables.
|
void |
fireNotifyChanged(Notification notification)
This delegates to
changeNotifier and to parentAdapterFactory . |
ComposeableAdapterFactory |
getRootAdapterFactory()
This returns the root adapter factory that contains this factory.
|
boolean |
isFactoryForType(Object type) |
void |
removeListener(INotifyChangedListener notifyChangedListener)
This removes a listener.
|
void |
setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
This sets the direct parent adapter factory into which this factory is composed.
|
createAdapter, createEObjectAdapter
adaptAllNew, associate, createAdapter, resolve
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
adaptAllNew
protected ComposedAdapterFactory parentAdapterFactory
protected final IChangeNotifier changeNotifier
IChangeNotifier
.protected Disposable disposable
IDisposable
.protected final Collection<Object> supportedTypes
isFactoryForType
.public TreeCompareInputAdapterFactory()
ComposeableAdapterFactory
with the following supported types:
ICompareInput
grouper
- This will be used by the comparison adapter to group differences together.public boolean isFactoryForType(Object type)
isFactoryForType
in interface AdapterFactory
isFactoryForType
in class TreeAdapterFactory
AdapterFactory.isFactoryForType(java.lang.Object)
public Adapter adapt(Notifier notifier, Object type)
adapt
in interface AdapterFactory
adapt
in class AdapterFactoryImpl
notifier
- the notifier to adapttype
- unusednull
otherwise.public Object adapt(Object object, Object type)
adapt
in interface AdapterFactory
adapt
in class AdapterFactoryImpl
AdapterFactoryImpl.adapt(java.lang.Object, java.lang.Object)
public ComposeableAdapterFactory getRootAdapterFactory()
getRootAdapterFactory
in interface ComposeableAdapterFactory
public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
setParentAdapterFactory
in interface ComposeableAdapterFactory
parentAdapterFactory
- the direct parent adapter factory into which this factory is composedpublic Adapter createTreeNodeAdapter()
createTreeNodeAdapter
in class TreeAdapterFactory
TreeAdapterFactory.createTreeNodeAdapter()
public Adapter adaptNew(Notifier object, Object type)
adaptNew
in interface AdapterFactory
adaptNew
in class AdapterFactoryImpl
public void addListener(INotifyChangedListener notifyChangedListener)
addListener
in interface IChangeNotifier
public void removeListener(INotifyChangedListener notifyChangedListener)
removeListener
in interface IChangeNotifier
public void fireNotifyChanged(Notification notification)
changeNotifier
and to parentAdapterFactory
.fireNotifyChanged
in interface IChangeNotifier
public void dispose()
dispose
in interface IDisposable
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.