Tabnine Logo
ScrollBar.valueProperty
Code IndexAdd Tabnine to your IDE (free)

How to use
valueProperty
method
in
javafx.scene.control.ScrollBar

Best Java code snippets using javafx.scene.control.ScrollBar.valueProperty (Showing top 19 results out of 315)

origin: stackoverflow.com

if (n2 instanceof ScrollBar) {
  final ScrollBar bar2 = (ScrollBar) n2;
  bar1.valueProperty().bindBidirectional(bar2.valueProperty());
origin: stackoverflow.com

ObservableList<String> names = FXCollections.observableArrayList("1","2","3","4","5","6","7");
 final ListView<String> listView = new ListView<String>(names);
 stage.setOnShown(new EventHandler<WindowEvent>(){
   boolean hasRun = false;
   @Override
   public void handle(WindowEvent arg0) {
     if(!hasRun){
       for (Node node: listView.lookupAll(".scroll-bar")) {
         if (node instanceof ScrollBar) {
           final ScrollBar bar = (ScrollBar) node;
           bar.valueProperty().addListener(new ChangeListener<Number>() {
             @Override public void changed(ObservableValue<? extends Number> value, Number oldValue, Number newValue) {
               System.out.println(bar.getOrientation() + " " + newValue);
             }
           });
         }
       }
       hasRun = true;
     }
   }});
origin: stackoverflow.com

scrollBar.valueProperty().bindBidirectional(scrollBar1.valueProperty());
scrollBar.valueProperty().bindBidirectional(scrollBar2.valueProperty());
origin: stackoverflow.com

 ScrollBar bar = new ScrollBar();
VBox box = new VBox();

box.layoutYProperty().bind(bar.valueProperty());
origin: stackoverflow.com

bar.valueProperty().addListener((src, ov, nv) -> {
  LOG.info("change on value " + nv);
  if (nv.doubleValue() == 1.) {
origin: stackoverflow.com

if (n2 instanceof ScrollBar) {
  final ScrollBar bar2 = (ScrollBar) n2;
  bar1.valueProperty().bindBidirectional(bar2.valueProperty());
origin: stackoverflow.com

ScrollBar sb1 = (ScrollBar) lineNumbers.lookup(".scroll-bar:vertical");
ScrollBar sb2 = (ScrollBar) text.lookup(".scroll-bar:vertical");
sb1.valueProperty().bindBidirectional(sb2.valueProperty());
origin: com.aquafx-project/aquafx

public AquaScrollBarSkin(ScrollBar scrollBar) {
  super(scrollBar);
  if (getNode().getParent() instanceof ScrollPane) {
    fadeable = true;
  }
  scrollBar.setVisible(!fadeable);
  registerChangeListener(scrollBar.hoverProperty(), "HOVER");
  registerChangeListener(scrollBar.valueProperty(), "VALUE");
  registerChangeListener(scrollBar.visibleProperty(), "VISIBLE");
}
origin: stackoverflow.com

 @Override
public void start(Stage primaryStage) {
  ScrollBar scrollBar = new ScrollBar();
  scrollBar.setOrientation(Orientation.VERTICAL);

  scrollBar.setMax(100);
  scrollBar.setVisibleAmount(50);
  scrollBar.valueProperty().addListener((a,b,c) -> System.out.println(c));

  StackPane root = new StackPane();
  root.getChildren().add(scrollBar);

  Scene scene = new Scene(root, 200, 500);

  // do layout
  root.applyCss();
  root.layout();

  ScrollBarMark mark1 = new ScrollBarMark();
  ScrollBarMark mark2 = new ScrollBarMark();
  mark1.attach(scrollBar);
  mark2.attach(scrollBar);
  mark1.setPosition(50);
  mark2.setPosition(75);

  primaryStage.setScene(scene);
  primaryStage.show();
}
origin: stackoverflow.com

draw(canvas, scrollBar.getValue());
scrollBar.valueProperty().addListener(new ChangeListener<Number>() {
  @Override
  public void changed(ObservableValue<? extends Number> ov,
origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls

public void bind(ScrollBar bar) {
  bar.minProperty().bind(this.min);
  bar.maxProperty().bind(this.max);
  bar.visibleAmountProperty().bind(this.contentAreaHeight.divide(this.contentHeight.divide(this.max)));
  bar.valueProperty().bindBidirectional(this.offset);
  recomputeAll();
}
origin: stackoverflow.com

verticalBar.valueProperty().addListener((obs, oldValue, newValue) -> {
  if (newValue.doubleValue() >= verticalBar.getMax()) {
    addMoreData(table, 20);
origin: stackoverflow.com

sc.valueProperty().addListener(new ChangeListener<Number>() {
  public void changed(ObservableValue<? extends Number> ov,
      Number old_val, Number new_val) {
origin: stackoverflow.com

if (newStatus == Animation.Status.RUNNING) {
  scrollBar.setDisable(true);
  scrollBar.valueProperty().bind(scrollValueBinding);
} else if (oldStatus == Animation.Status.RUNNING) {
  scrollBar.setDisable(false);
  scrollBar.valueProperty().unbind();
origin: stackoverflow.com

tableViewScrollBar.valueProperty().addListener(new ChangeListener<Number>() {
  @Override
  public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls

public void bindHorizontalScrollbar(ScrollBar bar) {
  bar.setMin(0);
  DoubleBinding max = this.contentBody.widthProperty().subtract(widthProperty());
  DoubleBinding factor = this.contentBody.widthProperty().divide(max);
  bar.maxProperty().bind(this.contentBody.widthProperty().divide(factor));
  bar.visibleAmountProperty().bind(widthProperty().divide(factor));
  this.offsetX.bind(bar.valueProperty());
}
origin: stackoverflow.com

vScrollBar.maxProperty().bind(scrollPane.vmaxProperty());
vScrollBar.visibleAmountProperty().bind(scrollPane.heightProperty().divide(pane.heightProperty()));
scrollPane.vvalueProperty().bindBidirectional(vScrollBar.valueProperty());
hScrollBar.maxProperty().bind(scrollPane.hmaxProperty());
hScrollBar.visibleAmountProperty().bind(scrollPane.widthProperty().divide(pane.heightProperty()));
scrollPane.hvalueProperty().bindBidirectional(hScrollBar.valueProperty());
origin: GoMint/GoMint

public TPSChart() {
  final NumberAxis yAxis = new NumberAxis();
  this.xAxis = new NumberAxis( 0, 512, 1000 );
  this.xAxis.setAutoRanging( false );
  this.chart = new LineChart<>( xAxis, yAxis );
  this.chart.setAnimated( false );
  this.chart.setCreateSymbols( false );
  this.chart.setLegendVisible( false );
  this.fullTimeSeries = new XYChart.Series<>();
  this.actualTimeSeries = new XYChart.Series<>();
  this.averageTimeSeries = new XYChart.Series<>();
  this.scrollBar = new ScrollBar();
  this.scrollBar.valueProperty().addListener( new ChangeListener<Number>() {
    @Override
    public void changed( ObservableValue<? extends Number> observable, Number oldValue, Number newValue ) {
      currentDataStart = (int) ( newValue.floatValue() * ( TimeUnit.SECONDS.toNanos( 1 ) / tickNanos ) * 60 );
      updateChart();
    }
  } );
}
origin: org.fxmisc.flowless/flowless

    .orElseConst(0.0)
    .asVar(this::setVPosition);
hbarValue = Var.doubleVar(hbar.valueProperty());
vbarValue = Var.doubleVar(vbar.valueProperty());
Bindings.bindBidirectional(hbarValue, hPosEstimate);
Bindings.bindBidirectional(vbarValue, vPosEstimate);
javafx.scene.controlScrollBarvalueProperty

Popular methods of ScrollBar

  • <init>
  • getMax
  • isVisible
  • maxProperty
  • setMin
  • setOrientation
  • visibleAmountProperty
  • visibleProperty
  • getMin
  • getOrientation
  • getValue
  • getVisibleAmount
  • getValue,
  • getVisibleAmount,
  • minProperty,
  • resizeRelocate,
  • setMax,
  • setValue,
  • setVisible,
  • setVisibleAmount,
  • blockIncrementProperty

Popular in Java

  • Making http post requests using okhttp
  • setScale (BigDecimal)
  • compareTo (BigDecimal)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now