uk.ac.kcl.cch.jb.pliny.model
Class ResourceHolder

java.lang.Object
  extended byuk.ac.kcl.cch.rdb2java.dynData.PropertyChangeObject
      extended byuk.ac.kcl.cch.jb.pliny.model.ResourceHolder
All Implemented Interfaces:
IHasResource, IPropertyChangeObject

public class ResourceHolder
extends PropertyChangeObject
implements IHasResource

acts as a surrogate for a {link Resource} which is acting as the root part for a GEF reference/annotation area display. This surrogate model is useful when the display needs to work in situations where the Resource it links to needs to change, since GEF does not allow the root model element to change once established.

Instances of this class are PropertyChangeObjects which means that they can announce when their surrogate Resource has been changed by sending an event with name NEW_RESOURCE_EVENT. This can be used by the root GEF edit part to trigger the update of the display -- redrawing it for the new Resource that has repalced the old.

Author:
John Bradley

Field Summary
static String NEW_RESOURCE_EVENT
           
 
Constructor Summary
ResourceHolder(Resource resource)
           
 
Method Summary
 Resource getResource()
           
 void setResource(Resource resource)
           
 
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, toString, wait, wait, wait
 

Field Detail

NEW_RESOURCE_EVENT

public static final String NEW_RESOURCE_EVENT
See Also:
Constant Field Values
Constructor Detail

ResourceHolder

public ResourceHolder(Resource resource)
Method Detail

getResource

public Resource getResource()
Specified by:
getResource in interface IHasResource

setResource

public void setResource(Resource resource)