uk.ac.kcl.cch.jb.pliny.views.utils
Class ResourceNameInitialLetter

java.lang.Object
  extended byuk.ac.kcl.cch.rdb2java.dynData.PropertyChangeObject
      extended byuk.ac.kcl.cch.jb.pliny.views.utils.ResourceNameInitialLetter
All Implemented Interfaces:
EventListener, IPropertyChangeObject, PropertyChangeListener

public class ResourceNameInitialLetter
extends PropertyChangeObject
implements PropertyChangeListener

this class is part of the Resource Explorer data model and keeps track of Pliny Resources of a certain ObjectType with a specified intial letter. It works with a ResourceNameManager which keeps track of the Resources and notifies an instance of this class when a change in its Resources have happened.

This object implements a 'lazy' management model -- only loading its Resources when it is actually opened by the user. Once opened, it tracks changes in the names of the Resources it manages and notifies its ResourceNameManager whenever a number change happens.

Author:
John Bradley
See Also:
ResourceNameManager

Constructor Summary
ResourceNameInitialLetter(Character c, ResourceNameManager manager, ObjectType myType)
           
ResourceNameInitialLetter(String c, ResourceNameManager manager, ObjectType myType)
           
 
Method Summary
 void addResource(Resource resource)
           
 void doInitLetterPropertyChangeFire(Object item1, Object item2)
           
 Iterator getChildrenIterator()
           
 int getCount()
           
 String getLetter()
           
 String getText()
           
 void moveResource(Resource resource, String oldName)
           
 void propertyChange(PropertyChangeEvent arg0)
           
 void removeResource(Resource resource)
           
 void removeResource(String oldName, Resource resource)
           
 boolean resourcesLoaded()
           
 void setCount(int count)
           
 
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
 

Constructor Detail

ResourceNameInitialLetter

public ResourceNameInitialLetter(Character c,
                                 ResourceNameManager manager,
                                 ObjectType myType)

ResourceNameInitialLetter

public ResourceNameInitialLetter(String c,
                                 ResourceNameManager manager,
                                 ObjectType myType)
Method Detail

setCount

public void setCount(int count)

getCount

public int getCount()

resourcesLoaded

public boolean resourcesLoaded()

getLetter

public String getLetter()

getText

public String getText()

getChildrenIterator

public Iterator getChildrenIterator()

removeResource

public void removeResource(Resource resource)

removeResource

public void removeResource(String oldName,
                           Resource resource)

addResource

public void addResource(Resource resource)

moveResource

public void moveResource(Resource resource,
                         String oldName)

propertyChange

public void propertyChange(PropertyChangeEvent arg0)
Specified by:
propertyChange in interface PropertyChangeListener

doInitLetterPropertyChangeFire

public void doInitLetterPropertyChangeFire(Object item1,
                                           Object item2)