edu.uky.rch.ept.projectexplorer.model
Class ProjectItem

java.lang.Object
  extended byedu.uky.rch.ept.projectexplorer.model.ProjectItem
All Implemented Interfaces:
IProjectItem
Direct Known Subclasses:
Resource, ScanListItem

public abstract class ProjectItem
extends Object
implements IProjectItem

Abstract base implementation for a project item.

This class should be subclassed by clients wishing to define new project items.

Author:
Sandeep Bodapati

Constructor Summary
ProjectItem(IProjectItem parent)
          Creates a new Project Item with the given project item as the parent.
ProjectItem(Project parent)
          Creates a new Project Item with the given Project as the parent.
 
Method Summary
 Object[] getChildren()
          Returns the children of this item.
 String getEditorId()
          Returns the ID of the editor to launch if this item is editable, null otherwise.
 org.eclipse.ui.IEditorInput getEditorInput()
          Returns the EditorInput object for this item, if supported; null otherwise.
 org.eclipse.jface.resource.ImageDescriptor getLabelImage()
          Returns an ImageDescriptor specifying the icon to be used for this item in the UI.
abstract  String getLabelText()
          Returns the label to be used for this item in the UI.
 Object getParent()
          Returns the parent of this item.
 Project getProject()
          Returns the project to which this item belongs.
 boolean hasChildren()
          Checks if the item has any children.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectItem

public ProjectItem(IProjectItem parent)
Creates a new Project Item with the given project item as the parent.

Parameters:
parent - parent project item

ProjectItem

public ProjectItem(Project parent)
Creates a new Project Item with the given Project as the parent.

Parameters:
parent - parent project
Method Detail

getLabelText

public abstract String getLabelText()
Description copied from interface: IProjectItem
Returns the label to be used for this item in the UI.

Specified by:
getLabelText in interface IProjectItem
Returns:
labeltext

getLabelImage

public org.eclipse.jface.resource.ImageDescriptor getLabelImage()
Description copied from interface: IProjectItem
Returns an ImageDescriptor specifying the icon to be used for this item in the UI.

Specified by:
getLabelImage in interface IProjectItem
Returns:
imagedescriptor of an icon

getParent

public Object getParent()
Description copied from interface: IProjectItem
Returns the parent of this item.

Specified by:
getParent in interface IProjectItem
Returns:
parent

hasChildren

public boolean hasChildren()
Description copied from interface: IProjectItem
Checks if the item has any children.

Specified by:
hasChildren in interface IProjectItem
Returns:
true if the item has children, false otherwise

getChildren

public Object[] getChildren()
Description copied from interface: IProjectItem
Returns the children of this item.

Specified by:
getChildren in interface IProjectItem
Returns:
an array of children

getProject

public Project getProject()
Description copied from interface: IProjectItem
Returns the project to which this item belongs.

Specified by:
getProject in interface IProjectItem
Returns:
project

getEditorId

public String getEditorId()
Description copied from interface: IProjectItem
Returns the ID of the editor to launch if this item is editable, null otherwise.

Specified by:
getEditorId in interface IProjectItem
Returns:
editor_id

getEditorInput

public org.eclipse.ui.IEditorInput getEditorInput()
Description copied from interface: IProjectItem
Returns the EditorInput object for this item, if supported; null otherwise.

Specified by:
getEditorInput in interface IProjectItem
Returns:
EditorInput