Author: pwang
Date: 2010-07-08 12:54:03 -0700 (Thu, 08 Jul 2010)
New Revision: 20855

Modified:
   coreplugins/trunk/filters/src/cytoscape/filters/view/EditRangeDialog.java
Log:
Fixed bug #0002100: Numeric Filter Ranges Slider Does Not Slide

Modified: 
coreplugins/trunk/filters/src/cytoscape/filters/view/EditRangeDialog.java
===================================================================
--- coreplugins/trunk/filters/src/cytoscape/filters/view/EditRangeDialog.java   
2010-07-08 19:50:01 UTC (rev 20854)
+++ coreplugins/trunk/filters/src/cytoscape/filters/view/EditRangeDialog.java   
2010-07-08 19:54:03 UTC (rev 20855)
@@ -22,7 +22,7 @@
         
         dataType = pDataType;
         
-        String message = lbPleaseEnterBoundValues.getText()+ " (" + 
pBoundsVect.elementAt(2).toString()+ "~" +pBoundsVect.elementAt(3).toString() + 
"):";
+        String message = lbPleaseEnterBoundValues.getText()+ " (" + 
pBoundsVect.elementAt(2).toString()+ " ~ " +pBoundsVect.elementAt(3).toString() 
+ "):";
         lbPleaseEnterBoundValues.setText(message);
         
         boundValueVect = pBoundsVect;
@@ -48,10 +48,16 @@
                if (dataType.equalsIgnoreCase("int")) {                 
                try {
                        int lowBound = Integer.parseInt(lowBoundStr);
-                       int highBound = Integer.parseInt(highBoundStr);
+                       int highBound = Integer.parseInt(highBoundStr);         
        
                        if (lowBound > highBound) {
                                return false;
-                       }        
+                       }
+                       
+                       int minValue = 
Integer.parseInt(this.boundValueVect.elementAt(2));
+                       int maxValue = 
Integer.parseInt(this.boundValueVect.elementAt(3));
+                       if (lowBound > maxValue || highBound < minValue){
+                               return false;
+                       }                       
                } 
                catch (NumberFormatException nfe) {
                                return false;
@@ -63,7 +69,13 @@
                        double highBound = Double.parseDouble(highBoundStr);
                        if (lowBound > highBound) {
                                return false;
-                       }                               
+                       }
+                       
+                       double minValue = 
Double.parseDouble(this.boundValueVect.elementAt(2));
+                       double maxValue = 
Double.parseDouble(this.boundValueVect.elementAt(3));
+                       if (lowBound > maxValue || highBound < minValue){
+                               return false;
+                       }                       
                } 
                catch (NumberFormatException nfe) {
                                return false;

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to