|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.edit.provider.ItemPropertyDescriptor org.eclipse.emf.edit.provider.WrapperItemProvider.WrapperItemPropertyDescriptor
protected class WrapperItemProvider.WrapperItemPropertyDescriptor
An item property descriptor for the single property of a wrapper for a simple value. This extends the base
implementation and substitutes the wrapper's owner for the selected object (the wrapper itself) in the call to getPropertyValue
. Thus, the owner must be an EObject to use this class. The property's name,
description, settable flag, static image, category, and filter flags are obtained by calling out to various
template methods, so can be easily changed by deriving a subclass.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.emf.edit.provider.ItemPropertyDescriptor |
---|
ItemPropertyDescriptor.ItemDelegator, ItemPropertyDescriptor.PropertyValueWrapper |
Nested classes/interfaces inherited from interface org.eclipse.emf.edit.provider.IItemPropertyDescriptor |
---|
IItemPropertyDescriptor.OverrideableCommandOwner |
Field Summary |
---|
Fields inherited from class org.eclipse.emf.edit.provider.ItemPropertyDescriptor |
---|
adapterFactory, BOOLEAN_VALUE_IMAGE, category, commandOwner, description, displayName, ecorePackage, feature, filterFlags, GENERIC_VALUE_IMAGE, INTEGRAL_VALUE_IMAGE, isSettable, itemDelegator, multiLine, parentReferences, REAL_VALUE_IMAGE, resourceLocator, sortChoices, staticImage, TEXT_VALUE_IMAGE |
Constructor Summary | |
---|---|
WrapperItemProvider.WrapperItemPropertyDescriptor(ResourceLocator resourceLocator,
EStructuralFeature feature)
|
Method Summary | |
---|---|
boolean |
canSetProperty(java.lang.Object object)
Substitutes the wrapper owner for the selected object and invokes the base implementation. |
protected Command |
createSetCommand(EditingDomain domain,
java.lang.Object owner,
java.lang.Object feature,
java.lang.Object value)
Returns a command that will set the value on the model object. |
java.util.Collection<?> |
getChoiceOfValues(java.lang.Object object)
Substitutes the wrapper owner for the selected object and invokes the base implementation. |
java.lang.Object |
getPropertyValue(java.lang.Object object)
Substitutes the wrapper owner for the selected object and invokes the base implementation. |
protected java.lang.Object |
getValue(EObject object,
EStructuralFeature feature)
Returns a value from a model object. |
boolean |
isMany(java.lang.Object object)
Returns false , as the property only represents a single value, even if the feature is multi-valued. |
boolean |
isPropertySet(java.lang.Object object)
Returns true , as the property of a value wrapper is always considered to be set. |
void |
resetPropertyValue(java.lang.Object object)
Does nothing, as resetting the property of a value wrapper is not meaningful. |
void |
setPropertyValue(java.lang.Object object,
java.lang.Object value)
Sets the property value. |
protected void |
setValue(EObject object,
EStructuralFeature feature,
java.lang.Object value)
Sets a value on a model object. |
Methods inherited from class org.eclipse.emf.edit.provider.ItemPropertyDescriptor |
---|
collectReachableObjectsOfType, createPropertyValueWrapper, getCategory, getComboBoxObjects, getCommandOwner, getCommandOwner, getDefaultId, getDefaultValue, getDescription, getDisplayName, getEditingDomain, getFeature, getFilterFlags, getHelpContextIds, getId, getLabelProvider, getReachableObjectsOfType, isCompatibleWith, isMultiLine, isSortChoices, setCommandOwner |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WrapperItemProvider.WrapperItemPropertyDescriptor(ResourceLocator resourceLocator, EStructuralFeature feature)
Method Detail |
---|
public java.lang.Object getPropertyValue(java.lang.Object object)
getValue
.
getPropertyValue
in interface IItemPropertyDescriptor
getPropertyValue
in class ItemPropertyDescriptor
public boolean canSetProperty(java.lang.Object object)
canSetProperty
in interface IItemPropertyDescriptor
canSetProperty
in class ItemPropertyDescriptor
public boolean isPropertySet(java.lang.Object object)
true
, as the property of a value wrapper is always considered to be set.
isPropertySet
in interface IItemPropertyDescriptor
isPropertySet
in class ItemPropertyDescriptor
public void resetPropertyValue(java.lang.Object object)
resetPropertyValue
in interface IItemPropertyDescriptor
resetPropertyValue
in class ItemPropertyDescriptor
public void setPropertyValue(java.lang.Object object, java.lang.Object value)
createSetcommand
is executed; otherwise, setValue
is called to set the value.
setPropertyValue
in interface IItemPropertyDescriptor
setPropertyValue
in class ItemPropertyDescriptor
protected java.lang.Object getValue(EObject object, EStructuralFeature feature)
getValue
in class ItemPropertyDescriptor
protected void setValue(EObject object, EStructuralFeature feature, java.lang.Object value)
protected Command createSetCommand(EditingDomain domain, java.lang.Object owner, java.lang.Object feature, java.lang.Object value)
public boolean isMany(java.lang.Object object)
false
, as the property only represents a single value, even if the feature is multi-valued.
isMany
in interface IItemPropertyDescriptor
isMany
in class ItemPropertyDescriptor
public java.util.Collection<?> getChoiceOfValues(java.lang.Object object)
getChoiceOfValues
in interface IItemPropertyDescriptor
getChoiceOfValues
in class ItemPropertyDescriptor
|
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 |