projectviewer.vpt
Class VPTSelectionListener

java.lang.Object
  extended byprojectviewer.vpt.VPTSelectionListener
All Implemented Interfaces:
java.util.EventListener, java.awt.event.MouseListener, javax.swing.event.TreeSelectionListener

public final class VPTSelectionListener
extends java.lang.Object
implements javax.swing.event.TreeSelectionListener, java.awt.event.MouseListener

Listens to the project JTree and responds to file selections.

Version:
$Id: VPTSelectionListener.java 6367 2005-10-28 04:52:13Z vanza $
Author:
Kevin A. Burton, Marcelo Vanzin

Constructor Summary
VPTSelectionListener(ProjectViewer aViewer)
          Create a new ProjectTreeSelectionListener
 
Method Summary
 void mouseClicked(java.awt.event.MouseEvent evt)
          Determines when the user clicks on the JTree.
 void mouseEntered(java.awt.event.MouseEvent evt)
           
 void mouseExited(java.awt.event.MouseEvent evt)
           
 void mousePressed(java.awt.event.MouseEvent evt)
           
 void mouseReleased(java.awt.event.MouseEvent evt)
           
 void valueChanged(javax.swing.event.TreeSelectionEvent e)
          Receive notification that the tree selection has changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VPTSelectionListener

public VPTSelectionListener(ProjectViewer aViewer)
Create a new ProjectTreeSelectionListener

Method Detail

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent evt)
Determines when the user clicks on the JTree.

Specified by:
mouseClicked in interface java.awt.event.MouseListener
Parameters:
evt - Description of Parameter

mousePressed

public void mousePressed(java.awt.event.MouseEvent evt)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent evt)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent evt)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent evt)
Specified by:
mouseExited in interface java.awt.event.MouseListener

valueChanged

public void valueChanged(javax.swing.event.TreeSelectionEvent e)
Receive notification that the tree selection has changed. Shows node information on the status bar and, if the selected node is opened but is not the current buffer, change the current buffer.

Also, if added node is a project, and it's not loaded, load it. This allows easier keyboard navigation when using groups as the & tree root.

Specified by:
valueChanged in interface javax.swing.event.TreeSelectionListener
Parameters:
e - The selection event.