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

java.lang.Object
  extended byuk.ac.kcl.cch.jb.pliny.views.utils.ResourceExplorerItemBase
      extended byuk.ac.kcl.cch.jb.pliny.views.utils.ResourceExplorerNamedModelItem
          extended byuk.ac.kcl.cch.jb.pliny.views.utils.ResourceExplorerResourceItem
All Implemented Interfaces:
EventListener, IResourceExplorerItem, PropertyChangeListener
Direct Known Subclasses:
ResourceExplorerDisplayedInItem, ResourceExplorerFavouriteItem, ResourceExplorerSurrogateItem

public class ResourceExplorerResourceItem
extends ResourceExplorerNamedModelItem

provides Resource Explorer model elements for Pliny Resources displayed in the Resource Explorer's display.

Items below each of these items is a list of names grouped by the initial letter. This is managed by a ResourceNameManager.

Author:
John Bradley

Field Summary
 
Fields inherited from class uk.ac.kcl.cch.jb.pliny.views.utils.ResourceExplorerItemBase
myChildren, myView
 
Constructor Summary
ResourceExplorerResourceItem(IResourceTreeView myView, IResourceExplorerItem parent, Resource theObject)
           
 
Method Summary
 Iterator createListIterator()
           
 List getChildren()
          returns a list of IResourceExplorerItem items that are children of 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.
 Resource getResource()
           
 boolean hasChildren()
          returns true if this item has children items.
 IResourceExplorerItem makeChild(Object item)
           
 
Methods inherited from class uk.ac.kcl.cch.jb.pliny.views.utils.ResourceExplorerNamedModelItem
canModify, getNamedObject, getParent, getText, propertyChange, setText
 
Methods inherited from class uk.ac.kcl.cch.jb.pliny.views.utils.ResourceExplorerItemBase
dispose, getAssociatedObject, getBaseObject, getChildrenList, getMyView, getNumberChildren, getPageNumber, setBaseObject, updateMyChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceExplorerResourceItem

public ResourceExplorerResourceItem(IResourceTreeView myView,
                                    IResourceExplorerItem parent,
                                    Resource theObject)
Method Detail

getResource

public Resource getResource()

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 ResourceExplorerNamedModelItem

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

getChildren

public List getChildren()
Description copied from interface: IResourceExplorerItem
returns a list of IResourceExplorerItem items that are children of this item.

Specified by:
getChildren in interface IResourceExplorerItem
Overrides:
getChildren 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