uk.ac.kcl.cch.jb.pliny.containmentView.model
Class ContainmentLinkEnd
java.lang.Object
uk.ac.kcl.cch.rdb2java.dynData.PropertyChangeObject
uk.ac.kcl.cch.jb.pliny.containmentView.model.ContainmentLinkEnd
- All Implemented Interfaces:
- EventListener, IPropertyChangeObject, PropertyChangeListener
- public class ContainmentLinkEnd
- extends PropertyChangeObject
- implements PropertyChangeListener
part of the data model for the ContainmentView that represents the ends
(arrowheads) of the links between ContainmentItems.
As representation of the ends of the links, it is natural that it track
changes in the corresponding
LinkableObject
that
indicates when a new colour for the arrow is neede. There are two
situations that are tracked by generating events:
COLOUR_EVENT
: when a colour change is needed because
a colour associated with a type has changed.
NEW_TYPE_EVENT
: when a colour change is needed because
the type associated with the LinkableObject has changed. This event might
also be important is the new type represents a move from a link that
should not be displayed (because the LOType has been excluded from display)
or vice-versa.
To track these two events, this object listens to both its LinkableObject
and to the
LOType
associated with it.
- Author:
- John Bradley
COLOUR_EVENT
public static final String COLOUR_EVENT
- See Also:
- Constant Field Values
NEW_TYPE_EVENT
public static final String NEW_TYPE_EVENT
- See Also:
- Constant Field Values
ContainmentLinkEnd
public ContainmentLinkEnd(LinkableObject myObject)
- builds a instance of this model object for the given
LinkableObject
.
- Parameters:
myObject
- LinkableObject object this instance should be associated with.
dispose
public void dispose()
getMyColour
public org.eclipse.swt.graphics.Color getMyColour()
getMyLinkableObject
public LinkableObject getMyLinkableObject()
propertyChange
public void propertyChange(PropertyChangeEvent arg0)
- this method is called whenever a property associated
with either the LinkableObject or its LOType is changed.
- Specified by:
propertyChange
in interface PropertyChangeListener
toString
public String toString()