< prev index next >

modules/javafx.controls/src/main/java/javafx/scene/control/ScrollPane.java

Print this page




  52 import javafx.scene.control.skin.ScrollPaneSkin;
  53 
  54 import javafx.css.Styleable;
  55 
  56 /**
  57  * A Control that provides a scrolled, clipped viewport of its contents. It
  58  * allows the user to scroll the content around either directly (panning) or
  59  * by using scroll bars. The ScrollPane allows specification of the scroll
  60  * bar policy, which determines when scroll bars are displayed: always, never,
  61  * or only when they are needed. The scroll bar policy can be specified
  62  * independently for the horizontal and vertical scroll bars.
  63  * <p>
  64  * The ScrollPane allows the application to set the current, minimum, and
  65  * maximum values for positioning the contents in the horizontal and
  66  * vertical directions. These values are mapped proportionally onto the
  67  * {@link javafx.scene.Node#layoutBoundsProperty layoutBounds} of the contained node.
  68  * <p>
  69  * ScrollPane layout calculations are based on the layoutBounds rather than
  70  * the boundsInParent (visual bounds) of the scroll node.
  71  * If an application wants the scrolling to be based on the visual bounds
  72  * of the node (for scaled content etc.), they need to wrap the scroll
  73  * node in a Group.
  74  * <p>
  75  * ScrollPane sets focusTraversable to false.
  76  * </p>
  77  *
  78  * <p>
  79  * This example creates a ScrollPane, which contains a Rectangle:
  80  * <pre><code> Rectangle rect = new Rectangle(200, 200, Color.RED);
  81  * ScrollPane s1 = new ScrollPane();
  82  * s1.setPrefSize(120, 120);
  83  * s1.setContent(rect);</code></pre>
  84  *
  85  * <img src="doc-files/ScrollPane.png" alt="Image of the ScrollPane control">
  86  *
  87  * @since JavaFX 2.0
  88  */
  89 @DefaultProperty("content")
  90 public class ScrollPane extends Control {
  91 
  92     /***************************************************************************




  52 import javafx.scene.control.skin.ScrollPaneSkin;
  53 
  54 import javafx.css.Styleable;
  55 
  56 /**
  57  * A Control that provides a scrolled, clipped viewport of its contents. It
  58  * allows the user to scroll the content around either directly (panning) or
  59  * by using scroll bars. The ScrollPane allows specification of the scroll
  60  * bar policy, which determines when scroll bars are displayed: always, never,
  61  * or only when they are needed. The scroll bar policy can be specified
  62  * independently for the horizontal and vertical scroll bars.
  63  * <p>
  64  * The ScrollPane allows the application to set the current, minimum, and
  65  * maximum values for positioning the contents in the horizontal and
  66  * vertical directions. These values are mapped proportionally onto the
  67  * {@link javafx.scene.Node#layoutBoundsProperty layoutBounds} of the contained node.
  68  * <p>
  69  * ScrollPane layout calculations are based on the layoutBounds rather than
  70  * the boundsInParent (visual bounds) of the scroll node.
  71  * If an application wants the scrolling to be based on the visual bounds
  72  * of the node (for scaled content etc.), it needs to wrap the scroll
  73  * node in a Group.
  74  * <p>
  75  * ScrollPane sets focusTraversable to false.
  76  * </p>
  77  *
  78  * <p>
  79  * This example creates a ScrollPane, which contains a Rectangle:
  80  * <pre><code> Rectangle rect = new Rectangle(200, 200, Color.RED);
  81  * ScrollPane s1 = new ScrollPane();
  82  * s1.setPrefSize(120, 120);
  83  * s1.setContent(rect);</code></pre>
  84  *
  85  * <img src="doc-files/ScrollPane.png" alt="Image of the ScrollPane control">
  86  *
  87  * @since JavaFX 2.0
  88  */
  89 @DefaultProperty("content")
  90 public class ScrollPane extends Control {
  91 
  92     /***************************************************************************


< prev index next >