changeset 1443:374f5352788f

fix RT-18985 Slider labels disappear too eagerly
author Paru Somashekar <paru.somashekar@oracle.com>
date Thu, 12 Jul 2012 16:02:44 -0700
parents 231378f0f928
children aa283b2f20ad
files javafx-ui-controls/src/javafx/scene/chart/Axis.java
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/javafx/scene/chart/Axis.java	Thu Jul 12 15:58:06 2012 -0700
+++ b/javafx-ui-controls/src/javafx/scene/chart/Axis.java	Thu Jul 12 16:02:44 2012 -0700
@@ -743,7 +743,7 @@
                                  tick.getPosition(),getTickLabelRotation(),side);
 
                 // check if position is inside bounds
-                if(tick.getPosition() >= 0 && tick.getPosition() <= length) {
+                if(tick.getPosition() >= 0 && tick.getPosition() <= Math.ceil(length)) {
                     if (isTickLabelsVisible()) {
                         tick.textNode.setVisible((tickIndex % numLabelsToSkip) == 0);
                         tickIndex++;
@@ -767,7 +767,7 @@
                 positionTextNode(tick.textNode, getTickLabelGap() + tickMarkLength,
                                  tick.getPosition(),getTickLabelRotation(),side);
                 // check if position is inside bounds
-                if(tick.getPosition() >= 0 && tick.getPosition() <= length) {
+                if(tick.getPosition() >= 0 && tick.getPosition() <= Math.ceil(length)) {
                     if (isTickLabelsVisible()) {
                         tick.textNode.setVisible((tickIndex % numLabelsToSkip) == 0);
                         tickIndex++;
@@ -805,7 +805,7 @@
                 positionTextNode(tick.textNode, tick.getPosition(), height - tickMarkLength - getTickLabelGap(),
                         getTickLabelRotation(), side);
                 // check if position is inside bounds
-                if(tick.getPosition() >= 0 && tick.getPosition() <= length) {
+                if(tick.getPosition() >= 0 && tick.getPosition() <= Math.ceil(length)) {
                     if (isTickLabelsVisible()) {
                         tick.textNode.setVisible((tickIndex % numLabelsToSkip) == 0);
                         tickIndex++;
@@ -832,7 +832,7 @@
                 positionTextNode(tick.textNode,xPos, tickMarkLength + getTickLabelGap(),
                                 getTickLabelRotation(),side);
                 // check if position is inside bounds
-                if(xPos >= 0 && xPos <= length) {
+                if(xPos >= 0 && xPos <= Math.ceil(length)) {
                     if (isTickLabelsVisible()) {
                         tick.textNode.setVisible((tickIndex % numLabelsToSkip) == 0);
                         tickIndex++;