org.eclipse.gmf.runtime.common.ui.services.properties.descriptors
Class CompositeSourcePropertyDescriptor
java.lang.Object
org.eclipse.ui.views.properties.PropertyDescriptor
org.eclipse.gmf.runtime.common.ui.services.properties.descriptors.CompositeSourcePropertyDescriptor
-
All Implemented Interfaces:
-
ICompositeSourcePropertyDescriptor,
IPropertyDescriptor
-
public class CompositeSourcePropertyDescriptor
- extends
PropertyDescriptor
- implements
ICompositeSourcePropertyDescriptor
A concrete implementation of the
ICompositeSourcePropertyDescriptor
. A property descriptor
designed to work with the CompositePropertySource.
Constructor Summary
|
CompositeSourcePropertyDescriptor
(java.lang.Object object,
java.lang.Object id,
java.lang.String displayName)
Create an instance of the CompositeSourePropertyDescriptor
|
Methods inherited from class org.eclipse.ui.views.properties.
PropertyDescriptor
|
getAlwaysIncompatible,
getCategory,
getDescription,
getDisplayName,
getFilterFlags,
getHelpContextIds,
getId,
getLabelProvider,
getValidator,
isLabelProviderSet,
setAlwaysIncompatible,
setCategory,
setDescription,
setFilterFlags,
setHelpContextIds,
setLabelProvider,
setValidator
|
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
CompositeSourcePropertyDescriptor
public CompositeSourcePropertyDescriptor(java.lang.Object object,
java.lang.Object id,
java.lang.String displayName)
- Create an instance of the
CompositeSourePropertyDescriptor
-
Parameters:
-
object
- -
id
- property id -
displayName
- property display name
getObject
protected java.lang.Object getObject()
- Returns the object target of the property
-
-
-
Returns:
- target of the property
getPropertyEditor
public
CellEditor getPropertyEditor()
- Returns the propertyEditor.
-
-
-
Returns:
- the propertyEditor.
isReadOnly
public boolean isReadOnly()
- Returns the readOnly property
-
-
Specified by:
-
isReadOnly
in interface
ICompositeSourcePropertyDescriptor
-
-
Returns:
- true if read only, false otherwise
addFilterFlag
public void addFilterFlag(java.lang.String flag)
- Add filter flag
IPropertySheetEntry.FILTER_ID_EXPERT
-
-
-
Parameters:
-
flag
- a filter flag
getPropertyValue
public java.lang.Object getPropertyValue()
- Returns the value of the property
-
-
Specified by:
-
getPropertyValue
in interface
ICompositeSourcePropertyDescriptor
-
-
Returns:
- the value of the property
resetPropertyValue
public void resetPropertyValue()
-
Description copied from interface:
ICompositeSourcePropertyDescriptor
- This method is used by the property source to reset the property that
this property descriptor maps to.
-
-
Specified by:
-
resetPropertyValue
in interface
ICompositeSourcePropertyDescriptor
-
setPropertyValue
public void setPropertyValue(java.lang.Object value)
- Sets new value to the property
-
-
Specified by:
-
setPropertyValue
in interface
ICompositeSourcePropertyDescriptor
-
-
Parameters:
-
value
- the new value
setValue
protected void setValue(java.lang.Object value)
- Utility method - all the checks and context set up are done in the
setPropertyValue. This just executes the set.
-
-
-
Parameters:
-
value
- the new value
createPropertyEditor
public
CellEditor createPropertyEditor(
Composite parent)
-
-
Specified by:
-
createPropertyEditor
in interface
IPropertyDescriptor
-
Overrides:
-
createPropertyEditor
in class
PropertyDescriptor
-
isCompatibleWith
public boolean isCompatibleWith(
IPropertyDescriptor anotherProperty)
-
-
Specified by:
-
isCompatibleWith
in interface
IPropertyDescriptor
-
Overrides:
-
isCompatibleWith
in class
PropertyDescriptor
-
setPropertyEditor
public void setPropertyEditor(
CellEditor propertyEditor)
- Parametrize cell editor creation - assign a custom cell editor to an instance variable
-
-
-
Parameters:
-
propertyEditor
- a custom cell editor
getEditableValue
protected java.lang.Object getEditableValue()
- This is a utility method, which allows recursive display of the
properties. Should anyone desire to get rid of recursive display - this
should become getPropertyValue()
-
-
-
Returns:
- editable property value
getPropertySource
protected
IPropertySource getPropertySource(java.lang.Object value)
- Returns an property source for the given value.
-
-
-
Parameters:
-
value
- an object for which to obtain a property source or
null
if a property source is not available
-
Returns:
- an property source for the given object
setReadOnly
public void setReadOnly(boolean readOnly)
-
Description copied from interface:
ICompositeSourcePropertyDescriptor
- Set read-only to true if the property is read-only, or to false otherwise
-
-
Specified by:
-
setReadOnly
in interface
ICompositeSourcePropertyDescriptor
-
-
Parameters:
-
readOnly
- -
true if the property is read-only, or to false otherwise
getDefaultValue
public java.lang.Object getDefaultValue()
- Returns default value
-
-
-
Returns:
- the default value of the property, to which the reset to defaults
will revert to. In case if this is null - reset will do nothing
setDefaultValue
public void setDefaultValue(java.lang.Object defaultValue)
- Assigns a default value to this property
-
-
-
Parameters:
-
defaultValue
- assign a default value to this property
resetPropertyValue
public void resetPropertyValue(java.lang.Object value)
-
-
-
Parameters:
-
value
- -
See Also:
-
ICompositeSourcePropertyDescriptor.resetPropertyValue()
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.