@Override protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) { if (isHorizontal()) { return getSkinnable().getInsets().getTop() + Math.max(lowThumb.prefHeight(-1), track.prefHeight(-1)) + ((showTickMarks) ? (trackToTickGap+tickLine.prefHeight(-1)) : 0) + bottomInset; } else { if(showTickMarks) { return Math.max(140, tickLine.prefHeight(-1)); } else { return 140; } } }
double tickLineHeight = (showTickMarks) ? tickLine.prefHeight(-1) : 0; double trackHeight = track.prefHeight(-1); double trackAreaHeight = Math.max(trackHeight,thumbHeight);