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

java.lang.Object
  extended byuk.ac.kcl.cch.jb.pliny.views.utils.ResourceExplorerItemBase
      extended byuk.ac.kcl.cch.jb.pliny.views.utils.ResourceExplorerFavGroupItem
All Implemented Interfaces:
EventListener, IResourceExplorerItem, PropertyChangeListener

public class ResourceExplorerFavGroupItem
extends ResourceExplorerItemBase

provides the model object for the Favourites (now called 'Bookmarks') list. Tracks the creation and removal of Favourite items so that its list is kept up-to-date.

Author:
John Bradley

Field Summary
 
Fields inherited from class uk.ac.kcl.cch.jb.pliny.views.utils.ResourceExplorerItemBase
myChildren, myView
 
Constructor Summary
ResourceExplorerFavGroupItem(IResourceTreeView myView, ResourceExplorerRoot parent, String name)
           
 
Method Summary
 boolean canModify()
          return true if this item's name can be edited within the Resource Explorer.
 Iterator createListIterator()
           
 void dispose()
          performs data cleanup.
 Object getAssociatedObject()
          returns the Pliny model object associated with this item.
 org.eclipse.swt.graphics.Image getIcon()
          returns the Image to be used as the Icon displayed beside the item in the Resource Explorer tree.
 int getNumberChildren()
          returns number of children owned by this item.
 IResourceExplorerItem getParent()
          returns the parent item of this item in the Resource Explorer display tree.
 String getText()
          returns text to be used as the textual label for the tree item display.
 boolean hasChildren()
          returns true if this item has children items.
 IResourceExplorerItem makeChild(Object item)
           
 void propertyChange(PropertyChangeEvent arg0)
           
 void setText(String name)
          changes text to be displayed as the label to the given text.
 
Methods inherited from class uk.ac.kcl.cch.jb.pliny.views.utils.ResourceExplorerItemBase
getBaseObject, getChildren, getChildrenList, getMyView, getPageNumber, setBaseObject, updateMyChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceExplorerFavGroupItem

public ResourceExplorerFavGroupItem(IResourceTreeView myView,
                                    ResourceExplorerRoot parent,
                                    String name)
Method Detail

dispose

public void dispose()
Description copied from interface: IResourceExplorerItem
performs data cleanup. This will be called then the item is no longer needed.

Specified by:
dispose in interface IResourceExplorerItem
Overrides:
dispose in class ResourceExplorerItemBase

getText

public String getText()
Description copied from interface: IResourceExplorerItem
returns text to be used as the textual label for the tree item display.

Specified by:
getText in interface IResourceExplorerItem
Specified by:
getText in class ResourceExplorerItemBase

setText

public void setText(String name)
Description copied from interface: IResourceExplorerItem
changes text to be displayed as the label to the given text. This should result in changes in the backing Pliny model as well.

Specified by:
setText in interface IResourceExplorerItem
Specified by:
setText in class ResourceExplorerItemBase

canModify

public boolean canModify()
Description copied from interface: IResourceExplorerItem
return true if this item's name can be edited within the Resource Explorer.

Specified by:
canModify in interface IResourceExplorerItem
Specified by:
canModify in class ResourceExplorerItemBase

getAssociatedObject

public Object getAssociatedObject()
Description copied from interface: IResourceExplorerItem
returns the Pliny model object associated with this item. Return null if there is not Pliny model object.

Specified by:
getAssociatedObject in interface IResourceExplorerItem
Overrides:
getAssociatedObject in class ResourceExplorerItemBase

getIcon

public org.eclipse.swt.graphics.Image getIcon()
Description copied from interface: IResourceExplorerItem
returns the Image to be used as the Icon displayed beside the item in the Resource Explorer tree. The image must be disposed of by this object -- it will not be disposed by the caller.

Specified by:
getIcon in interface IResourceExplorerItem
Specified by:
getIcon in class ResourceExplorerItemBase

getParent

public IResourceExplorerItem getParent()
Description copied from interface: IResourceExplorerItem
returns the parent item of this item in the Resource Explorer display tree.

Specified by:
getParent in interface IResourceExplorerItem
Specified by:
getParent in class ResourceExplorerItemBase

hasChildren

public boolean hasChildren()
Description copied from interface: IResourceExplorerItem
returns true if this item has children items.

Specified by:
hasChildren in interface IResourceExplorerItem
Overrides:
hasChildren in class ResourceExplorerItemBase

getNumberChildren

public int getNumberChildren()
Description copied from interface: IResourceExplorerItem
returns number of children owned by this item.

Specified by:
getNumberChildren in interface IResourceExplorerItem
Overrides:
getNumberChildren in class ResourceExplorerItemBase

propertyChange

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

createListIterator

public Iterator createListIterator()
Specified by:
createListIterator in class ResourceExplorerItemBase

makeChild

public IResourceExplorerItem makeChild(Object item)
Specified by:
makeChild in class ResourceExplorerItemBase