edu.rice.cs.util.docnavigation
Interface INavigationListener<ItemT extends INavigatorItem>


public interface INavigationListener<ItemT extends INavigatorItem>

A listener that runs when a document is selected in the navigator and when a document is deselected. The object passed to the listener is a NodeData, which only supports processing via the interface NodeDataVisitor, whose methods, rather than getting the NodeData host, receive the data they were holding. This way, the listener does not need to know what type of information is in the selected node until it is used.


Method Summary
 void gainedSelection(NodeData<? extends ItemT> dat, boolean modelInitiated)
          Runs when an item in a navigator is selected
 void lostSelection(NodeData<? extends ItemT> dat, boolean modelInitiated)
          Runs when an item in a navigator is unselected
 

Method Detail

gainedSelection

void gainedSelection(NodeData<? extends ItemT> dat,
                     boolean modelInitiated)
Runs when an item in a navigator is selected

Parameters:
dat - the NodeData data wrapper for the data in the newly selected node of the navigator
modelInitiated - whether the change was initated by the model (true) or by the user (false)

lostSelection

void lostSelection(NodeData<? extends ItemT> dat,
                   boolean modelInitiated)
Runs when an item in a navigator is unselected

Parameters:
dat - the NodeData data wrapper for the data in the new deselected node of the navigator
modelInitiated - whether the change was initated by the model (true) or by the user (false)