|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.kcl.cch.jb.pliny.views.utils.ResourceExplorerItemBase
provides an abstract base class that provides functionality shared by many of the classes that make up the Resource Explorer's data model.
Implementors can provide a tracking event that, when it occurs
triggers this item's #propertyChange
that will both
request a recreation of this item's children, and then will ask the
associated TreeViewer to redisplay.
Field Summary | |
protected Vector |
myChildren
|
protected IResourceTreeView |
myView
|
Constructor Summary | |
ResourceExplorerItemBase(IResourceTreeView myView,
BaseObject obj,
String trackingProperty)
|
Method Summary | |
abstract boolean |
canModify()
return true if this item's name can be edited within
the Resource Explorer. |
abstract Iterator |
createListIterator()
|
void |
dispose()
performs data cleanup. |
Object |
getAssociatedObject()
returns the Pliny model object associated with this item. |
protected BaseObject |
getBaseObject()
|
List |
getChildren()
returns a list of IResourceExplorerItem items that are children of this item. |
protected List |
getChildrenList()
|
abstract org.eclipse.swt.graphics.Image |
getIcon()
returns the Image to be used as the Icon displayed beside the item in the Resource Explorer tree. |
IResourceTreeView |
getMyView()
|
int |
getNumberChildren()
returns number of children owned by this item. |
int |
getPageNumber()
return the page number data associated with the Pliny model object associated wtih this item. |
abstract IResourceExplorerItem |
getParent()
returns the parent item of this item in the Resource Explorer display tree. |
abstract 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. |
abstract IResourceExplorerItem |
makeChild(Object item)
|
void |
propertyChange(PropertyChangeEvent arg0)
|
protected void |
setBaseObject(BaseObject obj)
|
abstract void |
setText(String name)
changes text to be displayed as the label to the given text. |
protected void |
updateMyChildren()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Vector myChildren
protected IResourceTreeView myView
Constructor Detail |
public ResourceExplorerItemBase(IResourceTreeView myView, BaseObject obj, String trackingProperty)
Method Detail |
protected BaseObject getBaseObject()
protected void setBaseObject(BaseObject obj)
public IResourceTreeView getMyView()
public void dispose()
IResourceExplorerItem
dispose
in interface IResourceExplorerItem
public void propertyChange(PropertyChangeEvent arg0)
propertyChange
in interface PropertyChangeListener
protected void updateMyChildren()
public Object getAssociatedObject()
IResourceExplorerItem
null
if there is not Pliny model object.
getAssociatedObject
in interface IResourceExplorerItem
public abstract String getText()
IResourceExplorerItem
getText
in interface IResourceExplorerItem
public abstract void setText(String name)
IResourceExplorerItem
setText
in interface IResourceExplorerItem
name
- text to be used as the name of this item.public abstract boolean canModify()
IResourceExplorerItem
true
if this item's name can be edited within
the Resource Explorer.
canModify
in interface IResourceExplorerItem
true
if editable.public abstract org.eclipse.swt.graphics.Image getIcon()
IResourceExplorerItem
getIcon
in interface IResourceExplorerItem
public abstract IResourceExplorerItem getParent()
IResourceExplorerItem
getParent
in interface IResourceExplorerItem
protected List getChildrenList()
public int getNumberChildren()
IResourceExplorerItem
getNumberChildren
in interface IResourceExplorerItem
public boolean hasChildren()
IResourceExplorerItem
true
if this item has children items.
hasChildren
in interface IResourceExplorerItem
public List getChildren()
IResourceExplorerItem
getChildren
in interface IResourceExplorerItem
public abstract Iterator createListIterator()
public abstract IResourceExplorerItem makeChild(Object item)
public int getPageNumber()
IResourceExplorerItem
getPageNumber
in interface IResourceExplorerItem
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |