|
From: <eki...@us...> - 2006-11-08 13:51:25
|
Revision: 99
http://svn.sourceforge.net/jtreemap/?rev=99&view=rev
Author: ekingulen
Date: 2006-11-08 05:51:19 -0800 (Wed, 08 Nov 2006)
Log Message:
-----------
- single click zooms in
Modified Paths:
--------------
trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/JTreeMap.java
Modified: trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/JTreeMap.java
===================================================================
--- trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/JTreeMap.java 2006-11-08 09:49:16 UTC (rev 98)
+++ trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/JTreeMap.java 2006-11-08 13:51:19 UTC (rev 99)
@@ -586,31 +586,31 @@
@Override
public void mouseClicked(MouseEvent e) {
- if (e.getClickCount() >= 2) {
- final TreeMapNode t = getDisplayedRoot().getChild(e.getX(), e.getY());
- if ( t != null && !t.isLeaf()) {
- if (treeView == null) {
- zoom(t);
- } else {
- zoom(t);
- // dont know why below does not work so for now leave it commented out
- // treeView.setSelectionPath(new TreePath(t.getPath()));
- }
-
+// if (e.getClickCount() >= 2) {
+ final TreeMapNode t = getDisplayedRoot().getChild(e.getX(), e.getY());
+ if ( t != null && !t.isLeaf()) {
+ if (treeView == null) {
+ zoom(t);
} else {
- if (treeView == null) {
- zoom((TreeMapNode)getDisplayedRoot().getParent());
- } else {
- zoom((TreeMapNode)getDisplayedRoot().getParent());
- // dont know why below does not work so for now leave it commented out
- //treeView.setSelectionPath(new TreePath(((TreeMapNode)getDisplayedRoot().getParent()).getPath()));
- }
+ zoom(t);
+ // dont know why below does not work so for now leave it commented out
+ // treeView.setSelectionPath(new TreePath(t.getPath()));
}
- repaint();
+
+ } else {
+ if (treeView == null) {
+ zoom((TreeMapNode)getDisplayedRoot().getParent());
+ } else {
+ zoom((TreeMapNode)getDisplayedRoot().getParent());
+ // dont know why below does not work so for now leave it commented out
+ //treeView.setSelectionPath(new TreePath(((TreeMapNode)getDisplayedRoot().getParent()).getPath()));
+ }
}
+ repaint();
+// }
}
}
-
+
/**
* Class who zoom and unzoom the JTreeMap.
*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|