|
From: <eki...@us...> - 2006-12-12 22:41:53
|
Revision: 118
http://svn.sourceforge.net/jtreemap/?rev=118&view=rev
Author: ekingulen
Date: 2006-12-12 14:41:48 -0800 (Tue, 12 Dec 2006)
Log Message:
-----------
- applet reload issue fixed.
Modified Paths:
--------------
trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/DefaultToolTip.java
trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/JTreeMap.java
trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/example/JTreeMapAppletExample.java
Modified: trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/DefaultToolTip.java
===================================================================
--- trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/DefaultToolTip.java 2006-12-12 12:56:53 UTC (rev 117)
+++ trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/DefaultToolTip.java 2006-12-12 22:41:48 UTC (rev 118)
@@ -36,7 +36,6 @@
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
-import java.awt.Graphics2D;
import javax.swing.JToolTip;
@@ -91,7 +90,7 @@
@Override
public void paint(final Graphics g) {
if (this.jTreeMap.getActiveLeaf() != null) {
- Graphics2D g2D = (Graphics2D) g;
+ Graphics g2D = (Graphics) g;
g2D.setColor(Color.YELLOW);
g2D.fill3DRect(0, 0, this.getWidth(), this.getHeight(), true);
g2D.setColor(Color.black);
Modified: trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/JTreeMap.java
===================================================================
--- trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/JTreeMap.java 2006-12-12 12:56:53 UTC (rev 117)
+++ trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/JTreeMap.java 2006-12-12 22:41:48 UTC (rev 118)
@@ -585,12 +585,6 @@
setActiveLeaf(t);
repaint();
}
- if (t != null) {
- setToolTipText(t.getLabel() + " " + t.getValue().getValue());
-// setToolTipText(t.getLabel() + " " + t.getValue().getValue() + ", Weight = " + t.getWeight());
- } else {
- setToolTipText(null);
- }
}
}
}
Modified: trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/example/JTreeMapAppletExample.java
===================================================================
--- trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/example/JTreeMapAppletExample.java 2006-12-12 12:56:53 UTC (rev 117)
+++ trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/example/JTreeMapAppletExample.java 2006-12-12 22:41:48 UTC (rev 118)
@@ -126,14 +126,23 @@
super();
}
- /*
- * (non-Javadoc)
+ /**
*
- * @see java.applet.Applet#start()
*/
- @Override
- public void start() {
- super.start();
+ private void initGUI() {
+ // Width and height params are mandatory for an applet/object element in html
+ // and should be defined via html.
+ // this.setSize(APPLET_WIDTH, APPLET_HEIGHT);
+ this.setContentPane(getJContentPane());
+ showTM3CTonf = "true".equalsIgnoreCase(getParameter("showTM3Conf"));
+ showTree = "true".equalsIgnoreCase(getParameter("viewTree"));
+ showWeight = "true".equalsIgnoreCase(getParameter("showWeight"));
+ weightPrefix = getParameter("weightPrefix");
+ valuePrefix = getParameter("valuePrefix");
+ if (showTM3CTonf) {
+ addPanelEast(getJContentPane());
+ }
+
final String dataFile = getParameter("dataFile");
final String dataFileType = getParameter("dataFileType");
TreeMapNode root = null;
@@ -340,18 +349,7 @@
*/
@Override
public void init() {
- // Width and height params are mandatory for an applet/object element in html
- // and should be defined via html.
- // this.setSize(APPLET_WIDTH, APPLET_HEIGHT);
- this.setContentPane(getJContentPane());
- showTM3CTonf = "true".equalsIgnoreCase(getParameter("showTM3Conf"));
- showTree = "true".equalsIgnoreCase(getParameter("viewTree"));
- showWeight = "true".equalsIgnoreCase(getParameter("showWeight"));
- weightPrefix = getParameter("weightPrefix");
- valuePrefix = getParameter("valuePrefix");
- if (showTM3CTonf) {
- addPanelEast(getJContentPane());
- }
+ initGUI();
}
/**
@@ -369,9 +367,12 @@
}
@Override
- public void stop() {
- jTreeMap.createToolTip().setVisible(false);
+ public void destroy() {
+ super.destroy();
+ this.jContentPane.removeAll();
}
+
+
}
/*
* ObjectLab is supporing JTreeMap
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|