|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.emf.edit.provider.ItemPropertyDescriptor
This implementation of an item property descriptor supports delegating of the IItemPropertySource interface
to the IItemPropertyDescriptor interface.
| Nested Class Summary | |
protected class |
ItemPropertyDescriptor.ItemDelegator
This class uses a static image |
static class |
ItemPropertyDescriptor.PropertyValueWrapper
|
| Nested classes inherited from class org.eclipse.emf.edit.provider.IItemPropertyDescriptor |
IItemPropertyDescriptor.OverrideableCommandOwner |
| Field Summary | |
protected AdapterFactory |
adapterFactory
For now we need to keep track of the adapter factory, because we need it to provide a correct label provider. |
static Object |
BOOLEAN_VALUE_IMAGE
|
protected String |
category
This represents the group of properties into which this one should be placed. |
protected Object |
commandOwner
If non-null, this object will be the owner of commands created to set the property's value. |
protected String |
description
This is the description shown in the property sheet when this property is selected. |
protected String |
displayName
This is the name that is displayed in the property sheet. |
protected static EcorePackage |
ecorePackage
|
protected EStructuralFeature |
feature
This is the structural feature that provides the values for this property. |
protected String[] |
filterFlags
These are the flags used as filters in the property sheet. |
static Object |
GENERIC_VALUE_IMAGE
|
static Object |
INTEGRAL_VALUE_IMAGE
|
protected boolean |
isSettable
This is returned by canSetProperty(java.lang.Object). |
protected AdapterFactoryItemDelegator |
itemDelegator
This is a convenient wrapper of the adapterFactory. |
protected boolean |
multiLine
Whether the value of this property consists of multi-line text. |
protected EReference[] |
parentReferences
This is the set of single-valued references that act as a parent, only one can have a non null value at a time. |
static Object |
REAL_VALUE_IMAGE
|
protected ResourceLocator |
resourceLocator
This is used to locate resources for translated values like enumeration literals. |
protected boolean |
sortChoices
Whether the choices for this property should be sorted for display. |
protected Object |
staticImage
This is the image that will be used with the value no matter what type of object it is. |
static Object |
TEXT_VALUE_IMAGE
|
| Constructor Summary | |
ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EReference[] parentReferences)
This creates an instance that uses a resource locator and determines the cell editor from the parent references. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EReference[] parentReferences,
boolean isSettable)
This creates an instance that uses a resource locator and determines the cell editor from the parent references. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EReference[] parentReferences,
boolean isSettable,
String category)
This creates an instance that uses a resource locator, specifies a category, and determines the cell editor from the parent references. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EReference[] parentReferences,
boolean isSettable,
String category,
String[] filterFlags)
This creates an instance that uses a resource locator, specifies a category and filter flags, and determines the cell editor from the parent references. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EStructuralFeature feature)
This creates an instance that uses a resource locator and determines the cell editor from the type of the structural feature. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable)
This creates an instance that uses a resource locator and determines the cell editor from the type of the structural feature. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
boolean multiLine,
boolean sortChoices,
Object staticImage,
String category,
String[] filterFlags)
This creates an instance that uses a resource locator; indicates whether to be mutli-line and to sort choices; specifies a static image, a category, and filter flags; and determines the cell editor from the type of the structural feature. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
Object staticImage)
This creates an instance that uses a resource locator, specifies a static image, and determines the cell editor from the type of the structural feature. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
Object staticImage,
String category)
This creates an instance that uses a resource locator, specifies a static image and category, and determines the cell editor from the type of the structural feature. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
Object staticImage,
String category,
String[] filterFlags)
This creates an instance that uses a resource locator; specifies a static image, a category, and filter flags; and determines the cell editor from the type of the structural feature. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
String category)
This creates an instance that uses a resource locator, specifies a category, and determines the cell editor from the type of the structural feature. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
String category,
String[] filterFlags)
This creates an instance that uses a resource locator, specifies a category and filter flags, and determines the cell editor from the type of the structural feature. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EReference[] parentReferences)
This creates an instance that does not use a resource locator and determines the cell editor from the parent references. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EReference[] parentReferences,
boolean isSettable)
This creates an instance that does not use a resource locator and determines the cell editor from the parent references. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EReference[] parentReferences,
boolean isSettable,
String category)
This creates an instance that does not use a resource locator, specifies a category, and determines the cell editor from the parent references. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EReference[] parentReferences,
boolean isSettable,
String category,
String[] filterFlags)
This creates an instance that does not use a resource locator, specifies a category and filter flags, and determines the cell editor from the parent references. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EStructuralFeature feature)
This creates an instance that does not use a resource locator and determines the cell editor from the type of the structural feature. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable)
This creates an instance that does not use a resource locator and determines the cell editor from the type of the structural feature. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
Object staticImage)
This creates an instance that does not use a resource locator, specifies a static image, and determines the cell editor from the type of the structural feature. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
Object staticImage,
String category)
This creates an instance that does not use a resource locator, specifies a static image and category, and determines the cell editor from the type of the structural feature. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
Object staticImage,
String category,
String[] filterFlags)
This creates an instance that does not use a resource locator; specifies a static image, a category, and filter flags; and determines the cell editor from the type of the structural feature. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
String category)
This creates an instance that does not use a resource locator, specifies a category, and determines the cell editor from the type of the structural feature. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
String category,
String[] filterFlags)
This creates an instance that does not use a resource locator, specifies a category and filter flags, and determines the cell editor from the type of the structural feature. |
|
| Method Summary | |
boolean |
canSetProperty(Object object)
This determines whether this descriptor's property for the object supports set (and reset). |
static void |
collectReachableObjectsOfType(Collection visited,
Collection result,
EObject object,
EClassifier type)
This will visit all reachable references from object except those in visited; it updates visited and adds to result any object with a meta object that indicates that it is a subtype of type. |
protected Object |
createPropertyValueWrapper(Object object,
Object propertyValue)
|
String |
getCategory(Object object)
This returns the group of propertiesk into which this one should be placed. |
Collection |
getChoiceOfValues(Object object)
|
protected Collection |
getComboBoxObjects(Object object)
This will be called to populate a list of choices. |
Object |
getCommandOwner()
Returns the override command owner set via setCommandOwner. |
protected Object |
getCommandOwner(Object fallback)
Returns either the override command owner set via setCommandOwner or, if that is null, the
fallback object provided. |
static Object |
getDefaultValue(EClassifier eType)
|
String |
getDescription(Object object)
This returns the description to be displayed in the property sheet when this property is selected. |
String |
getDisplayName(Object object)
This returns the name of the property to be displayed in the property sheet. |
EditingDomain |
getEditingDomain(Object object)
|
Object |
getFeature(Object object)
Returns the feature. |
String[] |
getFilterFlags(Object object)
This returns the flags used as filters in the property sheet. |
Object |
getHelpContextIds(Object object)
|
String |
getId(Object object)
This returns the interface name of this property. |
IItemLabelProvider |
getLabelProvider(Object object)
This returns the label provider that will be used to render the value of this property. |
Object |
getPropertyValue(Object object)
This does the delegated job of getting the property value from the given object; and it sets object, which is necessary if getComboBoxObjects is called.
|
static Collection |
getReachableObjectsOfType(EObject object,
EClassifier type)
This yields all reachable references from object with a meta object which indicates that it is a subtype of type. |
protected Object |
getValue(EObject object,
EStructuralFeature feature)
This is called by getPropertyValue to reflectively obtain the value of a feature
from an object. |
boolean |
isCompatibleWith(Object object,
Object anotherObject,
IItemPropertyDescriptor anotherItemPropertyDescriptor)
This indicates whether these two property descriptors are equal. |
boolean |
isMany(Object object)
Returns whether this property represents multiple values. |
boolean |
isMultiLine(Object object)
Returns whether this property's value will consist of multi-line text. |
boolean |
isPropertySet(Object object)
This does the delegated job of determine whether the property value from the given object is set. |
boolean |
isSortChoices(Object object)
Returns whether the choices for this property should be sorted for display. |
void |
resetPropertyValue(Object object)
This does the delegated job of resetting property value back to it's default value. |
void |
setCommandOwner(Object commandOwner)
Sets the object to use as the owner of commands created to set the property's value. |
void |
setPropertyValue(Object object,
Object value)
This does the delegated job of setting the property to the given value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final Object BOOLEAN_VALUE_IMAGE
public static final Object GENERIC_VALUE_IMAGE
public static final Object INTEGRAL_VALUE_IMAGE
public static final Object REAL_VALUE_IMAGE
public static final Object TEXT_VALUE_IMAGE
protected AdapterFactory adapterFactory
protected ResourceLocator resourceLocator
protected AdapterFactoryItemDelegator itemDelegator
adapterFactory.
protected boolean isSettable
canSetProperty(java.lang.Object).
protected String displayName
protected String description
protected EStructuralFeature feature
parentReferences.
protected EReference[] parentReferences
feature.
protected boolean multiLine
protected boolean sortChoices
protected String category
protected String[] filterFlags
protected Object staticImage
protected Object commandOwner
protected static final EcorePackage ecorePackage
| Constructor Detail |
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EStructuralFeature feature)
To reduce the number of constructors for this class, this one will soon be deprecated. For new code, please
use this form, instead.
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EStructuralFeature feature)
To reduce the number of constructors for this class, this one will soon be deprecated. For new code, please
use this form, instead.
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable)
To reduce the number of constructors for this class, this ony may be deprecated in the future. For new code, please
use this form, instead.
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable)
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
Object staticImage)
To reduce the number of constructors for this class, this one may be deprecated in the future. For new code, please
use this form, instead.
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
Object staticImage)
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
String category)
To reduce the number of constructors for this class, this one will soon be deprecated. For new code, please
use this form, instead.
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
String category)
To reduce the number of constructors for this class, this one will soon be deprecated. For new code, please
use this form, instead.
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
Object staticImage,
String category)
To reduce the number of constructors for this class, this one will soon be deprecated. For new code, please
use this form, instead.
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
Object staticImage,
String category)
To reduce the number of constructors for this class, this one will soon be deprecated. For new code, please
use this form, instead.
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
String category,
String[] filterFlags)
To reduce the number of constructors for this class, this one may be deprecated in the future. For new code, please
use this form, instead.
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
String category,
String[] filterFlags)
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
Object staticImage,
String category,
String[] filterFlags)
To reduce the number of constructors for this class, this one may be deprecated in the future. For new code, please
use this form, instead.
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
Object staticImage,
String category,
String[] filterFlags)
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
boolean multiLine,
boolean sortChoices,
Object staticImage,
String category,
String[] filterFlags)
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EReference[] parentReferences)
To reduce the number of constructors for this class, this one will soon be deprecated. For new code, please
use this form, instead.
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EReference[] parentReferences)
To reduce the number of constructors for this class, this one will soon be deprecated. For new code, please
use this form, instead.
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EReference[] parentReferences,
boolean isSettable)
To reduce the number of constructors for this class, this one may be deprecated in the future. For new code, please
use this form, instead.
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EReference[] parentReferences,
boolean isSettable)
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EReference[] parentReferences,
boolean isSettable,
String category)
To reduce the number of constructors for this class, this one will soon be deprecated. For new code, please
use this form, instead.
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EReference[] parentReferences,
boolean isSettable,
String category)
To reduce the number of constructors for this class, this one will soon be deprecated. For new code, please
use this form, instead.
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EReference[] parentReferences,
boolean isSettable,
String category,
String[] filterFlags)
To reduce the number of constructors for this class, this one may be deprecated in the future. For new code, please
use this form, instead.
public ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EReference[] parentReferences,
boolean isSettable,
String category,
String[] filterFlags)
| Method Detail |
public String getCategory(Object object)
getCategory in interface IItemPropertyDescriptorpublic String getDescription(Object object)
getDescription in interface IItemPropertyDescriptorpublic String getDisplayName(Object object)
getDisplayName in interface IItemPropertyDescriptorpublic String[] getFilterFlags(Object object)
getFilterFlags in interface IItemPropertyDescriptorpublic String getId(Object object)
getId in interface IItemPropertyDescriptorpublic Object getHelpContextIds(Object object)
getHelpContextIds in interface IItemPropertyDescriptorprotected Collection getComboBoxObjects(Object object)
getReachableObjectsOfType.
public static Collection getReachableObjectsOfType(EObject object,
EClassifier type)
public static void collectReachableObjectsOfType(Collection visited,
Collection result,
EObject object,
EClassifier type)
public IItemLabelProvider getLabelProvider(Object object)
AdapterFactoryItemDelegator.
getLabelProvider in interface IItemPropertyDescriptor
public boolean isCompatibleWith(Object object,
Object anotherObject,
IItemPropertyDescriptor anotherItemPropertyDescriptor)
isCompatibleWith in interface IItemPropertyDescriptor
protected Object createPropertyValueWrapper(Object object,
Object propertyValue)
public static Object getDefaultValue(EClassifier eType)
protected Object getValue(EObject object,
EStructuralFeature feature)
getPropertyValue to reflectively obtain the value of a feature
from an object. It can be overridden by a subclass to provide additional processing of the value.
public Object getPropertyValue(Object object)
getComboBoxObjects is called.
It is implemented in a generic way using the structural feature or parent references.
getPropertyValue in interface IItemPropertyDescriptorpublic boolean isPropertySet(Object object)
isPropertySet in interface IItemPropertyDescriptorpublic boolean canSetProperty(Object object)
canSetProperty in interface IItemPropertyDescriptorpublic void setCommandOwner(Object commandOwner)
setCommandOwner in interface IItemPropertyDescriptor.OverrideableCommandOwnerpublic Object getCommandOwner()
setCommandOwner.
getCommandOwner in interface IItemPropertyDescriptor.OverrideableCommandOwnerprotected Object getCommandOwner(Object fallback)
setCommandOwner or, if that is null, the
fallback object provided.
public void resetPropertyValue(Object object)
resetPropertyValue in interface IItemPropertyDescriptorpublic EditingDomain getEditingDomain(Object object)
public void setPropertyValue(Object object,
Object value)
setPropertyValue in interface IItemPropertyDescriptorpublic Object getFeature(Object object)
IItemPropertyDescriptor
getFeature in interface IItemPropertyDescriptorpublic boolean isMany(Object object)
structural feature to provide the values for this property, and if that feature is multi-valued.
isMany in interface IItemPropertyDescriptorpublic Collection getChoiceOfValues(Object object)
getChoiceOfValues in interface IItemPropertyDescriptorpublic boolean isMultiLine(Object object)
IItemPropertyDescriptor
isMultiLine in interface IItemPropertyDescriptorpublic boolean isSortChoices(Object object)
IItemPropertyDescriptor
isSortChoices in interface IItemPropertyDescriptor
|
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 | ||||||||||