|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.ac.vub.cocompose.lang.impl.DefaultElement
be.ac.vub.cocompose.lang.impl.core.DefaultModelElement
be.ac.vub.cocompose.lang.impl.core.DefaultNamespace
be.ac.vub.cocompose.lang.impl.core.DefaultRelationElement
Represents CoCompose language elements that can participate in a relationship.
Constructor Summary | |
DefaultRelationElement()
|
Method Summary | |
void |
accept(ModelVisitor modelVisitor)
Accepts a visitor. |
void |
addRelationship(int index,
Relationship relationship)
Adds a relationship for this element at the specified index. |
void |
addRelationship(Relationship relationship)
Adds a relationship for this element. |
protected void |
fireBackgroundColorUpdate()
Fires an ID_BGCOLOR event for the hierarchy of owned elements. |
Color |
getBackgroundColor()
Gets the background color. |
protected Color |
getDefaultBackgroundColor()
Gets the default background color. |
Point |
getPosition()
Gets the element position. |
List |
getRelationships()
Gets the relationships for this element. |
List |
getSourceRelationships()
Gets the source relationships for this element. |
List |
getTargetRelationships()
Gets the target relationships for this element. |
void |
removeRelationship(Relationship relationship)
Removes a relationship from this element. |
void |
setBackgroundColor(Color bgcolor)
Sets the background color. |
void |
setPosition(Point position)
Sets the element position. |
Methods inherited from class be.ac.vub.cocompose.lang.impl.core.DefaultNamespace |
addOwnedElement, addOwnedElement, getDeepOwnedElement, getDeepOwnedElements, getOwnedElement, getOwnedElementId, getOwnedElements, getOwnedElements, getOwnedIds, isRegistered, registerNameChange, removeOwnedElement, translateIndex, translateIndex |
Methods inherited from class be.ac.vub.cocompose.lang.impl.core.DefaultModelElement |
getId, getModel, getName, 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.Namespace |
addOwnedElement, addOwnedElement, getDeepOwnedElement, getDeepOwnedElements, getOwnedElement, getOwnedElementId, getOwnedElements, getOwnedElements, getOwnedIds, isRegistered, registerNameChange, removeOwnedElement |
Methods inherited from interface be.ac.vub.cocompose.lang.core.ModelElement |
getId, getModel, getName, getNamespace, getRootNamespace, setId, setName, setNamespace |
Methods inherited from interface be.ac.vub.cocompose.lang.Element |
addPropertyChangeListener, removePropertyChangeListener |
Constructor Detail |
public DefaultRelationElement()
Method Detail |
protected Color getDefaultBackgroundColor()
public List getRelationships()
getRelationships
in interface RelationElement
public List getSourceRelationships()
getSourceRelationships
in interface RelationElement
public List getTargetRelationships()
getTargetRelationships
in interface RelationElement
public void accept(ModelVisitor modelVisitor) throws ModelElementException
accept
in interface VisitedElement
accept
in class DefaultNamespace
modelVisitor
- The visitor to accept.
ModelElementException
public void addRelationship(Relationship relationship)
addRelationship
in interface RelationElement
relationship
- - the relationship to add.public void addRelationship(int index, Relationship relationship)
addRelationship
in interface RelationElement
index
- - the index at which to add the relationship.relationship
- - the relationship to add.public void removeRelationship(Relationship relationship)
removeRelationship
in interface RelationElement
relationship
- - the relationship to remove.public Point getPosition()
getPosition
in interface RelationElement
public void setPosition(Point position)
setPosition
in interface RelationElement
position
- - the position.public Color getBackgroundColor()
getBackgroundColor
in interface RelationElement
public void setBackgroundColor(Color bgcolor)
setBackgroundColor
in interface RelationElement
bgcolor
- - the background color.protected void fireBackgroundColorUpdate()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |