Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2014-2020 Oak Ridge National Laboratory.
* Copyright (c) 2014-2022 Oak Ridge National Laboratory.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -443,10 +443,10 @@ public void setCrosshairLocation(final double x_val, final double y_val)
}

/** Set axis range for 'full' image
* @param min_x
* @param max_x
* @param min_y
* @param max_y
* @param min_x User coordinates
* @param max_x ...
* @param min_y ...
* @param max_y ...
*/
public void setAxisRange(final double min_x, final double max_x,
final double min_y, final double max_y)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2015-2020 Oak Ridge National Laboratory.
* Copyright (c) 2015-2022 Oak Ridge National Laboratory.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -237,18 +237,28 @@ public ColorMappingFunction getColorMapping()
}

/** Set axis range for 'full' image
* @param min_x
* @param max_x
* @param min_y
* @param max_y
* @param min_x User coordinates
* @param max_x ...
* @param min_y ...
* @param max_y ...
*/
public void setAxisRange(final double min_x, final double max_x,
final double min_y, final double max_y)
{
// Ignore if there are no changes, because otherwise
// each call would reset axes that had "zoomed" into the image
if (this.min_x == min_x &&
this.max_x == max_x &&
this.min_y == min_y &&
this.max_y == max_y)
return;

// Update the full image size
this.min_x = min_x;
this.max_x = max_x;
this.min_y = min_y;
this.max_y = max_y;
// .. and set axes to show complete image
x_axis.setValueRange(min_x, max_x);
y_axis.setValueRange(min_y, max_y);
}
Expand Down