Revision: 5679
          http://sourceforge.net/p/jump-pilot/code/5679
Author:   ma15569
Date:     2018-01-25 13:20:24 +0000 (Thu, 25 Jan 2018)
Log Message:
-----------
small enhancement on RasterQueryCursorTool

Modified Paths:
--------------
    core/trunk/src/org/openjump/core/ui/plugin/raster/RasterQueryCursorTool.java

Modified: 
core/trunk/src/org/openjump/core/ui/plugin/raster/RasterQueryCursorTool.java
===================================================================
--- 
core/trunk/src/org/openjump/core/ui/plugin/raster/RasterQueryCursorTool.java    
    2018-01-22 14:14:14 UTC (rev 5678)
+++ 
core/trunk/src/org/openjump/core/ui/plugin/raster/RasterQueryCursorTool.java    
    2018-01-25 13:20:24 UTC (rev 5679)
@@ -83,8 +83,9 @@
      * SHIFT to display only last measure. Moving cursor on image shows raster
      * cell value on lower panel
      * 
-     * [2014_02_24] Giuseppe Aruta - Fixed minor bug on lower panel
-     * [2015_07_08] Giuseppe Aruta - Fixed bug #407 Sextante raster : 
displaying cell values throws NPE 
+     * [2014_02_24] Giuseppe Aruta - Fixed minor bug on lower panel 
[2015_07_08]
+     * Giuseppe Aruta - Fixed bug #407 Sextante raster : displaying cell values
+     * throws NPE
      */
 
     protected Coordinate tentativeCoordinate;
@@ -92,7 +93,8 @@
             
.get("org.openjump.core.ui.plugin.raster.RasterImageLayerPropertiesPlugIn.cell.values");
     public static final String LAYER = I18N
             
.get("org.openjump.core.ui.plugin.raster.RasterImageLayerPropertiesPlugIn.layer");
-
+    private final static String RASTER_NODATA = I18N
+            
.get("org.openjump.core.ui.plugin.raster.RasterImageLayerPropertiesPlugIn.cell.nodata");
     private String lastClick = "-";
     // protected int width, height; // The dimensions of the image
 
@@ -107,10 +109,12 @@
 
     }
 
+    @Override
     public Icon getIcon() {
         return IconLoader.icon("information_16x16.png");
     }
 
+    @Override
     public Cursor getCursor() {
         // [ede 03.2103] linux currently support only 2 color cursors
         Image i = !CheckOS.isLinux() ? IconLoader
@@ -119,6 +123,7 @@
         return createCursor(i);
     }
 
+    @Override
     protected void gestureFinished() throws NoninvertibleTransformException,
             IOException, RasterDataNotFoundException {
         reportNothingToUndoYet();
@@ -127,7 +132,7 @@
 
         final WorkbenchContext wbcontext = this.getWorkbench().getContext();
         RasterImageLayer aLayer = null;
-       
+
         Layerable[] ls = (Layerable[]) wbcontext.getLayerNamePanel()
                 .selectedNodes(RasterImageLayer.class)
                 .toArray(new Layerable[] {});
@@ -145,7 +150,11 @@
                                 coord.y, b);
                         if (cellValue != null) {
                             if (rLayer.isNoData(cellValue)) {
-                                cellValues = Double.toString(Double.NaN);
+                                cellValues = "("
+                                        + RASTER_NODATA
+                                        + ") "
+                                        + cellValues.concat(Double
+                                                .toString(cellValue));
                             } else {
                                 cellValues = cellValues.concat(Double
                                         .toString(cellValue));
@@ -284,6 +293,7 @@
      * TODO: if user drag on image, measures on lower panel are no more
      * displayed. Try to find a solution
      */
+    @Override
     public void mouseDragged(MouseEvent e) {
         // mouseLocationChanged(e);
     }
@@ -293,6 +303,7 @@
      */
     PlugInContext gContext;
 
+    @Override
     public void mouseMoved(MouseEvent me) {
 
         final WorkbenchContext wbcontext = this.getWorkbench().getContext();


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to