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

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

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

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: com.aquafx-project/aquafx

  @Override public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
    for (Node child : getChildren()) {
      if (child.getStyleClass().get(0).equals("increment-button") || child.getStyleClass().get(0).equals(
          "decrement-button")) {
        if (getSkinnable().getOrientation() == Orientation.VERTICAL) {
          child.setStyle("-fx-padding: 0.0em " + ((endWidth - startWidth) * newValue.doubleValue() + startWidth) + "pt 0.0em 0.0em;}");
        } else if (getSkinnable().getOrientation() == Orientation.HORIZONTAL) {
          child.setStyle("-fx-padding: " + ((endWidth - startWidth) * newValue.doubleValue() + startWidth) + "pt  0.0em 0.0em 0.0em;}");
        }
      }
    }
  }
});
origin: com.aquafx-project/aquafx

  growScrollbarTransition.stop();
if (getSkinnable().getOrientation() == Orientation.VERTICAL) {
  getSkinnable().setStyle(" -fx-padding: -1.0 0.0 -1.0 0.0;");
} else {
    if (getSkinnable().getOrientation() == Orientation.VERTICAL) {
      child.setStyle("-fx-background-color: linear-gradient(rgb(238.0, 238.0, 238.0, 0.8) 0.0%, rgb(255.0, 255.0, 255.0, 0.8) 100.0%);" + "-fx-border-width: 0.0 0.0 0.0 1.0;" + "-fx-border-insets: 0.0 0.0 0.0 -1.0;" + "-fx-border-color: rgb(198.0, 198.0, 198.0);");
    } else if (getSkinnable().getOrientation() == Orientation.HORIZONTAL) {
      child.setStyle("-fx-background-color: linear-gradient(rgb(238.0, 238.0, 238.0, 0.8) 0.0%, rgb(255.0, 255.0, 255.0, 0.8) 100.0%);" + "-fx-border-width: 1.0 0.0 0.0 0.0;" + "-fx-border-insets: -1.0 0.0 0.0 0.0;" + "-fx-border-color: rgb(198.0, 198.0, 198.0);");
    if (getSkinnable().getOrientation() == Orientation.VERTICAL) {
      child.setStyle("-fx-background-radius: 6.0;" + "-fx-background-insets: 0.0 2.0 0.0 2.0;");
    } else if (getSkinnable().getOrientation() == Orientation.HORIZONTAL) {
      child.setStyle("-fx-background-radius: 6.0;" + "-fx-background-insets: 2.0 0.0 2.0 0.0;");
    if (getSkinnable().getOrientation() == Orientation.VERTICAL) {
      child.setStyle("-fx-padding: 0.0em 6.0pt 0.0em 0.0em");
    } else if (getSkinnable().getOrientation() == Orientation.HORIZONTAL) {
      child.setStyle("-fx-padding: 6.0pt 0.0em 0.0em 0.0em");
origin: stackoverflow.com

if (node instanceof ScrollBar) {
  ScrollBar bar = (ScrollBar) node;
  if (bar.getOrientation().equals(Orientation.VERTICAL)) {
    scrollbar = bar;
javafx.scene.controlScrollBargetOrientation

Popular methods of ScrollBar

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

Popular in Java

  • Reading from database using SQL prepared statement
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getResourceAsStream (ClassLoader)
  • addToBackStack (FragmentTransaction)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Notification (javax.management)
  • JTextField (javax.swing)
  • From CI to AI: The AI layer in your organization
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