org.eclipse.emf.edit.tree.provider
Class TreeNodeItemProvider

java.lang.Object
  |
  +--org.eclipse.emf.common.notify.impl.AdapterImpl
        |
        +--org.eclipse.emf.edit.provider.ItemProviderAdapter
              |
              +--org.eclipse.emf.edit.tree.provider.TreeNodeItemProvider
All Implemented Interfaces:
Adapter, CreateChildCommand.Helper, IChangeNotifier, IDisposable, IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, INotifyChangedListener, IStructuredItemContentProvider, ITreeItemContentProvider, ResourceLocator

public class TreeNodeItemProvider
extends ItemProviderAdapter
implements IEditingDomainItemProvider, INotifyChangedListener, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource

This is the item provider adpater for a TreeNode object.


Field Summary
protected  IChangeNotifier delegateItemProvider
           
protected  AdapterFactoryItemDelegator itemDelegator
           
 
Fields inherited from class org.eclipse.emf.edit.provider.ItemProviderAdapter
adapterFactory, changeNotifier, childrenReferences, itemPropertyDescriptors, targets
 
Fields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
target
 
Constructor Summary
TreeNodeItemProvider(AdapterFactory adapterFactory)
          This constructs an instance from a factory and a notifier.
 
Method Summary
protected  void collectNewChildDescriptors(java.util.Collection newChildDescriptors, java.lang.Object object)
          This adds to the collection of CommandParameters describing all of the children that can be created under this object.
 void dispose()
          This will remove this adapter from all its the targets.
 java.util.Collection getChildrenReferences(java.lang.Object object)
          This specifies how to implement ItemProviderAdapter.getChildren(java.lang.Object) and AddCommand and RemoveCommand support in ItemProviderAdapter.createCommand(java.lang.Object, org.eclipse.emf.edit.domain.EditingDomain, java.lang.Class, org.eclipse.emf.edit.command.CommandParameter).
 java.lang.Object getImage(java.lang.Object object)
          This does the same thing as ILabelProvider.getImage, it fetches the label image specific to this object instance.
 java.lang.Object getParent(java.lang.Object object)
          This returns the parent of the TreeNode.
 java.util.List getPropertyDescriptors(java.lang.Object object)
          This returns the property descriptors for the adapted class.
 java.lang.String getText(java.lang.Object object)
          This does the same thing as ILabelProvider.getlText, it fetches the label text specific to this object instance.
 void notifyChanged(Notification notification)
          This handles notification by calling fireNotifyChanged.
 void setTarget(Notifier target)
          Sets the target from which the adapter will receive notification.
 
Methods inherited from class org.eclipse.emf.edit.provider.ItemProviderAdapter
addListener, createAddCommand, createChildParameter, createCommand, createCopyCommand, createCreateChildCommand, createCreateCopyCommand, createDragAndDropCommand, createInitializeCopyCommand, createMoveCommand, createRemoveCommand, createReplaceCommand, createSetCommand, factorAddCommand, factorMoveCommand, factorRemoveCommand, fireNotifyChanged, getAdapterFactory, getBaseURL, getChildReference, getChildren, getCreateChildDescription, getCreateChildImage, getCreateChildResult, getCreateChildText, getCreateChildToolTipText, getEditableValue, getElements, getFeatureText, getImage, getNewChildDescriptors, getPropertyDescriptor, getPropertyValue, getReferenceValue, getResourceLocator, getResourceLocator, getSetFeature, getSetFeatures, getString, getString, getString, getString, getTypeText, getUpdateableText, hasChildren, isAdapterForType, isPropertySet, removeListener, resetPropertyValue, setPropertyValue
 
Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
getTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.edit.provider.IEditingDomainItemProvider
createCommand, getChildren, getNewChildDescriptors
 
Methods inherited from interface org.eclipse.emf.edit.provider.IStructuredItemContentProvider
getElements
 
Methods inherited from interface org.eclipse.emf.edit.provider.ITreeItemContentProvider
getChildren, hasChildren
 
Methods inherited from interface org.eclipse.emf.edit.provider.IItemPropertySource
getEditableValue, getPropertyDescriptor
 

Field Detail

delegateItemProvider

protected IChangeNotifier delegateItemProvider

itemDelegator

protected AdapterFactoryItemDelegator itemDelegator
Constructor Detail

TreeNodeItemProvider

public TreeNodeItemProvider(AdapterFactory adapterFactory)
This constructs an instance from a factory and a notifier.
Method Detail

setTarget

public void setTarget(Notifier target)
Description copied from interface: Adapter
Sets the target from which the adapter will receive notification. In general, an adapter may be shared by more than one notifier.
Overrides:
setTarget in class ItemProviderAdapter
Following copied from interface: org.eclipse.emf.common.notify.Adapter
Parameters:
newTarget - the new notifier.
See Also:
Adapter.getTarget()

getPropertyDescriptors

public java.util.List getPropertyDescriptors(java.lang.Object object)
This returns the property descriptors for the adapted class.
Specified by:
getPropertyDescriptors in interface IItemPropertySource
Overrides:
getPropertyDescriptors in class ItemProviderAdapter

getChildrenReferences

public java.util.Collection getChildrenReferences(java.lang.Object object)
This specifies how to implement ItemProviderAdapter.getChildren(java.lang.Object) and AddCommand and RemoveCommand support in ItemProviderAdapter.createCommand(java.lang.Object, org.eclipse.emf.edit.domain.EditingDomain, java.lang.Class, org.eclipse.emf.edit.command.CommandParameter).
Overrides:
getChildrenReferences in class ItemProviderAdapter

getParent

public java.lang.Object getParent(java.lang.Object object)
This returns the parent of the TreeNode.
Specified by:
getParent in interface IEditingDomainItemProvider
Overrides:
getParent in class ItemProviderAdapter

getImage

public java.lang.Object getImage(java.lang.Object object)
Description copied from interface: IItemLabelProvider
This does the same thing as ILabelProvider.getImage, it fetches the label image specific to this object instance.
Specified by:
getImage in interface IItemLabelProvider
Overrides:
getImage in class ItemProviderAdapter

getText

public java.lang.String getText(java.lang.Object object)
Description copied from interface: IItemLabelProvider
This does the same thing as ILabelProvider.getlText, it fetches the label text specific to this object instance.
Specified by:
getText in interface IItemLabelProvider
Overrides:
getText in class ItemProviderAdapter

notifyChanged

public void notifyChanged(Notification notification)
This handles notification by calling fireNotifyChanged. This will also be called by the delegateItemProvider when it normally fires a notification to it's adapter factory; the listener method is hooked up in setTarget.
Specified by:
notifyChanged in interface INotifyChangedListener
Overrides:
notifyChanged in class AdapterImpl
Following copied from interface: org.eclipse.emf.common.notify.Adapter
Parameters:
notification - a description of the change.

collectNewChildDescriptors

protected void collectNewChildDescriptors(java.util.Collection newChildDescriptors,
                                          java.lang.Object object)
This adds to the collection of CommandParameters describing all of the children that can be created under this object.
Overrides:
collectNewChildDescriptors in class ItemProviderAdapter

dispose

public void dispose()
Description copied from class: ItemProviderAdapter
This will remove this adapter from all its the targets.
Overrides:
dispose in class ItemProviderAdapter

Copyright 2001-2002 IBM Corporation and others.
All Rights Reserved.