JavaScript is disabled on your browser.
JavaFX 2.2
javafx.scene.control

Class ScrollBar

  • All Implemented Interfaces:
    EventTarget, Skinnable


    public class ScrollBar
    extends Control 
    Either a horizontal or vertical bar with increment and decrement buttons and a "thumb" with which the user can interact. Typically not used alone but used for building up more complicated controls such as the ScrollPane and ListView.

    ScrollBar sets focusTraversable to false.

    This example creates a vertical ScrollBar :

    
     import javafx.scene.control.ScrollBar;
     ScrollBar s1 = new ScrollBar();
     s1.setOrientation(Orientation.VERTICAL);
     
    Implementation of ScrollBar According to JavaFX UI Control API Specification
    • Constructor Detail

      • ScrollBar

        public ScrollBar()
        Creates a new horizontal (i.e. getOrientation() == Orientation.HORIZONTAL) ScrollBar.
    • Method Detail

      • setMin

        public final void setMin(double value)
        Sets the value of the property min.
        Property description:
        The minimum value represented by this ScrollBar. This should be a value less than or equal to max.
      • getMin

        public final double getMin()
        Gets the value of the property min.
        Property description:
        The minimum value represented by this ScrollBar. This should be a value less than or equal to max.
      • setMax

        public final void setMax(double value)
        Sets the value of the property max.
        Property description:
        The maximum value represented by this ScrollBar. This should be a value greater than or equal to min.
      • getMax

        public final double getMax()
        Gets the value of the property max.
        Property description:
        The maximum value represented by this ScrollBar. This should be a value greater than or equal to min.
      • setValue

        public final void setValue(double value)
        Sets the value of the property value.
        Property description:
        The current value represented by this ScrollBar. This value should be between min and max, inclusive.
      • getValue

        public final double getValue()
        Gets the value of the property value.
        Property description:
        The current value represented by this ScrollBar. This value should be between min and max, inclusive.
      • setOrientation

        public final void setOrientation(Orientation value)
        Sets the value of the property orientation.
        Property description:
        The orientation of the ScrollBar can either be HORIZONTAL or VERTICAL.
      • getOrientation

        public final Orientation getOrientation()
        Gets the value of the property orientation.
        Property description:
        The orientation of the ScrollBar can either be HORIZONTAL or VERTICAL.
      • setUnitIncrement

        public final void setUnitIncrement(double value)
        Sets the value of the property unitIncrement.
        Property description:
        The amount by which to adjust the ScrollBar when the increment or decrement methods are called.
      • getUnitIncrement

        public final double getUnitIncrement()
        Gets the value of the property unitIncrement.
        Property description:
        The amount by which to adjust the ScrollBar when the increment or decrement methods are called.
      • setBlockIncrement

        public final void setBlockIncrement(double value)
        Sets the value of the property blockIncrement.
        Property description:
        The amount by which to adjust the scrollbar if the track of the bar is clicked.
      • getBlockIncrement

        public final double getBlockIncrement()
        Gets the value of the property blockIncrement.
        Property description:
        The amount by which to adjust the scrollbar if the track of the bar is clicked.
      • setVisibleAmount

        public final void setVisibleAmount(double value)
        Sets the value of the property visibleAmount.
        Property description:
        Visible amount of the scrollbar's range, typically represented by the size of the scroll bar's thumb.
      • getVisibleAmount

        public final double getVisibleAmount()
        Gets the value of the property visibleAmount.
        Property description:
        Visible amount of the scrollbar's range, typically represented by the size of the scroll bar's thumb.
      • adjustValue

        public void adjustValue(double position)
        Adjusts the value property by blockIncrement. The position is the fractional amount between the min and max. For example, it might be 50%. If #minProperty min were 0 and #maxProperty max were 100 and value were 25, then a position of .5 would indicate that we should increment value by blockIncrement. If value were 75, then a position of .5 would indicate that we should decrement value by blockIncrement.
        This function is intended to be used by experts, primarily by those implementing new Skins or Behaviors. It is not common for developers or designers to access this function directly.
      • increment

        public void increment()
        Increments the value of the ScrollBar by the unitIncrement
      • decrement

        public void decrement()
        Decrements the value of the ScrollBar by the unitIncrement
JavaFX 2.2

Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.

AltStyle によって変換されたページ (->オリジナル) /