|
|||||||||||
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
|
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 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 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 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 where the category and filter flags are empty and the cell editor is determined for the references. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EReference[] parentReferences,
boolean isSettable)
This creates an instance where the category and filter flags are empty and the cell editor is determined for the references. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EReference[] parentReferences,
boolean isSettable,
String category)
This creates an instance where the filter flags are specified, there is a specifed category, and the cell editor is determined for the references. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EReference[] parentReferences,
boolean isSettable,
String category,
String[] filterFlags)
This creates an instance where the filter flags are specified, there is a specifed category, and the cell editor is determined for the references. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EStructuralFeature feature)
This creates an instance where the category and filter flags are empty and the cell editor is determined from the type of the structural feature. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
ResourceLocator resourceLocator,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable)
This creates an instance where the category and filter flags are empty and the cell editor is determined 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 where the category and filter flags are empty, there is a static image used, and the cell editor is determined 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 where the filter flags are empty, there is a static image used and a specifed category, and the cell editor is determined 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 where the filter flags are specified, there is a static image used and a specifed category, and the cell editor is determined 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 where the filter flags are empty, there is a a specifed category, and the cell editor is determined 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 where the filter flags are specified, there is a a specifed category, and the cell editor is determined from the type of the structural feature. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EReference[] parentReferences)
This creates an instance where the category and filter flags are empty and the cell editor is determined for the references. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EReference[] parentReferences,
boolean isSettable)
This creates an instance where the category and filter flags are empty and the cell editor is determined for the references. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EReference[] parentReferences,
boolean isSettable,
String category)
This creates an instance where the filter flags are specified, there is a specifed category, and the cell editor is determined for the references. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EReference[] parentReferences,
boolean isSettable,
String category,
String[] filterFlags)
This creates an instance where the filter flags are specified, there is a specifed category, and the cell editor is determined for the references. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EStructuralFeature feature)
This creates an instance where the category and filter flags are empty and the cell editor is determined from the type of the structural feature. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable)
This creates an instance where the category and filter flags are empty and the cell editor is determined from the type of the structural feature. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
Object staticImage)
This creates an instance where the category and filter flags are empty, there is a static image used, and the cell editor is determined 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 where the filter flags are empty, there is a static image used and a specifed category, and the cell editor is determined 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 where the filter flags are specified, there is a static image used and a specifed category, and the cell editor is determined from the type of the structural feature. |
|
ItemPropertyDescriptor(AdapterFactory adapterFactory,
String displayName,
String description,
EStructuralFeature feature,
boolean isSettable,
String category)
This creates an instance where the filter flags are empty, there is a a specifed category, and the cell editor is determined 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 where the filter flags are specified, there is a a specifed category, and the cell editor is determined 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. |
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. |
boolean |
isCompatibleWith(Object object,
Object anotherObject,
IItemPropertyDescriptor anotherItemPropertyDescriptor)
This indicates whether these two property descriptors are equal. |
boolean |
isPropertySet(Object object)
This does the delegated job of determine whether the property value from the given object is set. |
void |
resetPropertyValue(Object object)
This does the delegated job of resetting property value back to it's default 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 String category
protected String[] filterFlags
protected Object staticImage
protected static final EcorePackage ecorePackage
Constructor Detail |
public ItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description, EStructuralFeature feature)
public ItemPropertyDescriptor(AdapterFactory adapterFactory, ResourceLocator resourceLocator, String displayName, String description, EStructuralFeature feature)
public ItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description, EStructuralFeature feature, boolean isSettable)
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)
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)
public ItemPropertyDescriptor(AdapterFactory adapterFactory, ResourceLocator resourceLocator, String displayName, String description, EStructuralFeature feature, boolean isSettable, String category)
public ItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description, EStructuralFeature feature, boolean isSettable, Object staticImage, String category)
public ItemPropertyDescriptor(AdapterFactory adapterFactory, ResourceLocator resourceLocator, String displayName, String description, EStructuralFeature feature, boolean isSettable, Object staticImage, String category)
public ItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description, EStructuralFeature feature, boolean isSettable, String category, String[] filterFlags)
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)
public ItemPropertyDescriptor(AdapterFactory adapterFactory, ResourceLocator resourceLocator, String displayName, String description, EStructuralFeature feature, boolean isSettable, Object staticImage, String category, String[] filterFlags)
public ItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description, EReference[] parentReferences)
public ItemPropertyDescriptor(AdapterFactory adapterFactory, ResourceLocator resourceLocator, String displayName, String description, EReference[] parentReferences)
public ItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description, EReference[] parentReferences, boolean isSettable)
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)
public ItemPropertyDescriptor(AdapterFactory adapterFactory, ResourceLocator resourceLocator, String displayName, String description, EReference[] parentReferences, boolean isSettable, String category)
public ItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description, EReference[] parentReferences, boolean isSettable, String category, String[] filterFlags)
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 IItemPropertyDescriptor
public String getDescription(Object object)
getDescription
in interface IItemPropertyDescriptor
public String getDisplayName(Object object)
getDisplayName
in interface IItemPropertyDescriptor
public String[] getFilterFlags(Object object)
getFilterFlags
in interface IItemPropertyDescriptor
public String getId(Object object)
getId
in interface IItemPropertyDescriptor
public Object getHelpContextIds(Object object)
getHelpContextIds
in interface IItemPropertyDescriptor
protected 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)
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 IItemPropertyDescriptor
public boolean isPropertySet(Object object)
isPropertySet
in interface IItemPropertyDescriptor
public boolean canSetProperty(Object object)
canSetProperty
in interface IItemPropertyDescriptor
public void resetPropertyValue(Object object)
resetPropertyValue
in interface IItemPropertyDescriptor
public EditingDomain getEditingDomain(Object object)
public void setPropertyValue(Object object, Object value)
setPropertyValue
in interface IItemPropertyDescriptor
public Object getFeature(Object object)
IItemPropertyDescriptor
getFeature
in interface IItemPropertyDescriptor
public Collection getChoiceOfValues(Object object)
getChoiceOfValues
in interface IItemPropertyDescriptor
|
Copyright 2001-2004 IBM Corporation and others. All Rights Reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |