On Aug10, michaudm committed a tooltip addition to the com\vividsolutions\jump\workbench\ui\TreeLayerNamePanel.java file (revision 1531 "Display the number of features after the layer name in the layer name tooltip").

It used to be that the Tooltip for a layer was derived by overriding com.vividsolutions.jump.workbench.model.Layer#getDescription().

This no longer works.

I have a couple of custom Layers that retrieve features from a PostGIS database dynamically. The tooltip on these layers is used to display the current SQL query used in this DataStore, but this change in revision 1531 overrides that.

Can someone please commit the attached patch, or alternatively, find a way to display michaudm's change to all Layers that don't return something useful when overriding com.vividsolutions.jump.workbench.model.Layer#getDescription().

Cheers,
Kevin


Index: TreeLayerNamePanel.java
===================================================================
--- TreeLayerNamePanel.java     (revision 1583)
+++ TreeLayerNamePanel.java     (working copy)
@@ -121,19 +121,10 @@
         
         // Added by Michael Michaud on 2008-08-10
         // This adds the number of features in tooltip
-        public String getToolTipText(MouseEvent e) {
-            Object tip = null;
-            TreePath path = getPathForLocation(e.getX(), e.getY());
-            if (path != null) {
-                if (path.getLastPathComponent() instanceof Layer) {
-                    Layer layer = (Layer)path.getLastPathComponent();
-                    tip = layer.getName() + " [" +
-                          layer.getFeatureCollectionWrapper().size() + "]";
-                }
-                else tip = path.getLastPathComponent();
-            }
-            return tip == null ? null : tip.toString();
-        }
+        // Removed by Kevin Neufeld on 2008-10-31 since it interferes with 
useful
+        // tooltips that custom layers create when they override  
+        // com.vividsolutions.jump.workbench.model.Layer#getDescription().
+        // public String getToolTipText(MouseEvent e) {}
         
     };
 
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to