jpov.viewer.tree
Class TreeItemSelection

java.lang.Object
  extended byjpov.viewer.tree.TreeItemSelection
All Implemented Interfaces:
org.eclipse.jface.viewers.ISelectionChangedListener

public class TreeItemSelection
extends java.lang.Object
implements org.eclipse.jface.viewers.ISelectionChangedListener

Tis class implements a selection changed listener for the tree.

Author:
L. Burdy

Constructor Summary
TreeItemSelection(ILemmaViewer ew, ISourceCaseViewer sv, ICaseExplorer ce)
          Constructs a selection changed listener
 
Method Summary
 java.util.Enumeration getLabels()
          Returns the set of labels
 java.util.List getSelectedGoals()
           
 void resetSelectedGoals()
           
 void selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
          If the selected item is a method, a lemma or a goal, sets the origin of the text viewer to the first line of the selected method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeItemSelection

public TreeItemSelection(ILemmaViewer ew,
                         ISourceCaseViewer sv,
                         ICaseExplorer ce)
Constructs a selection changed listener

Parameters:
ew - The current viewer
Method Detail

getSelectedGoals

public java.util.List getSelectedGoals()

resetSelectedGoals

public void resetSelectedGoals()

selectionChanged

public void selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
If the selected item is a method, a lemma or a goal, sets the origin of the text viewer to the first line of the selected method. If the selected item is a lemma, displays the hypothesis; highlights the corresponding boxes and reset the goals window. If the selected item is a goal, displays the hypothesis and the goal, highlights the corresponding boxes.

Specified by:
selectionChanged in interface org.eclipse.jface.viewers.ISelectionChangedListener
Parameters:
event - The selection event

getLabels

public java.util.Enumeration getLabels()
Returns the set of labels

Returns:
the set of currently displayed highlighted boxes.