JAL-4262 Made deprecation warning properly modal
[jalview.git] / src / jalview / util / imagemaker / BitmapImageSizing.java
index 450b01b..8bd8ec3 100644 (file)
@@ -17,11 +17,16 @@ public class BitmapImageSizing
     this.height = height;
   }
 
+  public boolean isNull()
+  {
+    return scale == 0.0f && width == 0 && height == 0;
+  }
+
   public static BitmapImageSizing nullBitmapImageSizing()
   {
     return new BitmapImageSizing(0.0f, 0, 0);
   }
-  
+
   public static final String BITMAP_SCALE = "BITMAP_SCALE";
 
   public static final String BITMAP_HEIGHT = "BITMAP_HEIGHT";
@@ -34,8 +39,10 @@ public class BitmapImageSizing
    */
   public static BitmapImageSizing defaultBitmapImageSizing()
   {
-    
-    return new BitmapImageSizing(Cache.getDefault(BITMAP_SCALE,0)/10f,Cache.getDefault(BITMAP_WIDTH,0),Cache.getDefault(BITMAP_HEIGHT,0));
-    
+
+    return new BitmapImageSizing(Cache.getDefault(BITMAP_SCALE, 0) / 10f,
+            Cache.getDefault(BITMAP_WIDTH, 0),
+            Cache.getDefault(BITMAP_HEIGHT, 0));
+
   }
 }