uk.ac.kcl.cch.jb.pliny.containmentView.model
Class ContainmentLinkEnd

java.lang.Object
  extended byuk.ac.kcl.cch.rdb2java.dynData.PropertyChangeObject
      extended byuk.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:

To track these two events, this object listens to both its LinkableObject and to the LOType associated with it.

Author:
John Bradley

Field Summary
static String COLOUR_EVENT
           
static String NEW_TYPE_EVENT
           
 
Constructor Summary
ContainmentLinkEnd(LinkableObject myObject)
          builds a instance of this model object for the given LinkableObject.
 
Method Summary
 void dispose()
           
 org.eclipse.swt.graphics.Color getMyColour()
           
 LinkableObject getMyLinkableObject()
           
 void propertyChange(PropertyChangeEvent arg0)
          this method is called whenever a property associated with either the LinkableObject or its LOType is changed.
 String toString()
           
 
Methods inherited from class uk.ac.kcl.cch.rdb2java.dynData.PropertyChangeObject
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

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.
Method Detail

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()