org.eclipse.emf.edit.provider
Class AttributeValueWrapperItemProvider

java.lang.Object
  extended by org.eclipse.emf.edit.provider.WrapperItemProvider
      extended by org.eclipse.emf.edit.provider.AttributeValueWrapperItemProvider
All Implemented Interfaces:
IDisposable, IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider, IWrapperItemProvider

public class AttributeValueWrapperItemProvider
extends WrapperItemProvider
implements IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, IEditingDomainItemProvider

A wrapper implementation for simple attribute values.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.edit.provider.WrapperItemProvider
WrapperItemProvider.ReplacementAffectedObjectCommand, WrapperItemProvider.SimpleCopyCommand, WrapperItemProvider.WrapperItemPropertyDescriptor, WrapperItemProvider.WrappingCopyCommand
 
Field Summary
protected  java.util.List<IItemPropertyDescriptor> propertyDescriptors
          The single property descriptor for the value is cached here as a singleton list.
protected  ResourceLocator resourceLocator
          The resource locator from the owner's item provider.
 
Fields inherited from class org.eclipse.emf.edit.provider.WrapperItemProvider
adapterFactory, COPY_COMMAND_DESCRIPTION, COPY_COMMAND_LABEL, feature, index, owner, value
 
Constructor Summary
AttributeValueWrapperItemProvider(java.lang.Object value, EObject owner, EAttribute attribute, AdapterFactory adapterFactory)
          Deprecated. As of EMF 2.0.1, replaced by this form.
AttributeValueWrapperItemProvider(java.lang.Object value, EObject owner, EAttribute attribute, AdapterFactory adapterFactory, ResourceLocator resourceLocator)
          Creates an instance for a single-valued attribute.
AttributeValueWrapperItemProvider(java.lang.Object value, EObject owner, EAttribute attribute, int index, AdapterFactory adapterFactory)
          Deprecated. As of EMF 2.0.1, replaced by this form.
AttributeValueWrapperItemProvider(java.lang.Object value, EObject owner, EAttribute attribute, int index, AdapterFactory adapterFactory, ResourceLocator resourceLocator)
          Creates an instance for a value within a multi-valued attribute.
 
Method Summary
protected  Command createCopyCommand(EditingDomain domain, java.lang.Object owner, CopyCommand.Helper helper)
          Returns a WrapperItemProvider.SimpleCopyCommand that copies the value by converting it into a string and back, using the factory methods.
protected  Command createSetCommand(EditingDomain domain, java.lang.Object owner, java.lang.Object feature, java.lang.Object value, int index)
          Returns a wrapped set command that returns as its affected object the replacement wrapper for the value.
 java.util.List<IItemPropertyDescriptor> getPropertyDescriptors(java.lang.Object object)
          Creates, caches and returns an item property descriptor for the value.
 java.lang.String getText(java.lang.Object object)
          If non-null, the value is converted to a string, using the type of its attribute and the appropriate factory.
 
Methods inherited from class org.eclipse.emf.edit.provider.WrapperItemProvider
baseCreateCommand, createCommand, createDragAndDropCommand, dispose, getBackground, getChildren, getEditableValue, getElements, getFeature, getFont, getForeground, getImage, getIndex, getNewChildDescriptors, getOwner, getParent, getPropertyCategory, getPropertyDescription, getPropertyDescriptor, getPropertyFilterFlags, getPropertyImage, getPropertyImage, getPropertyName, getRootAdapterFactory, getUpdateableText, getValue, hasChildren, isPropertyMultiLine, isPropertySettable, isPropertySortChoices, setIndex
 
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.ITreeItemContentProvider
getChildren, getParent, hasChildren
 
Methods inherited from interface org.eclipse.emf.edit.provider.IItemLabelProvider
getImage
 
Methods inherited from interface org.eclipse.emf.edit.provider.IItemPropertySource
getEditableValue, getPropertyDescriptor
 
Methods inherited from interface org.eclipse.emf.edit.provider.IEditingDomainItemProvider
createCommand, getChildren, getNewChildDescriptors, getParent
 

Field Detail

resourceLocator

protected ResourceLocator resourceLocator
The resource locator from the owner's item provider.


propertyDescriptors

protected java.util.List<IItemPropertyDescriptor> propertyDescriptors
The single property descriptor for the value is cached here as a singleton list.

Constructor Detail

AttributeValueWrapperItemProvider

public AttributeValueWrapperItemProvider(java.lang.Object value,
                                         EObject owner,
                                         EAttribute attribute,
                                         AdapterFactory adapterFactory,
                                         ResourceLocator resourceLocator)
Creates an instance for a single-valued attribute.


AttributeValueWrapperItemProvider

public AttributeValueWrapperItemProvider(java.lang.Object value,
                                         EObject owner,
                                         EAttribute attribute,
                                         int index,
                                         AdapterFactory adapterFactory,
                                         ResourceLocator resourceLocator)
Creates an instance for a value within a multi-valued attribute.


AttributeValueWrapperItemProvider

@Deprecated
public AttributeValueWrapperItemProvider(java.lang.Object value,
                                                    EObject owner,
                                                    EAttribute attribute,
                                                    AdapterFactory adapterFactory)
Deprecated. As of EMF 2.0.1, replaced by this form.

Creates an instance for a single-valued attribute. Because the item property descriptor that will be created for the value should get a resource locator, this constructor has been deprecated.


AttributeValueWrapperItemProvider

@Deprecated
public AttributeValueWrapperItemProvider(java.lang.Object value,
                                                    EObject owner,
                                                    EAttribute attribute,
                                                    int index,
                                                    AdapterFactory adapterFactory)
Deprecated. As of EMF 2.0.1, replaced by this form.

Creates an instance for a value within a multi-valued attribute. Because the item property descriptor that will be created for the value should get a resource locator, this constructor has been deprecated.

Method Detail

getText

public java.lang.String getText(java.lang.Object object)
If non-null, the value is converted to a string, using the type of its attribute and the appropriate factory.

Specified by:
getText in interface IItemLabelProvider
Overrides:
getText in class WrapperItemProvider

getPropertyDescriptors

public java.util.List<IItemPropertyDescriptor> getPropertyDescriptors(java.lang.Object object)
Creates, caches and returns an item property descriptor for the value.

Specified by:
getPropertyDescriptors in interface IItemPropertySource
Overrides:
getPropertyDescriptors in class WrapperItemProvider

createSetCommand

protected Command createSetCommand(EditingDomain domain,
                                   java.lang.Object owner,
                                   java.lang.Object feature,
                                   java.lang.Object value,
                                   int index)
Returns a wrapped set command that returns as its affected object the replacement wrapper for the value.

Overrides:
createSetCommand in class WrapperItemProvider

createCopyCommand

protected Command createCopyCommand(EditingDomain domain,
                                    java.lang.Object owner,
                                    CopyCommand.Helper helper)
Returns a WrapperItemProvider.SimpleCopyCommand that copies the value by converting it into a string and back, using the factory methods.

Overrides:
createCopyCommand in class WrapperItemProvider

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