changeset 8045:522fe51196c8

RT-38458 [Charts, Axis] TickMark's textVisible property is ignored follow-up fix Reviewed by: jgiles, kcr
author Martin Sladecek <martin.sladecek@oracle.com>
date Fri, 12 Sep 2014 09:20:28 +0200
parents 2200f3672dbb
children 726b5622b633
files modules/controls/src/main/java/javafx/scene/chart/Axis.java
diffstat 1 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/javafx/scene/chart/Axis.java	Thu Sep 11 15:13:11 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/chart/Axis.java	Fri Sep 12 09:20:28 2014 +0200
@@ -722,12 +722,17 @@
                             double tickHeight = measureTickMarkSize(m.getValue(), getRange()).getHeight();
                             lastStart = updateAndGetDisplayPosition(m) - tickHeight / 2;
                             break;
+                        } else {
+                            labelsToSkip.set(stop);
                         }
                     }
 
                     for (int i = tickMarks.size() - 1; i > stop; i--) {
                         TickMark<T> m = tickMarks.get(i);
-                        if (!m.isTextVisible()) continue;
+                        if (!m.isTextVisible()) {
+                            labelsToSkip.set(i);
+                            continue;
+                        }
                         double tickHeight = measureTickMarkSize(m.getValue(), getRange()).getHeight();
                         double tickStart = updateAndGetDisplayPosition(m) - tickHeight / 2;
                         if (tickStart <= prevEnd || tickStart + tickHeight > lastStart) {
@@ -746,12 +751,17 @@
                             double tickWidth = measureTickMarkSize(m.getValue(), getRange()).getWidth();
                             lastStart = updateAndGetDisplayPosition(m) - tickWidth / 2;
                             break;
+                        } else {
+                            labelsToSkip.set(stop);
                         }
                     }
 
                     for (int i = 0; i < stop; ++i) {
                         TickMark<T> m = tickMarks.get(i);
-                        if (!m.isTextVisible()) continue;
+                        if (!m.isTextVisible()) {
+                            labelsToSkip.set(i);
+                            continue;
+                        }
                         double tickWidth = measureTickMarkSize(m.getValue(), getRange()).getWidth();
                         double tickStart = updateAndGetDisplayPosition(m) - tickWidth / 2;
                         if (tickStart <= prevEnd || tickStart + tickWidth > lastStart) {