Skip to content

Commit

Permalink
added copy setter for axis range
Browse files Browse the repository at this point in the history
  • Loading branch information
ennerf committed Jun 30, 2023
1 parent ed48416 commit 5b8cafd
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ public AxisRange(final AxisRange other) {
this(other.getMin(), other.getMax(), other.getAxisLength(), other.getScale(), other.getTickUnit());
}

public boolean set(final AxisRange range) {
boolean change = !this.equals(range);
if(change) {
super.set(range);
this.axisLength = range.axisLength;
this.scale = range.scale;
this.tickUnit = range.tickUnit;
}
return change;
}

public AxisRange(final double lowerBound, final double upperBound, final double axisLength, final double scale,
final double tickUnit) {
super(lowerBound, upperBound);
Expand Down

0 comments on commit 5b8cafd

Please sign in to comment.