1 package fr.orsay.lri.varna.applications.newGUI;
3 import java.awt.Graphics;
4 import java.awt.Rectangle;
5 import java.awt.dnd.DragGestureEvent;
6 import java.awt.dnd.DragGestureListener;
7 import java.awt.dnd.DragGestureRecognizer;
8 import java.awt.dnd.DragSource;
9 import java.awt.dnd.MouseDragGestureRecognizer;
10 import java.awt.event.MouseEvent;
11 import java.awt.event.MouseListener;
13 import javax.swing.JComponent;
14 import javax.swing.JTree;
15 import javax.swing.plaf.basic.BasicTreeUI;
16 import javax.swing.tree.AbstractLayoutCache;
17 import javax.swing.tree.DefaultMutableTreeNode;
18 import javax.swing.tree.TreePath;
20 public class VARNAGUITree extends JTree implements MouseListener {
24 public VARNAGUITree(VARNAGUITreeModel m)
31 public DefaultMutableTreeNode getSelectedNode()
33 TreePath t = getSelectionPath();
36 return (DefaultMutableTreeNode) t.getLastPathComponent();
41 public void mouseClicked(MouseEvent e) {
44 TreePath tp = this.getPathForLocation(x, y);
47 DefaultMutableTreeNode n = (DefaultMutableTreeNode) tp.getLastPathComponent();
52 public void mousePressed(MouseEvent e) {
53 // TODO Auto-generated method stub
57 public void mouseReleased(MouseEvent e) {
58 // TODO Auto-generated method stub
62 public void mouseEntered(MouseEvent e) {
63 // TODO Auto-generated method stub
67 public void mouseExited(MouseEvent e) {
68 // TODO Auto-generated method stub