java.lang.Object
java.awt.event.MouseAdapter
com.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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
DOTreeMouseListener
public DOTreeMouseListener(com.lutris.dods.gui.DataObjectApplication da,
javax.swing.JTable tab)
- Initializes the appropriate variables.
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