be.ac.vub.cocompose.eclipse.model.core
Class EclipseRelationship

java.lang.Object
  extended bybe.ac.vub.cocompose.lang.impl.DefaultElement
      extended bybe.ac.vub.cocompose.lang.impl.core.DefaultModelElement
          extended bybe.ac.vub.cocompose.lang.impl.core.DefaultRelationship
              extended bybe.ac.vub.cocompose.eclipse.model.core.EclipseRelationship
All Implemented Interfaces:
Cloneable, Element, IPropertyDescriptorCreator, IPropertySource, ModelElement, Relationship, VisitedElement

public class EclipseRelationship
extends DefaultRelationship
implements IPropertyDescriptorCreator

Eclipse representation for CoCompose language elements that can participate in a relationship.

Since:
0.2.0
Version:
0.2.0, 09/04/2004
Author:
Dennis Wagelaar

Constructor Summary
EclipseRelationship()
           
 
Method Summary
 List createDescriptors()
          Creates the property descriptors.
 List getBendpoints()
          Gets the bendpoints.
 Object getEditableValue()
           
 IPropertyDescriptor[] getPropertyDescriptors()
           
 Object getPropertyValue(Object id)
           
 void insertBendpoint(int index, Bendpoint point)
          Inserts a bendpoint at the given index.
 boolean isPropertySet(Object id)
           
 void removeBendpoint(int index)
          Removes the bendpoint at the given index.
 void resetPropertyValue(Object id)
           
 void setBendpoint(int index, Bendpoint point)
          Sets the bendpoint at the given index.
 void setBendpoints(List points)
          Sets the bendpoints.
 void setPropertyValue(Object id, Object value)
          Sets the value of a given property with the value supplied.
 
Methods inherited from class be.ac.vub.cocompose.lang.impl.core.DefaultRelationship
accept, getName, getSourceParticipant, getTargetParticipant, setSourceParticipant, setTargetParticipant
 
Methods inherited from class be.ac.vub.cocompose.lang.impl.core.DefaultModelElement
getId, getModel, getNamespace, getRootNamespace, setId, setName, setNamespace, toString
 
Methods inherited from class be.ac.vub.cocompose.lang.impl.DefaultElement
addPropertyChangeListener, firePropertyChange, fireStructureChange, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface be.ac.vub.cocompose.lang.core.ModelElement
getId, getModel, getNamespace, getRootNamespace, setId, setName, setNamespace
 
Methods inherited from interface be.ac.vub.cocompose.lang.Element
addPropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

EclipseRelationship

public EclipseRelationship()
Method Detail

insertBendpoint

public void insertBendpoint(int index,
                            Bendpoint point)
Inserts a bendpoint at the given index.

Parameters:
index - - the index for insertion.
point - - the bendpoint to insert.

removeBendpoint

public void removeBendpoint(int index)
Removes the bendpoint at the given index.

Parameters:
index - - the index of the bendpoint.

setBendpoint

public void setBendpoint(int index,
                         Bendpoint point)
Sets the bendpoint at the given index.

Parameters:
index - - the index for insertion.
point - - the bendpoint to set.

setBendpoints

public void setBendpoints(List points)
Sets the bendpoints.

Parameters:
points - - the bendpoints to set.

getBendpoints

public List getBendpoints()
Gets the bendpoints.

Returns:
the bendpoints.

createDescriptors

public List createDescriptors()
Creates the property descriptors.

Specified by:
createDescriptors in interface IPropertyDescriptorCreator
Returns:
the property descriptors.

getPropertyValue

public Object getPropertyValue(Object id)
Specified by:
getPropertyValue in interface IPropertySource
See Also:
IPropertySource.getPropertyValue(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)

resetPropertyValue

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

isPropertySet

public boolean isPropertySet(Object id)
Specified by:
isPropertySet in interface IPropertySource
See Also:
IPropertySource.isPropertySet(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()