be.ac.vub.cocompose.eclipse.model
Class EclipseElement

java.lang.Object
  extended bybe.ac.vub.cocompose.eclipse.model.EclipseElement
All Implemented Interfaces:
IPropertySource

public class EclipseElement
extends Object
implements IPropertySource

Describes the common properties for eclipse editor elements.

Since:
0.2.0
Version:
0.2.0, 02/12/2003
Author:
Dennis Wagelaar

Constructor Summary
EclipseElement(IPropertyDescriptorCreator creator)
          Creates an EclipseElement.
 
Method Summary
 Object getEditableValue()
           
 IPropertyDescriptor[] getPropertyDescriptors()
           
 Object getPropertyValue(Object id)
          Returns an Object which represents the appropriate value for the property name supplied.
 boolean isPropertySet(Object id)
           
 void resetPropertyValue(Object id)
          Resets a property of this object.
 void setPropertyValue(Object id, Object value)
          Sets the value of a given property with the value supplied.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EclipseElement

public EclipseElement(IPropertyDescriptorCreator creator)
Creates an EclipseElement.

Parameters:
creator - the IPropertyDescriptorCreator that indicates what properties are available. May not be null!
Method Detail

getPropertyValue

public Object getPropertyValue(Object id)
Returns an Object which represents the appropriate value for the property name supplied.

Specified by:
getPropertyValue in interface IPropertySource
Parameters:
id - Name of the property for which the values are needed.
Returns:
Object which is the value of the property.
See Also:
IPropertySource.getPropertyValue(java.lang.Object)

isPropertySet

public boolean isPropertySet(Object id)
Specified by:
isPropertySet in interface IPropertySource
See Also:
IPropertySource.isPropertySet(java.lang.Object)

resetPropertyValue

public void resetPropertyValue(Object id)
Resets a property of this object.

Specified by:
resetPropertyValue in interface IPropertySource
Parameters:
id - - the property id.
See Also:
IPropertySource.resetPropertyValue(java.lang.Object)

setPropertyValue

public void setPropertyValue(Object id,
                             Object value)
Sets the value of a given property with the value supplied. Also fires a property change if necessary.

Specified by:
setPropertyValue in interface IPropertySource
Parameters:
id - - Name of the parameter to be changed.
value - - Value to be set to the given parameter.
See Also:
IPropertySource.setPropertyValue(java.lang.Object, java.lang.Object)

getEditableValue

public Object getEditableValue()
Specified by:
getEditableValue in interface IPropertySource
See Also:
IPropertySource.getEditableValue()

getPropertyDescriptors

public IPropertyDescriptor[] getPropertyDescriptors()
Specified by:
getPropertyDescriptors in interface IPropertySource
See Also:
IPropertySource.getPropertyDescriptors()