@Override protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) { if (isHorizontal()) { if(showTickMarks) { return Math.max(140, tickLine.prefWidth(-1)); } else { return 140; } } else { //return (padding.getLeft()) + Math.max(thumb.prefWidth(-1), track.prefWidth(-1)) + padding.getRight(); return leftInset + Math.max(lowThumb.prefWidth(-1), track.prefWidth(-1)) + ((showTickMarks) ? (trackToTickGap+tickLine.prefWidth(-1)) : 0) + rightInset; } }
double tickLineWidth = (showTickMarks) ? tickLine.prefWidth(-1) : 0; double trackWidth = track.prefWidth(-1); double trackAreaWidth = Math.max(trackWidth,thumbWidth);