|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider
public class AdapterFactoryContentProvider
This content provider wraps an AdapterFactory
and it delegates its JFace provider interfaces to corresponding adapter-implemented item provider interfaces.
All method calls to the various structured content provider interfaces
are delegated to interfaces implemented by the adapters generated by the AdapterFactory.
IStructuredContentProvider
is delegated to
IStructuredItemContentProvider
; ITreeContentProvider
is delegated
to ITreeItemContentProvider
;
and IPropertySourceProvider
to IItemPropertySource
.
Nested Class Summary | |
---|---|
static class |
AdapterFactoryContentProvider.ViewerRefresh
A runnable class that efficiently updates a Viewer via standard APIs, based on
queued IViewerNotification s from the model's item providers. |
Field Summary | |
---|---|
protected AdapterFactory |
adapterFactory
This keeps track of the one factory we are using. |
protected Viewer |
viewer
This keeps track of the one viewer using this content provider. |
protected AdapterFactoryContentProvider.ViewerRefresh |
viewerRefresh
This is used to queue viewer notifications and refresh viewers based on them. |
Constructor Summary | |
---|---|
AdapterFactoryContentProvider(AdapterFactory adapterFactory)
This constructs an instance that wraps this factory. |
Method Summary | |
---|---|
protected IPropertySource |
createPropertySource(java.lang.Object object,
IItemPropertySource itemPropertySource)
|
void |
dispose()
This discards the content provider and removes this as a listener to the adapterFactory . |
AdapterFactory |
getAdapterFactory()
This returns the wrapped factory. |
java.lang.Object[] |
getChildren(java.lang.Object object)
This implements ITreeContentProvider .getChildren to forward the call to an object that implements
ITreeItemContentProvider.getChildren . |
java.lang.Object[] |
getElements(java.lang.Object object)
This implements IStructuredContentProvider .getElements to
forward the call to an object that implements
IStructuredItemContentProvider.getElements . |
java.lang.Object |
getParent(java.lang.Object object)
This implements ITreeContentProvider .getParent to forward the call to an object that implements
ITreeItemContentProvider.getParent . |
IPropertySource |
getPropertySource(java.lang.Object object)
This implements IPropertySourceProvider .getPropertySource to forward the call to an object that implements
IItemPropertySource . |
boolean |
hasChildren(java.lang.Object object)
This implements ITreeContentProvider .hasChildren to forward the call to an object that implements
ITreeItemContentProvider.hasChildren . |
void |
inputChanged(Viewer viewer,
java.lang.Object oldInput,
java.lang.Object newInput)
The given Viewer will start (oldInput == null) or stop (newInput == null) listening for domain events. |
void |
notifyChanged(Notification notification)
|
void |
setAdapterFactory(AdapterFactory adapterFactory)
This sets the wrapped factory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected AdapterFactory adapterFactory
ComposedAdapterFactory
if adapters
from more the one factory are involved in the model.
protected Viewer viewer
protected AdapterFactoryContentProvider.ViewerRefresh viewerRefresh
Constructor Detail |
---|
public AdapterFactoryContentProvider(AdapterFactory adapterFactory)
IChangeNotifier
,
a listener is added to it,
so it's important to call dispose()
.
Method Detail |
---|
public void setAdapterFactory(AdapterFactory adapterFactory)
IChangeNotifier
,
a listener is added to it,
so it's important to call dispose()
.
public AdapterFactory getAdapterFactory()
public void inputChanged(Viewer viewer, java.lang.Object oldInput, java.lang.Object newInput)
inputChanged
in interface IContentProvider
public java.lang.Object[] getElements(java.lang.Object object)
IStructuredContentProvider
.getElements to
forward the call to an object that implements
IStructuredItemContentProvider.getElements
.
getElements
in interface IStructuredContentProvider
public java.lang.Object[] getChildren(java.lang.Object object)
ITreeContentProvider
.getChildren to forward the call to an object that implements
ITreeItemContentProvider.getChildren
.
getChildren
in interface ITreeContentProvider
public boolean hasChildren(java.lang.Object object)
ITreeContentProvider
.hasChildren to forward the call to an object that implements
ITreeItemContentProvider.hasChildren
.
hasChildren
in interface ITreeContentProvider
public java.lang.Object getParent(java.lang.Object object)
ITreeContentProvider
.getParent to forward the call to an object that implements
ITreeItemContentProvider.getParent
.
getParent
in interface ITreeContentProvider
public void dispose()
adapterFactory
.
dispose
in interface IContentProvider
public IPropertySource getPropertySource(java.lang.Object object)
IPropertySourceProvider
.getPropertySource to forward the call to an object that implements
IItemPropertySource
.
getPropertySource
in interface IPropertySourceProvider
protected IPropertySource createPropertySource(java.lang.Object object, IItemPropertySource itemPropertySource)
public void notifyChanged(Notification notification)
notifyChanged
in interface INotifyChangedListener
|
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 |