edu.uky.rch.ept.projectexplorer.scan
Class ScanListItem

java.lang.Object
  extended byedu.uky.rch.ept.projectexplorer.model.ProjectItem
      extended byedu.uky.rch.ept.projectexplorer.scan.ScanListItem
All Implemented Interfaces:
IProjectItem

public class ScanListItem
extends ProjectItem

Project item representing a list of results from a file scan.

Author:
neil

Constructor Summary
ScanListItem(Project parent, String pattern)
          Create a new scan list item belonging to the specified parent project.
ScanListItem(Project parent, String pattern, String label)
          Create a new labelled scan list item belonging to the specified parent project.
 
Method Summary
 Object[] getChildren()
          Returns the children of this item.
 String getLabelText()
          Returns the label to be used for this item in the UI.
protected  IDoubleClickAction getResourceDoubleClickAction()
          Get the double-click action associated with resources in this list.
 boolean hasChildren()
          Checks if the item has any children.
protected  void setResourceDoubleClickAction(IDoubleClickAction dca)
          Set the double-click action associated with resources in this list.
 
Methods inherited from class edu.uky.rch.ept.projectexplorer.model.ProjectItem
getEditorId, getEditorInput, getLabelImage, getParent, getProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScanListItem

public ScanListItem(Project parent,
                    String pattern,
                    String label)
Create a new labelled scan list item belonging to the specified parent project. The item contains a list of the files in the project which match the given pattern.

Parameters:
parent - the project to which this item belongs; also, the project to be scanned.
pattern - the pattern (a regular expression). Only files (not directories) matching this pattern will be displayed.
label - the label for this item.
Throws:
PatternSyntaxException - if the pattern was invalid.

ScanListItem

public ScanListItem(Project parent,
                    String pattern)
Create a new scan list item belonging to the specified parent project. The item contains a list of the files in the project which match the given pattern. The label is generated from the pattern.

Parameters:
parent - the project to which this item belongs; also, the project to be scanned.
pattern - the pattern (a regular expression). Only files (not directories) matching this pattern will be displayed.
Throws:
PatternSyntaxException - if the pattern was invalid.
Method Detail

getChildren

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

Specified by:
getChildren in interface IProjectItem
Overrides:
getChildren in class ProjectItem

hasChildren

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

Specified by:
hasChildren in interface IProjectItem
Overrides:
hasChildren in class ProjectItem

getLabelText

public 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
Specified by:
getLabelText in class ProjectItem

getResourceDoubleClickAction

protected IDoubleClickAction getResourceDoubleClickAction()
Get the double-click action associated with resources in this list.

Returns:
an IDoubleClickAction, or null if none are associated with this scan.

setResourceDoubleClickAction

protected void setResourceDoubleClickAction(IDoubleClickAction dca)
Set the double-click action associated with resources in this list.

Parameters:
dca - an IDoubleClickAction, which will be called with a ScanResource argument when a resource in this list is double- clicked.