Class Region

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, INode, PreferenceResizableNode
Direct Known Subclasses:
ContextMenuContent, ContextMenuContent.MenuItemContainer, Control, Pane

Author:
Bruno Salmon
  • Property Details

  • Constructor Details

    • Region

      public Region()
    • Region

      public Region(Node... nodes)
  • Method Details

    • widthProperty

      public DoubleProperty widthProperty()
      Specified by:
      widthProperty in interface HasWidthProperty
      Returns:
      the width property
      See Also:
    • heightProperty

      public DoubleProperty heightProperty()
      Specified by:
      heightProperty in interface HasHeightProperty
      Returns:
      the height property
      See Also:
    • maxWidthProperty

      public DoubleProperty maxWidthProperty()
      Specified by:
      maxWidthProperty in interface HasMaxWidthProperty
      Returns:
      the maxWidth property
      See Also:
    • minWidthProperty

      public DoubleProperty minWidthProperty()
      Specified by:
      minWidthProperty in interface HasMinWidthProperty
      Returns:
      the minWidth property
      See Also:
    • maxHeightProperty

      public DoubleProperty maxHeightProperty()
      Specified by:
      maxHeightProperty in interface HasMaxHeightProperty
      Returns:
      the maxHeight property
      See Also:
    • minHeightProperty

      public DoubleProperty minHeightProperty()
      Specified by:
      minHeightProperty in interface HasMinHeightProperty
      Returns:
      the minHeight property
      See Also:
    • prefWidthProperty

      public DoubleProperty prefWidthProperty()
      Specified by:
      prefWidthProperty in interface HasPrefWidthProperty
      Returns:
      the prefWidth property
      See Also:
    • prefHeightProperty

      public DoubleProperty prefHeightProperty()
      Specified by:
      prefHeightProperty in interface HasPrefHeightProperty
      Returns:
      the prefHeight property
      See Also:
    • getInsets

      public final Insets getInsets()
      Gets the value of the insets property.
      Property description:
      The insets of the Region define the distance from the edge of the region (its layout bounds, or (0, 0, width, height)) to the edge of the content area. All child nodes should be laid out within the content area. The insets are computed based on the Border which has been specified, if any, and also the padding.
      Returns:
      the value of the insets property
      Since:
      JavaFX 8.0
      See Also:
    • insetsProperty

      public final Property<Insets> insetsProperty()
      The insets of the Region define the distance from the edge of the region (its layout bounds, or (0, 0, width, height)) to the edge of the content area. All child nodes should be laid out within the content area. The insets are computed based on the Border which has been specified, if any, and also the padding.
      Returns:
      the insets property
      Since:
      JavaFX 8.0
      See Also:
    • paddingProperty

      public Property<Insets> paddingProperty()
      Specified by:
      paddingProperty in interface HasPaddingProperty
      Returns:
      the padding property
      See Also:
    • snapToPixelProperty

      public Property<Boolean> snapToPixelProperty()
      Specified by:
      snapToPixelProperty in interface HasSnapToPixelProperty
      Returns:
      the snapToPixel property
      See Also:
    • backgroundProperty

      public Property<Background> backgroundProperty()
      Specified by:
      backgroundProperty in interface HasBackgroundProperty
      Returns:
      the background property
      See Also:
    • borderProperty

      public Property<Border> borderProperty()
      Specified by:
      borderProperty in interface HasBorderProperty
      Returns:
      the border property
      See Also:
    • impl_computeGeomBounds

      public BaseBounds impl_computeGeomBounds(BaseBounds bounds, BaseTransform tx)
      Description copied from class: Parent
      This set is used to track all of the children of this group which are dirty. It is only used in cases where the number of children is > some value (currently 10). For very wide trees, this can provide a very important speed boost. For the sake of memory consumption, this is null unless the number of children ever crosses the threshold where it will be activated.
      Overrides:
      impl_computeGeomBounds in class Parent
    • resize

      public void resize(double width, double height)
      Invoked by the region's parent during layout to set the region's width and height. Applications should not invoke this method directly. If an application needs to directly set the size of the region, it should override its size constraints by calling setMinSize(), setPrefSize(), or setMaxSize() and it's parent will honor those overrides during layout.
      Specified by:
      resize in interface INode
      Parameters:
      width - the target layout bounds width
      height - the target layout bounds height
    • impl_minWidth

      protected final double impl_minWidth(double height)
      Called during layout to determine the minimum width for this node. Returns the value from computeMinWidth(forHeight) unless the application overrode the minimum width by setting the minWidth property.
      Overrides:
      impl_minWidth in class Parent
      Returns:
      the minimum width that this node should be resized to during layout
      See Also:
    • impl_minHeight

      protected final double impl_minHeight(double width)
      Called during layout to determine the minimum height for this node. Returns the value from computeMinHeight(forWidth) unless the application overrode the minimum height by setting the minHeight property.
      Overrides:
      impl_minHeight in class Parent
      Returns:
      the minimum height that this node should be resized to during layout
      See Also:
    • impl_prefWidth

      protected final double impl_prefWidth(double height)
      Called during layout to determine the preferred width for this node. Returns the value from computePrefWidth(forHeight) unless the application overrode the preferred width by setting the prefWidth property.
      Overrides:
      impl_prefWidth in class Parent
      Returns:
      the preferred width that this node should be resized to during layout
      See Also:
    • impl_prefHeight

      protected final double impl_prefHeight(double width)
      Called during layout to determine the preferred height for this node. Returns the value from computePrefHeight(forWidth) unless the application overrode the preferred height by setting the prefHeight property.
      Overrides:
      impl_prefHeight in class Parent
      Returns:
      the preferred height that this node should be resized to during layout
      See Also:
    • impl_maxWidth

      protected final double impl_maxWidth(double height)
      Called during layout to determine the maximum width for this node. Returns the value from computeMaxWidth(forHeight) unless the application overrode the maximum width by setting the maxWidth property.
      Overrides:
      impl_maxWidth in class Node
      Returns:
      the maximum width that this node should be resized to during layout
      See Also:
    • impl_maxHeight

      protected final double impl_maxHeight(double width)
      Called during layout to determine the maximum height for this node. Returns the value from computeMaxHeight(forWidth) unless the application overrode the maximum height by setting the maxHeight property.
      Overrides:
      impl_maxHeight in class Node
      Returns:
      the maximum height that this node should be resized to during layout
      See Also:
    • computeMinWidth

      protected double computeMinWidth(double height)
      Computes the minimum width of this region. Returns the sum of the left and right insets by default. region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a VERTICAL content bias, then the height parameter can be ignored.
      Overrides:
      computeMinWidth in class Parent
      Parameters:
      height - the height that should be used if min width depends on it
      Returns:
      the computed minimum width of this region
    • computeMinHeight

      protected double computeMinHeight(double width)
      Computes the minimum height of this region. Returns the sum of the top and bottom insets by default. Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.
      Overrides:
      computeMinHeight in class Parent
      Parameters:
      width - the width that should be used if min height depends on it
      Returns:
      the computed minimum height for this region
    • computePrefWidth

      protected double computePrefWidth(double height)
      Computes the preferred width of this region for the given height. Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a VERTICAL content bias, then the height parameter can be ignored.
      Overrides:
      computePrefWidth in class Parent
      Parameters:
      height - the height that should be used if preferred width depends on it
      Returns:
      the computed preferred width for this region
    • computePrefHeight

      protected double computePrefHeight(double width)
      Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.
      Overrides:
      computePrefHeight in class Parent
      Parameters:
      width - the width that should be used if preferred height depends on it
      Returns:
      the computed preferred height for this region
    • computeMaxWidth

      protected double computeMaxWidth(double height)
      Computes the maximum width for this region. Returns Double.MAX_VALUE by default. Region subclasses may override this method to return an different value based on their content and layout strategy. If the subclass doesn't have a VERTICAL content bias, then the height parameter can be ignored.
      Returns:
      the computed maximum width for this region
    • computeMaxHeight

      protected double computeMaxHeight(double width)
      Computes the maximum height of this region. Returns Double.MAX_VALUE by default. Region subclasses may override this method to return a different value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.
      Returns:
      the computed maximum height for this region
    • impl_computeLayoutBounds

      protected final Bounds impl_computeLayoutBounds()
      The layout bounds of this region: 0, 0 width x height
      Overrides:
      impl_computeLayoutBounds in class Node
    • snapSpace

      protected double snapSpace(double value)
      Deprecated.
      replaced by snapSpaceX() and snapSpaceY()
      If this region's snapToPixel property is false, this method returns the same value, else it tries to return a value rounded to the nearest pixel, but since there is no indication if the value is a vertical or horizontal measurement then it may be snapped to the wrong pixel size metric on screens with different horizontal and vertical scales.
      Parameters:
      value - the space value to be snapped
      Returns:
      value rounded to nearest pixel
    • snapSpaceX

      public double snapSpaceX(double value)
      If this region's snapToPixel property is true, returns a value rounded to the nearest pixel in the horizontal direction, else returns the same value.
      Parameters:
      value - the space value to be snapped
      Returns:
      value rounded to nearest pixel
      Since:
      9
    • snapSpaceY

      public double snapSpaceY(double value)
      If this region's snapToPixel property is true, returns a value rounded to the nearest pixel in the vertical direction, else returns the same value.
      Parameters:
      value - the space value to be snapped
      Returns:
      value rounded to nearest pixel
      Since:
      9
    • snapSize

      protected double snapSize(double value)
      Deprecated.
      replaced by snapSizeX() and snapSizeY()
      If this region's snapToPixel property is false, this method returns the same value, else it tries to return a value ceiled to the nearest pixel, but since there is no indication if the value is a vertical or horizontal measurement then it may be snapped to the wrong pixel size metric on screens with different horizontal and vertical scales.
      Parameters:
      value - the size value to be snapped
      Returns:
      value ceiled to nearest pixel
    • snapSizeX

      public double snapSizeX(double value)
      If this region's snapToPixel property is true, returns a value ceiled to the nearest pixel in the horizontal direction, else returns the same value.
      Parameters:
      value - the size value to be snapped
      Returns:
      value ceiled to nearest pixel
      Since:
      9
    • snapSizeY

      public double snapSizeY(double value)
      If this region's snapToPixel property is true, returns a value ceiled to the nearest pixel in the vertical direction, else returns the same value.
      Parameters:
      value - the size value to be snapped
      Returns:
      value ceiled to nearest pixel
      Since:
      9
    • snapPosition

      protected double snapPosition(double value)
      Deprecated.
      replaced by snapPositionX() and snapPositionY()
      If this region's snapToPixel property is false, this method returns the same value, else it tries to return a value rounded to the nearest pixel, but since there is no indication if the value is a vertical or horizontal measurement then it may be snapped to the wrong pixel size metric on screens with different horizontal and vertical scales.
      Parameters:
      value - the position value to be snapped
      Returns:
      value rounded to nearest pixel
    • snapPositionX

      public double snapPositionX(double value)
      If this region's snapToPixel property is true, returns a value rounded to the nearest pixel in the horizontal direction, else returns the same value.
      Parameters:
      value - the position value to be snapped
      Returns:
      value rounded to nearest pixel
      Since:
      9
    • snapPositionY

      public double snapPositionY(double value)
      If this region's snapToPixel property is true, returns a value rounded to the nearest pixel in the vertical direction, else returns the same value.
      Parameters:
      value - the position value to be snapped
      Returns:
      value rounded to nearest pixel
      Since:
      9
    • snappedTopInset

      public final double snappedTopInset()
      Utility method to get the top inset which includes padding and border inset. Then snapped to whole pixels if isSnapToPixel() is true.
      Returns:
      Rounded up insets top
      Since:
      JavaFX 8.0
    • snappedBottomInset

      public final double snappedBottomInset()
      Utility method to get the bottom inset which includes padding and border inset. Then snapped to whole pixels if isSnapToPixel() is true.
      Returns:
      Rounded up insets bottom
      Since:
      JavaFX 8.0
    • snappedLeftInset

      public final double snappedLeftInset()
      Utility method to get the left inset which includes padding and border inset. Then snapped to whole pixels if isSnapToPixel() is true.
      Returns:
      Rounded up insets left
      Since:
      JavaFX 8.0
    • snappedRightInset

      public final double snappedRightInset()
      Utility method to get the right inset which includes padding and border inset. Then snapped to whole pixels if isSnapToPixel() is true.
      Returns:
      Rounded up insets right
      Since:
      JavaFX 8.0
    • positionInArea

      protected void positionInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, HPos halignment, VPos valignment)
      Utility method which positions the child within an area of this region defined by areaX, areaY, areaWidth x areaHeight, with a baseline offset relative to that area.

      This function does not resize the node and uses the node's layout bounds width and height to determine how it should be positioned within the area.

      If the vertical alignment is VPos.BASELINE then it will position the node so that its own baseline aligns with the passed in baselineOffset, otherwise the baseline parameter is ignored.

      If snapToPixel is true for this region, then the x/y position values will be rounded to their nearest pixel boundaries.

      Parameters:
      child - the child being positioned within this region
      areaX - the horizontal offset of the layout area relative to this region
      areaY - the vertical offset of the layout area relative to this region
      areaWidth - the width of the layout area
      areaHeight - the height of the layout area
      areaBaselineOffset - the baseline offset to be used if VPos is BASELINE
      halignment - the horizontal alignment for the child within the area
      valignment - the vertical alignment for the child within the area
    • positionInArea

      public static void positionInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, Insets margin, HPos halignment, VPos valignment, boolean isSnapToPixel)
      Utility method which positions the child within an area of this region defined by areaX, areaY, areaWidth x areaHeight, with a baseline offset relative to that area.

      This function does not resize the node and uses the node's layout bounds width and height to determine how it should be positioned within the area.

      If the vertical alignment is VPos.BASELINE then it will position the node so that its own baseline aligns with the passed in baselineOffset, otherwise the baseline parameter is ignored.

      If snapToPixel is true for this region, then the x/y position values will be rounded to their nearest pixel boundaries.

      If margin is non-null, then that space will be allocated around the child within the layout area. margin may be null.

      Parameters:
      child - the child being positioned within this region
      areaX - the horizontal offset of the layout area relative to this region
      areaY - the vertical offset of the layout area relative to this region
      areaWidth - the width of the layout area
      areaHeight - the height of the layout area
      areaBaselineOffset - the baseline offset to be used if VPos is BASELINE
      margin - the margin of space to be allocated around the child
      halignment - the horizontal alignment for the child within the area
      valignment - the vertical alignment for the child within the area
      Since:
      JavaFX 8.0
    • layoutInArea

      protected void layoutInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, HPos halignment, VPos valignment)
      Utility method which lays out the child within an area of this region defined by areaX, areaY, areaWidth x areaHeight, with a baseline offset relative to that area.

      If the child is resizable, this method will resize it to fill the specified area unless the node's maximum size prevents it. If the node's maximum size preference is less than the area size, the maximum size will be used. If node's maximum is greater than the area size, then the node will be resized to fit within the area, unless its minimum size prevents it.

      If the child has a non-null contentBias, then this method will use it when resizing the child. If the contentBias is horizontal, it will set its width first to the area's width (up to the child's max width limit) and then pass that value to compute the child's height. If child's contentBias is vertical, then it will set its height to the area height (up to child's max height limit) and pass that height to compute the child's width. If the child's contentBias is null, then it's width and height have no dependencies on each other.

      If the child is not resizable (Shape, Group, etc) then it will only be positioned and not resized.

      If the child's resulting size differs from the area's size (either because it was not resizable or it's sizing preferences prevented it), then this function will align the node relative to the area using horizontal and vertical alignment values. If valignment is VPos.BASELINE then the node's baseline will be aligned with the area baseline offset parameter, otherwise the baseline parameter is ignored.

      If snapToPixel is true for this region, then the resulting x,y values will be rounded to their nearest pixel boundaries and the width/height values will be ceiled to the next pixel boundary.

      Parameters:
      child - the child being positioned within this region
      areaX - the horizontal offset of the layout area relative to this region
      areaY - the vertical offset of the layout area relative to this region
      areaWidth - the width of the layout area
      areaHeight - the height of the layout area
      areaBaselineOffset - the baseline offset to be used if VPos is BASELINE
      halignment - the horizontal alignment for the child within the area
      valignment - the vertical alignment for the child within the area
    • layoutInArea

      protected void layoutInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, Insets margin, HPos halignment, VPos valignment)
      Utility method which lays out the child within an area of this region defined by areaX, areaY, areaWidth x areaHeight, with a baseline offset relative to that area.

      If the child is resizable, this method will resize it to fill the specified area unless the node's maximum size prevents it. If the node's maximum size preference is less than the area size, the maximum size will be used. If node's maximum is greater than the area size, then the node will be resized to fit within the area, unless its minimum size prevents it.

      If the child has a non-null contentBias, then this method will use it when resizing the child. If the contentBias is horizontal, it will set its width first to the area's width (up to the child's max width limit) and then pass that value to compute the child's height. If child's contentBias is vertical, then it will set its height to the area height (up to child's max height limit) and pass that height to compute the child's width. If the child's contentBias is null, then it's width and height have no dependencies on each other.

      If the child is not resizable (Shape, Group, etc) then it will only be positioned and not resized.

      If the child's resulting size differs from the area's size (either because it was not resizable or it's sizing preferences prevented it), then this function will align the node relative to the area using horizontal and vertical alignment values. If valignment is VPos.BASELINE then the node's baseline will be aligned with the area baseline offset parameter, otherwise the baseline parameter is ignored.

      If margin is non-null, then that space will be allocated around the child within the layout area. margin may be null.

      If snapToPixel is true for this region, then the resulting x,y values will be rounded to their nearest pixel boundaries and the width/height values will be ceiled to the next pixel boundary.

      Parameters:
      child - the child being positioned within this region
      areaX - the horizontal offset of the layout area relative to this region
      areaY - the vertical offset of the layout area relative to this region
      areaWidth - the width of the layout area
      areaHeight - the height of the layout area
      areaBaselineOffset - the baseline offset to be used if VPos is BASELINE
      margin - the margin of space to be allocated around the child
      halignment - the horizontal alignment for the child within the area
      valignment - the vertical alignment for the child within the area
    • layoutInArea

      protected void layoutInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, Insets margin, boolean fillWidth, boolean fillHeight, HPos halignment, VPos valignment)
      Utility method which lays out the child within an area of this region defined by areaX, areaY, areaWidth x areaHeight, with a baseline offset relative to that area.

      If the child is resizable, this method will use fillWidth and fillHeight to determine whether to resize it to fill the area or keep the child at its preferred dimension. If fillWidth/fillHeight are true, then this method will only resize the child up to its max size limits. If the node's maximum size preference is less than the area size, the maximum size will be used. If node's maximum is greater than the area size, then the node will be resized to fit within the area, unless its minimum size prevents it.

      If the child has a non-null contentBias, then this method will use it when resizing the child. If the contentBias is horizontal, it will set its width first and then pass that value to compute the child's height. If child's contentBias is vertical, then it will set its height first and pass that value to compute the child's width. If the child's contentBias is null, then it's width and height have no dependencies on each other.

      If the child is not resizable (Shape, Group, etc) then it will only be positioned and not resized.

      If the child's resulting size differs from the area's size (either because it was not resizable or it's sizing preferences prevented it), then this function will align the node relative to the area using horizontal and vertical alignment values. If valignment is VPos.BASELINE then the node's baseline will be aligned with the area baseline offset parameter, otherwise the baseline parameter is ignored.

      If margin is non-null, then that space will be allocated around the child within the layout area. margin may be null.

      If snapToPixel is true for this region, then the resulting x,y values will be rounded to their nearest pixel boundaries and the width/height values will be ceiled to the next pixel boundary.

      Parameters:
      child - the child being positioned within this region
      areaX - the horizontal offset of the layout area relative to this region
      areaY - the vertical offset of the layout area relative to this region
      areaWidth - the width of the layout area
      areaHeight - the height of the layout area
      areaBaselineOffset - the baseline offset to be used if VPos is BASELINE
      margin - the margin of space to be allocated around the child
      fillWidth - whether or not the child should be resized to fill the area width or kept to its preferred width
      fillHeight - whether or not the child should e resized to fill the area height or kept to its preferred height
      halignment - the horizontal alignment for the child within the area
      valignment - the vertical alignment for the child within the area
    • layoutInArea

      public static void layoutInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, Insets margin, boolean fillWidth, boolean fillHeight, HPos halignment, VPos valignment, boolean isSnapToPixel)
      Utility method which lays out the child within an area of it's parent defined by areaX, areaY, areaWidth x areaHeight, with a baseline offset relative to that area.

      If the child is resizable, this method will use fillWidth and fillHeight to determine whether to resize it to fill the area or keep the child at its preferred dimension. If fillWidth/fillHeight are true, then this method will only resize the child up to its max size limits. If the node's maximum size preference is less than the area size, the maximum size will be used. If node's maximum is greater than the area size, then the node will be resized to fit within the area, unless its minimum size prevents it.

      If the child has a non-null contentBias, then this method will use it when resizing the child. If the contentBias is horizontal, it will set its width first and then pass that value to compute the child's height. If child's contentBias is vertical, then it will set its height first and pass that value to compute the child's width. If the child's contentBias is null, then it's width and height have no dependencies on each other.

      If the child is not resizable (Shape, Group, etc) then it will only be positioned and not resized.

      If the child's resulting size differs from the area's size (either because it was not resizable or it's sizing preferences prevented it), then this function will align the node relative to the area using horizontal and vertical alignment values. If valignment is VPos.BASELINE then the node's baseline will be aligned with the area baseline offset parameter, otherwise the baseline parameter is ignored.

      If margin is non-null, then that space will be allocated around the child within the layout area. margin may be null.

      If snapToPixel is true for this region, then the resulting x,y values will be rounded to their nearest pixel boundaries and the width/height values will be ceiled to the next pixel boundary.

      Parameters:
      child - the child being positioned within this region
      areaX - the horizontal offset of the layout area relative to this region
      areaY - the vertical offset of the layout area relative to this region
      areaWidth - the width of the layout area
      areaHeight - the height of the layout area
      areaBaselineOffset - the baseline offset to be used if VPos is BASELINE
      margin - the margin of space to be allocated around the child
      fillWidth - whether or not the child should be resized to fill the area width or kept to its preferred width
      fillHeight - whether or not the child should e resized to fill the area height or kept to its preferred height
      halignment - the horizontal alignment for the child within the area
      valignment - the vertical alignment for the child within the area
      isSnapToPixel - whether to snap size and position to pixels
      Since:
      JavaFX 8.0
    • boundedSize

      protected static double boundedSize(double min, double pref, double max)
      Computes the value based on the given min and max values. We encode in this method the logic surrounding various edge cases, such as when the min is specified as greater than the max, or the max less than the min, or a pref value that exceeds either the max or min in their extremes.

      If the min is greater than the max, then we want to make sure the returned value is the min. In other words, in such a case, the min becomes the only acceptable return value.

      If the min and max values are well ordered, and the pref is less than the min then the min is returned. Likewise, if the values are well ordered and the pref is greater than the max, then the max is returned. If the pref lies between the min and the max, then the pref is returned.

      Parameters:
      min - The minimum bound
      pref - The value to be clamped between the min and max
      max - the maximum bound
      Returns:
      the size bounded by min, pref, and max.
    • setMinSize

      public void setMinSize(double minWidth, double minHeight)
      Convenience method for overriding the region's computed minimum width and height. This should only be called if the region's internally computed minimum size doesn't meet the application's layout needs.
      Parameters:
      minWidth - the override value for minimum width
      minHeight - the override value for minimum height
      See Also:
    • setPrefSize

      public void setPrefSize(double prefWidth, double prefHeight)
      Convenience method for overriding the region's computed preferred width and height. This should only be called if the region's internally computed preferred size doesn't meet the application's layout needs.
      Parameters:
      prefWidth - the override value for preferred width
      prefHeight - the override value for preferred height
      See Also:
    • setMaxSize

      public void setMaxSize(double maxWidth, double maxHeight)
      Convenience method for overriding the region's computed maximum width and height. This should only be called if the region's internally computed maximum size doesn't meet the application's layout needs.
      Parameters:
      maxWidth - the override value for maximum width
      maxHeight - the override value for maximum height
      See Also: