From af38f3205049128408e2d4671a5817a90dd0f87d Mon Sep 17 00:00:00 2001 From: "quoc.do-van" Date: Wed, 11 Dec 2024 16:59:18 +0700 Subject: [PATCH 1/5] Add setLimit method to the IAxis interface --- .../src/org/eclipse/swtchart/IAxis.java | 15 +++++++++++++++ .../org/eclipse/swtchart/internal/axis/Axis.java | 14 +------------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java b/org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java index 08b966bb..2f29eab5 100644 --- a/org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java +++ b/org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java @@ -288,4 +288,19 @@ public enum Position { void setDrawPositionMarker(boolean drawPositionMarker); void updatePositionMarker(MouseEvent e); + + /** + * Sets the minimum and maximum limits for the axis range. These limits + * are enforced during dynamic operations such as {@code adjustRange}, + * {@code scroll}, and {@code zoom}. However, they do not restrict + * manual range settings through the {@link #setRange(Range, boolean)} method. + * + * @param minRange + * the minimum value allowed for the axis range. + * @param maxRange + * the maximum value allowed for the axis range. + * @throws IllegalArgumentException + * if {@code minRange} is greater than or equal to {@code maxRange}. + */ + void setLimitRange(double minRange, double maxRange); } \ No newline at end of file diff --git a/org.eclipse.swtchart/src/org/eclipse/swtchart/internal/axis/Axis.java b/org.eclipse.swtchart/src/org/eclipse/swtchart/internal/axis/Axis.java index 3321043a..45982bf2 100644 --- a/org.eclipse.swtchart/src/org/eclipse/swtchart/internal/axis/Axis.java +++ b/org.eclipse.swtchart/src/org/eclipse/swtchart/internal/axis/Axis.java @@ -860,19 +860,7 @@ public void updatePositionMarker(MouseEvent e) { tick.getAxisPositionMarker().update(e.x, e.y); } - /** - * Sets the minimum and maximum limits for the axis range. These limits - * are enforced during dynamic operations such as {@code adjustRange}, - * {@code scroll}, and {@code zoom}. However, they do not restrict - * manual range settings through the {@link #setRange(Range, boolean)} method. - * - * @param minRange - * the minimum value allowed for the axis range. - * @param maxRange - * the maximum value allowed for the axis range. - * @throws IllegalArgumentException - * if {@code minRange} is greater than or equal to {@code maxRange}. - */ + @Override public void setLimitRange(double minRange, double maxRange) { if(minRange >= maxRange) { From 01096069fc54d90130df26819b43c070a6385eaa Mon Sep 17 00:00:00 2001 From: QuocDoBV <111261098+QuocDoBV@users.noreply.github.com> Date: Wed, 11 Dec 2024 22:42:02 +0700 Subject: [PATCH 2/5] Rerun to fix the failed ECA Rerun to fix the failed ECA --- org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java b/org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java index 2f29eab5..5210976b 100644 --- a/org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java +++ b/org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java @@ -296,11 +296,11 @@ public enum Position { * manual range settings through the {@link #setRange(Range, boolean)} method. * * @param minRange - * the minimum value allowed for the axis range. + * the minimum value allowed for the axis range * @param maxRange - * the maximum value allowed for the axis range. + * the maximum value allowed for the axis range * @throws IllegalArgumentException - * if {@code minRange} is greater than or equal to {@code maxRange}. + * if {@code minRange} is greater than or equal to {@code maxRange} */ void setLimitRange(double minRange, double maxRange); -} \ No newline at end of file +} From b1bf90c41fe10a95b91cc18d49f0e512afd89221 Mon Sep 17 00:00:00 2001 From: QuocDoBV <111261098+QuocDoBV@users.noreply.github.com> Date: Thu, 12 Dec 2024 10:19:45 +0700 Subject: [PATCH 3/5] Rerun to fix the failed ECA --- org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java b/org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java index 5210976b..3013f962 100644 --- a/org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java +++ b/org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java @@ -296,11 +296,11 @@ public enum Position { * manual range settings through the {@link #setRange(Range, boolean)} method. * * @param minRange - * the minimum value allowed for the axis range + * the minimum value allowed for the axis range. * @param maxRange - * the maximum value allowed for the axis range + * the maximum value allowed for the axis range. * @throws IllegalArgumentException - * if {@code minRange} is greater than or equal to {@code maxRange} + * if {@code minRange} is greater than or equal to {@code maxRange}. */ void setLimitRange(double minRange, double maxRange); } From 217e68271509fe46bd4ef74616eba0ef857124ab Mon Sep 17 00:00:00 2001 From: =QuocDoBV <111261098+QuocDoBV@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:16:50 +0700 Subject: [PATCH 4/5] fix ECA verify --- org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java b/org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java index 3013f962..5210976b 100644 --- a/org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java +++ b/org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java @@ -296,11 +296,11 @@ public enum Position { * manual range settings through the {@link #setRange(Range, boolean)} method. * * @param minRange - * the minimum value allowed for the axis range. + * the minimum value allowed for the axis range * @param maxRange - * the maximum value allowed for the axis range. + * the maximum value allowed for the axis range * @throws IllegalArgumentException - * if {@code minRange} is greater than or equal to {@code maxRange}. + * if {@code minRange} is greater than or equal to {@code maxRange} */ void setLimitRange(double minRange, double maxRange); } From c3344aeffb1ea8a111424f2d83f1433701715a3f Mon Sep 17 00:00:00 2001 From: QuocDoBV <111261098+QuocDoBV@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:49:46 +0700 Subject: [PATCH 5/5] change email to fix ECA --- org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java b/org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java index 5210976b..3013f962 100644 --- a/org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java +++ b/org.eclipse.swtchart/src/org/eclipse/swtchart/IAxis.java @@ -296,11 +296,11 @@ public enum Position { * manual range settings through the {@link #setRange(Range, boolean)} method. * * @param minRange - * the minimum value allowed for the axis range + * the minimum value allowed for the axis range. * @param maxRange - * the maximum value allowed for the axis range + * the maximum value allowed for the axis range. * @throws IllegalArgumentException - * if {@code minRange} is greater than or equal to {@code maxRange} + * if {@code minRange} is greater than or equal to {@code maxRange}. */ void setLimitRange(double minRange, double maxRange); }