@Override protected double computeValue() { double max = bar.getMax(); double visible = bar.getVisibleAmount(); return max > visible ? 16 / (max - visible) * max : 0; } });
updateTextAreaTask.messageProperty().addListener(new ChangeListener<String>() { @Override public void changed(ObservableValue<? extends String> obs, String oldMessage, String newMessage) { taProgressText.setText(newMessage); ScrollBar scrollBar = (ScrollBar) taProgressText.lookup(".scroll-bar:vertical"); if (scrollBar != null) { scrollBar.setValue(scrollBar.getMax()); } } });
private void scrollColumnIntoView(int colIndex, int jumpAhead) { double charWidth = this.content.getCharWidth(); double colOffset = charWidth * colIndex; double contentWidth = this.content.getWidth(); double curOffset = this.contentArea.horizontal.getValue(); if (colOffset < curOffset) { double jumpOffset = curOffset - jumpAhead * charWidth; if (colOffset < jumpOffset) { jumpOffset = colOffset; } double targetOffset = Math.max(this.contentArea.horizontal.getMin(), jumpOffset); this.contentArea.horizontal.setValue(targetOffset); } if (colOffset > curOffset + contentWidth) { double jumpOffset = curOffset + jumpAhead * charWidth; if (colOffset > jumpOffset + contentWidth) { jumpOffset = colOffset + contentWidth; } double targetOffset = Math.min(this.contentArea.horizontal.getMax(), jumpOffset); this.contentArea.horizontal.setValue(targetOffset); } }
scrollBar.setMax(scrollBar1.getMax());
scrollBar.setMax(TOTAL_WIDTH - canvas.getWidth()); scrollBar.setVisibleAmount(scrollBar.getMax() * canvas.getWidth() / TOTAL_WIDTH);
if (newValue.doubleValue() >= verticalBar.getMax()) { addMoreData(table, 20);
timeline.playFrom(total.multiply((scrollBar.getValue() - scrollBar.getMin()) / (scrollBar.getMax() - scrollBar.getMin())));
double height = sp.getLayoutBounds().getHeight(); double visibleAmout = scrollBar.getVisibleAmount(); double max = scrollBar.getMax(); double min = scrollBar.getMin(); double pos = position.get();