int offx = 20;\r
int offy = 20;\r
\r
- int threshold;\r
+ float threshold;\r
\r
String longestName;\r
int labelLength=-1;\r
if (threshold != 0)\r
{\r
g.setColor(Color.red);\r
- g.drawLine(threshold,0,threshold,getHeight());\r
+\r
+ int x = (int)( threshold * (float)(getWidth()-labelLength - 2*offx) +offx ) ;\r
+\r
+ g.drawLine(x,0,x,getHeight());\r
}\r
\r
scrollPane.revalidate();\r
// Find threshold\r
\r
if (tree.getMaxHeight() != 0) {\r
- float fthreshold = (float)(x - offx)/(float)(getWidth()-labelLength - 2*offx);\r
- this.threshold = x;\r
+ threshold = (float)(x - offx)/(float)(getWidth()-labelLength - 2*offx);\r
+\r
tree.getGroups().removeAllElements();\r
- tree.groupNodes(tree.getTopNode(),fthreshold);\r
+ tree.groupNodes(tree.getTopNode(),threshold);\r
setColor(tree.getTopNode(),Color.black);\r
\r
av.setSelectionGroup(null);\r