org.eclipse.gmf.runtime.common.ui.services.properties.extended
Class PropertySource
java.lang.Object
org.eclipse.gmf.runtime.common.ui.services.properties.extended.PropertySource
-
All Implemented Interfaces:
-
IExtendedPropertySource,
ICompositePropertySource,
IPropertySource
-
public class PropertySource
- extends java.lang.Object
- implements
IExtendedPropertySource
Constructor Summary
|
PropertySource
()
basic constructor |
PropertySource
(java.lang.Object element)
The constructor which accepts an element object as an argument. |
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
properties
protected java.util.Map properties
- map containing properties key: id Value: property
propertyDescriptors
protected java.util.Map propertyDescriptors
- map containing propertyDescriptors key: id value: propertydescriptor
enclosed
protected
ICompositePropertySource enclosed
-
ICompositePropertySource
PropertySource
public PropertySource()
- basic constructor
PropertySource
public PropertySource(java.lang.Object element)
- The constructor which accepts an element object as an argument.
-
Parameters:
-
element
- The element which is in the selection
addPropertySource
public void addPropertySource(
ICompositePropertySource source)
- Add enclosed property source object (a child) - this creates a linked
list of property sources
-
-
Specified by:
-
addPropertySource
in interface
ICompositePropertySource
-
-
Parameters:
-
source
- -
an eclosed (a child) property source object
getEditableValue
public java.lang.Object getEditableValue()
- getter for the editable value
-
-
Specified by:
-
getEditableValue
in interface
IPropertySource
-
-
See Also:
-
IPropertySource.getEditableValue()
setEditableValue
public void setEditableValue(java.lang.Object object)
-
Deprecated.
- Setter of the editor value
-
-
-
Parameters:
-
object
-
getPropertyDescriptors
public
IPropertyDescriptor[] getPropertyDescriptors()
-
-
Specified by:
-
getPropertyDescriptors
in interface
IPropertySource
-
-
See Also:
-
IPropertySource.getPropertyDescriptors()
addPropertyDescriptor
public void addPropertyDescriptor(
IExtendedPropertyDescriptor propertyDescriptor)
- Adds propertyDescriptor to this property source. Also sets back link from
property descriptor to this property source.
-
-
Specified by:
-
addPropertyDescriptor
in interface
IExtendedPropertySource
-
-
Parameters:
-
propertyDescriptor
- IExtendedPropertyDescriptor descriptor to be added
getPropertyValue
public java.lang.Object getPropertyValue(java.lang.Object id)
-
-
Specified by:
-
getPropertyValue
in interface
IPropertySource
-
-
See Also:
-
IPropertySource.getPropertyValue(Object)
isPropertySet
public boolean isPropertySet(java.lang.Object id)
-
-
Specified by:
-
isPropertySet
in interface
IPropertySource
-
-
See Also:
-
IPropertySource.isPropertySet(Object)
resetPropertyValue
public void resetPropertyValue(java.lang.Object id)
-
-
Specified by:
-
resetPropertyValue
in interface
IPropertySource
-
-
See Also:
-
IPropertySource.resetPropertyValue(Object)
setPropertyValue
public void setPropertyValue(java.lang.Object id,
java.lang.Object value)
-
-
Specified by:
-
setPropertyValue
in interface
IPropertySource
-
-
See Also:
-
IPropertySource.setPropertyValue(Object, Object)
getElement
public java.lang.Object getElement()
- Returns the element.
-
-
Specified by:
-
getElement
in interface
IExtendedPropertySource
-
-
Returns:
- Object
setElement
public void setElement(java.lang.Object element)
- Sets the element.
-
-
Specified by:
-
setElement
in interface
IExtendedPropertySource
-
-
Parameters:
-
element
- The modelElement to set
addProperty
public void addProperty(java.lang.Object id,
java.lang.Object property)
- add properties to the properties map
-
-
Specified by:
-
addProperty
in interface
IExtendedPropertySource
-
-
Parameters:
-
id
- Object -
property
- Object
removeProperty
public void removeProperty(java.lang.Object id)
- removes properties from the properties map
-
-
Specified by:
-
removeProperty
in interface
IExtendedPropertySource
-
-
Parameters:
-
id
- Object
getPropertyDescriptor
public
IExtendedPropertyDescriptor getPropertyDescriptor(java.lang.Object id)
- Gets
IExtendedPropertyDescriptor
-
-
-
Parameters:
-
id
- The id of the property descriptor.
-
Returns:
- the
IExtendedPropertyDescriptor
isDirty
public boolean isDirty()
-
Description copied from interface:
IExtendedPropertySource
- Return if the dirty flag.
-
-
Specified by:
-
isDirty
in interface
IExtendedPropertySource
-
-
Returns:
- flag: True means dirty and viceversa.
-
See Also:
-
IExtendedPropertySource.isDirty()
setDirty
public void setDirty(boolean flag)
-
Description copied from interface:
IExtendedPropertySource
- Set the dirty flag to boolean. This functionality is used when the
property source itself is a value of a property and we need to show
some value other than the editable value in case of multiple select
unequal value.
-
-
Specified by:
-
setDirty
in interface
IExtendedPropertySource
-
-
Parameters:
-
flag
- : Flag = true means dirty, Flag = false means not dirty. -
See Also:
-
IExtendedPropertySource.setDirty(boolean)
getProperties
public java.util.Map getProperties()
- Returns the properties.
-
-
Specified by:
-
getProperties
in interface
IExtendedPropertySource
-
-
Returns:
- Map
setProperties
public void setProperties(java.util.Map properties)
- Sets the properties.
-
-
-
Parameters:
-
properties
- The properties to set
setPropertyDescriptors
public void setPropertyDescriptors(java.util.Map propertyDescriptors)
- Sets the propertyDescriptors.
-
-
-
Parameters:
-
propertyDescriptors
- The propertyDescriptors to set
refresh
public void refresh()
-
Description copied from interface:
IExtendedPropertySource
- Refresh properties
-
-
Specified by:
-
refresh
in interface
IExtendedPropertySource
-
-
See Also:
-
IExtendedPropertySource.refresh()
isValueOkay
public boolean isValueOkay(java.lang.Object id,
java.lang.Object value)
- checks to see if the value entered is the same as the BLANK value
displayed in multiple select. If it is the same as BLANK value, return
false; else return true
-
-
Specified by:
-
isValueOkay
in interface
IExtendedPropertySource
-
-
Parameters:
-
id
- property id -
value
- value to verify
-
Returns:
-
true
if value is ok, false
otherwise
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.