summaryrefslogtreecommitdiff
path: root/java/ImageProcessing/framework/ImageCanvas.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/ImageProcessing/framework/ImageCanvas.java')
-rw-r--r--java/ImageProcessing/framework/ImageCanvas.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/java/ImageProcessing/framework/ImageCanvas.java b/java/ImageProcessing/framework/ImageCanvas.java
index 182bd54bf9b..f527accf545 100644
--- a/java/ImageProcessing/framework/ImageCanvas.java
+++ b/java/ImageProcessing/framework/ImageCanvas.java
@@ -143,13 +143,10 @@ class ImageCanvas extends Canvas
// Check if mouse is within the bounds of the image
private boolean inBounds (int x, int y)
{
- if (this.image_ == null)
- return false;
- else
- return (x >= this.x_) &&
- (y >= this.y_) &&
- (x <= (this.x_ + this.zoom_ * this.image_.getWidth (this))) &&
- (y <= (this.y_ + this.zoom_ * this.image_.getHeight (this)));
+ return (x >= this.x_) &&
+ (y >= this.y_) &&
+ (x <= (this.x_ + this.zoom_ * this.image_.getWidth (this))) &&
+ (y <= (this.y_ + this.zoom_ * this.image_.getHeight (this)));
}
private MediaTracker tracker_ = new MediaTracker(this);