Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.lutris.dods.gui.tree
Class DOTreeMouseListener  view DOTreeMouseListener download DOTreeMouseListener.java

java.lang.Object
  extended byjava.awt.event.MouseAdapter
      extended bycom.lutris.dods.gui.tree.DOTreeMouseListener
All Implemented Interfaces:
java.util.EventListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener

public final class DOTreeMouseListener
extends java.awt.event.MouseAdapter
implements java.awt.event.MouseMotionListener

This class handles when you want to drag a Node in the tree to a new parent node.


Field Summary
private  javax.swing.tree.TreePath currentPath
           
private  com.lutris.dods.gui.DataObjectApplication doa
           
private  java.awt.Cursor normal
           
private  javax.swing.tree.TreePath originalPath
           
(package private) static java.util.ResourceBundle res
           
private  DOTreeNode selectedNode
           
private  javax.swing.JTable table
           
private  javax.swing.JTree tree
           
 
Constructor Summary
DOTreeMouseListener(com.lutris.dods.gui.DataObjectApplication da, javax.swing.JTable tab)
          Initializes the appropriate variables.
 
Method Summary
 void mouseClicked(java.awt.event.MouseEvent e)
          If you double click on a Leaf in the tree, an editor will be launched.
 void mouseDragged(java.awt.event.MouseEvent e)
          If the mouse is dragged over a node where the selected node can be put then that node is highlighted, else the selected node is highlighted.
 void mouseMoved(java.awt.event.MouseEvent e)
          Does nothing.
 void mousePressed(java.awt.event.MouseEvent e)
          When the mouse is pressed, the node it is over is selected and can be dragged.
 void mouseReleased(java.awt.event.MouseEvent e)
          When the Mouse is released if the selected node can be placed in the node where the mouse is released then it will be.
 
Methods inherited from class java.awt.event.MouseAdapter
mouseEntered, mouseExited
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

res

static java.util.ResourceBundle res

doa

private com.lutris.dods.gui.DataObjectApplication doa

tree

private javax.swing.JTree tree

selectedNode

private DOTreeNode selectedNode

normal

private java.awt.Cursor normal

currentPath

private javax.swing.tree.TreePath currentPath

originalPath

private javax.swing.tree.TreePath originalPath

table

private javax.swing.JTable table
Constructor Detail

DOTreeMouseListener

public DOTreeMouseListener(com.lutris.dods.gui.DataObjectApplication da,
                           javax.swing.JTable tab)
Initializes the appropriate variables.

Method Detail

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
When the mouse is pressed, the node it is over is selected and can be dragged.

Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
When the Mouse is released if the selected node can be placed in the node where the mouse is released then it will be.

Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
If you double click on a Leaf in the tree, an editor will be launched.

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Does nothing.

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
If the mouse is dragged over a node where the selected node can be put then that node is highlighted, else the selected node is highlighted.

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener