Class ScrollPane

All Implemented Interfaces:
LayoutMeasurable, LayoutMeasurableMixin, HasBackgroundProperty, HasBlendModeProperty, HasBorderProperty, HasClipProperty, HasEffectProperty, HasHeightProperty, HasLayoutXProperty, HasLayoutYProperty, HasManagedProperty, HasMaxHeightProperty, HasMaxWidthProperty, HasMinHeightProperty, HasMinWidthProperty, HasMouseTransparentProperty, HasOnMouseClickedProperty, HasOpacityProperty, HasPaddingProperty, HasParentProperty, HasPrefHeightProperty, HasPrefWidthProperty, HasSnapToPixelProperty, HasVisibleProperty, HasWidthProperty, Styleable, EventTarget, Skinnable, INode, PreferenceResizableNode

public class ScrollPane extends Control
Author:
Bruno Salmon
  • Property Details

  • Constructor Details

    • ScrollPane

      public ScrollPane()
    • ScrollPane

      public ScrollPane(Node content)
  • Method Details

    • sceneToLocal

      protected void sceneToLocal(Point2D pt)
      Overrides:
      sceneToLocal in class Node
    • localToScene

      protected void localToScene(Point2D pt)
      Overrides:
      localToScene in class Node
    • hbarPolicyProperty

      public Property<ScrollPane.ScrollBarPolicy> hbarPolicyProperty()
      Returns:
      the hbarPolicy property
      See Also:
    • setHbarPolicy

      public final void setHbarPolicy(ScrollPane.ScrollBarPolicy value)
      Sets the value of the hbarPolicy property.
      Property description:
      Parameters:
      value - the value for the hbarPolicy property
      See Also:
    • getHbarPolicy

      public ScrollPane.ScrollBarPolicy getHbarPolicy()
      Gets the value of the hbarPolicy property.
      Property description:
      Returns:
      the value of the hbarPolicy property
      See Also:
    • vbarPolicyProperty

      public Property<ScrollPane.ScrollBarPolicy> vbarPolicyProperty()
      Returns:
      the vbarPolicy property
    • setvbarPolicy

      public final void setvbarPolicy(ScrollPane.ScrollBarPolicy value)
    • getvbarPolicy

      public ScrollPane.ScrollBarPolicy getvbarPolicy()
    • setContent

      public final void setContent(Node value)
      Sets the value of the content property.
      Property description:
      The node used as the content of this ScrollPane.
      Parameters:
      value - the value for the content property
      See Also:
    • getContent

      public final Node getContent()
      Gets the value of the content property.
      Property description:
      The node used as the content of this ScrollPane.
      Returns:
      the value of the content property
      See Also:
    • contentProperty

      public final ObjectProperty<Node> contentProperty()
      The node used as the content of this ScrollPane.
      Returns:
      the content property
      See Also:
    • setHvalue

      public final void setHvalue(double value)
      Sets the value of the hvalue property.
      Property description:
      The current horizontal scroll position of the ScrollPane. This value may be set by the application to scroll the view programatically. The ScrollPane will update this value whenever the viewport is scrolled or panned by the user. This value must always be within the range of hmin to hmax. When hvalue equals hmin, the contained node is positioned so that its layoutBounds minX is visible. When hvalue equals hmax, the contained node is positioned so that its layoutBounds maxX is visible. When hvalue is between hmin and hmax, the contained node is positioned proportionally between layoutBounds minX and layoutBounds maxX.
      Parameters:
      value - the value for the hvalue property
      See Also:
    • getHvalue

      public final double getHvalue()
      Gets the value of the hvalue property.
      Property description:
      The current horizontal scroll position of the ScrollPane. This value may be set by the application to scroll the view programatically. The ScrollPane will update this value whenever the viewport is scrolled or panned by the user. This value must always be within the range of hmin to hmax. When hvalue equals hmin, the contained node is positioned so that its layoutBounds minX is visible. When hvalue equals hmax, the contained node is positioned so that its layoutBounds maxX is visible. When hvalue is between hmin and hmax, the contained node is positioned proportionally between layoutBounds minX and layoutBounds maxX.
      Returns:
      the value of the hvalue property
      See Also:
    • hvalueProperty

      public final DoubleProperty hvalueProperty()
      The current horizontal scroll position of the ScrollPane. This value may be set by the application to scroll the view programatically. The ScrollPane will update this value whenever the viewport is scrolled or panned by the user. This value must always be within the range of hmin to hmax. When hvalue equals hmin, the contained node is positioned so that its layoutBounds minX is visible. When hvalue equals hmax, the contained node is positioned so that its layoutBounds maxX is visible. When hvalue is between hmin and hmax, the contained node is positioned proportionally between layoutBounds minX and layoutBounds maxX.
      Returns:
      the hvalue property
      See Also:
    • setVvalue

      public final void setVvalue(double value)
      Sets the value of the vvalue property.
      Property description:
      The current vertical scroll position of the ScrollPane. This value may be set by the application to scroll the view programatically. The ScrollPane will update this value whenever the viewport is scrolled or panned by the user. This value must always be within the range of vmin to vmax. When vvalue equals vmin, the contained node is positioned so that its layoutBounds minY is visible. When vvalue equals vmax, the contained node is positioned so that its layoutBounds maxY is visible. When vvalue is between vmin and vmax, the contained node is positioned proportionally between layoutBounds minY and layoutBounds maxY.
      Parameters:
      value - the value for the vvalue property
      See Also:
    • getVvalue

      public final double getVvalue()
      Gets the value of the vvalue property.
      Property description:
      The current vertical scroll position of the ScrollPane. This value may be set by the application to scroll the view programatically. The ScrollPane will update this value whenever the viewport is scrolled or panned by the user. This value must always be within the range of vmin to vmax. When vvalue equals vmin, the contained node is positioned so that its layoutBounds minY is visible. When vvalue equals vmax, the contained node is positioned so that its layoutBounds maxY is visible. When vvalue is between vmin and vmax, the contained node is positioned proportionally between layoutBounds minY and layoutBounds maxY.
      Returns:
      the value of the vvalue property
      See Also:
    • vvalueProperty

      public final DoubleProperty vvalueProperty()
      The current vertical scroll position of the ScrollPane. This value may be set by the application to scroll the view programatically. The ScrollPane will update this value whenever the viewport is scrolled or panned by the user. This value must always be within the range of vmin to vmax. When vvalue equals vmin, the contained node is positioned so that its layoutBounds minY is visible. When vvalue equals vmax, the contained node is positioned so that its layoutBounds maxY is visible. When vvalue is between vmin and vmax, the contained node is positioned proportionally between layoutBounds minY and layoutBounds maxY.
      Returns:
      the vvalue property
      See Also:
    • setHmin

      public final void setHmin(double value)
      Sets the value of the hmin property.
      Property description:
      The minimum allowable hvalue for this ScrollPane. Default value is 0.
      Parameters:
      value - the value for the hmin property
      See Also:
    • getHmin

      public final double getHmin()
      Gets the value of the hmin property.
      Property description:
      The minimum allowable hvalue for this ScrollPane. Default value is 0.
      Returns:
      the value of the hmin property
      See Also:
    • hminProperty

      public final DoubleProperty hminProperty()
      The minimum allowable hvalue for this ScrollPane. Default value is 0.
      Returns:
      the hmin property
      See Also:
    • setVmin

      public final void setVmin(double value)
      Sets the value of the vmin property.
      Property description:
      The minimum allowable vvalue for this ScrollPane. Default value is 0.
      Parameters:
      value - the value for the vmin property
      See Also:
    • getVmin

      public final double getVmin()
      Gets the value of the vmin property.
      Property description:
      The minimum allowable vvalue for this ScrollPane. Default value is 0.
      Returns:
      the value of the vmin property
      See Also:
    • vminProperty

      public final DoubleProperty vminProperty()
      The minimum allowable vvalue for this ScrollPane. Default value is 0.
      Returns:
      the vmin property
      See Also:
    • setHmax

      public final void setHmax(double value)
      Sets the value of the hmax property.
      Property description:
      The maximum allowable hvalue for this ScrollPane. Default value is 1.
      Parameters:
      value - the value for the hmax property
      See Also:
    • getHmax

      public final double getHmax()
      Gets the value of the hmax property.
      Property description:
      The maximum allowable hvalue for this ScrollPane. Default value is 1.
      Returns:
      the value of the hmax property
      See Also:
    • hmaxProperty

      public final DoubleProperty hmaxProperty()
      The maximum allowable hvalue for this ScrollPane. Default value is 1.
      Returns:
      the hmax property
      See Also:
    • setVmax

      public final void setVmax(double value)
      Sets the value of the vmax property.
      Property description:
      The maximum allowable vvalue for this ScrollPane. Default value is 1.
      Parameters:
      value - the value for the vmax property
      See Also:
    • getVmax

      public final double getVmax()
      Gets the value of the vmax property.
      Property description:
      The maximum allowable vvalue for this ScrollPane. Default value is 1.
      Returns:
      the value of the vmax property
      See Also:
    • vmaxProperty

      public final DoubleProperty vmaxProperty()
      The maximum allowable vvalue for this ScrollPane. Default value is 1.
      Returns:
      the vmax property
      See Also:
    • setViewportBounds

      public final void setViewportBounds(Bounds value)
      Sets the value of the viewportBounds property.
      Property description:
      The actual Bounds of the ScrollPane Viewport. This is the Bounds of the content node.
      Parameters:
      value - the value for the viewportBounds property
      See Also:
    • getViewportBounds

      public final Bounds getViewportBounds()
      Gets the value of the viewportBounds property.
      Property description:
      The actual Bounds of the ScrollPane Viewport. This is the Bounds of the content node.
      Returns:
      the value of the viewportBounds property
      See Also:
    • viewportBoundsProperty

      public final ObjectProperty<Bounds> viewportBoundsProperty()
      The actual Bounds of the ScrollPane Viewport. This is the Bounds of the content node.
      Returns:
      the viewportBounds property
      See Also:
    • fitToWidthProperty

      public BooleanProperty fitToWidthProperty()
      Returns:
      the fitToWidth property
      See Also:
    • isFitToWidth

      public boolean isFitToWidth()
      Gets the value of the fitToWidth property.
      Property description:
      Returns:
      the value of the fitToWidth property
      See Also:
    • setFitToWidth

      public void setFitToWidth(boolean fitWidth)
      Sets the value of the fitToWidth property.
      Property description:
      Parameters:
      fitWidth - the value for the fitToWidth property
      See Also:
    • fitToHeightProperty

      public BooleanProperty fitToHeightProperty()
      Returns:
      the fitToHeight property
      See Also:
    • isFitToHeight

      public boolean isFitToHeight()
      Gets the value of the fitToHeight property.
      Property description:
      Returns:
      the value of the fitToHeight property
      See Also:
    • setFitToHeight

      public void setFitToHeight(boolean fitHeight)
      Sets the value of the fitToHeight property.
      Property description:
      Parameters:
      fitHeight - the value for the fitToHeight property
      See Also:
    • layoutChildren

      protected void layoutChildren()
      Description copied from class: Control
      Invoked during the layout pass to layout the children in this Parent. By default it will only set the size of managed, resizable content to their preferred sizes and does not do any node positioning.

      Subclasses should override this function to layout content as needed.

      Overrides:
      layoutChildren in class Control
    • setOnChildrenLayout

      public void setOnChildrenLayout(Runnable onChildrenLayout)