46 import javafx.scene.AccessibleAttribute;
47 import javafx.scene.AccessibleRole;
48
49 import java.util.ArrayList;
50 import java.util.Collections;
51 import java.util.List;
52
53 /**
54 * Either a horizontal or vertical bar with increment and decrement buttons and
55 * a "thumb" with which the user can interact. Typically not used alone but used
56 * for building up more complicated controls such as the ScrollPane and ListView.
57 * <p>
58 * ScrollBar sets focusTraversable to false.
59 * </p>
60 *
61 * <p>
62 * This example creates a vertical ScrollBar:
63 * <pre><code> ScrollBar s1 = new ScrollBar();
64 * s1.setOrientation(Orientation.VERTICAL);</code></pre>
65 *
66 * <p><img src="doc-files/ScrollBar.png" alt="Image of the ScrollBar control"></p>
67 *
68 * Implementation of ScrollBar According to JavaFX UI Control API Specification
69 * @since JavaFX 2.0
70 */
71 public class ScrollBar extends Control {
72
73 /***************************************************************************
74 * *
75 * Constructors *
76 * *
77 **************************************************************************/
78
79 /**
80 * Creates a new horizontal ScrollBar (ie getOrientation() == Orientation.HORIZONTAL).
81 *
82 *
83 */
84 public ScrollBar() {
85 // TODO : we need to ensure we have a width and height
86 setWidth(Properties.DEFAULT_WIDTH);
87 setHeight(Properties.DEFAULT_LENGTH);
88 getStyleClass().setAll(DEFAULT_STYLE_CLASS);
|
46 import javafx.scene.AccessibleAttribute;
47 import javafx.scene.AccessibleRole;
48
49 import java.util.ArrayList;
50 import java.util.Collections;
51 import java.util.List;
52
53 /**
54 * Either a horizontal or vertical bar with increment and decrement buttons and
55 * a "thumb" with which the user can interact. Typically not used alone but used
56 * for building up more complicated controls such as the ScrollPane and ListView.
57 * <p>
58 * ScrollBar sets focusTraversable to false.
59 * </p>
60 *
61 * <p>
62 * This example creates a vertical ScrollBar:
63 * <pre><code> ScrollBar s1 = new ScrollBar();
64 * s1.setOrientation(Orientation.VERTICAL);</code></pre>
65 *
66 * <img src="doc-files/ScrollBar.png" alt="Image of the ScrollBar control">
67 *
68 * @since JavaFX 2.0
69 */
70 public class ScrollBar extends Control {
71
72 /***************************************************************************
73 * *
74 * Constructors *
75 * *
76 **************************************************************************/
77
78 /**
79 * Creates a new horizontal ScrollBar (ie getOrientation() == Orientation.HORIZONTAL).
80 *
81 *
82 */
83 public ScrollBar() {
84 // TODO : we need to ensure we have a width and height
85 setWidth(Properties.DEFAULT_WIDTH);
86 setHeight(Properties.DEFAULT_LENGTH);
87 getStyleClass().setAll(DEFAULT_STYLE_CLASS);
|