Spec-Zone.ru › OpenJavaFX 8
javafx.scene.layout

Class CornerRadii

java.lang.Object
  • javafx.scene.layout.CornerRadii


public class CornerRadii
extends Object
Defines the radii of each of the four corners of a BorderStroke. The CornerRadii class is immutable and therefore can be reused on multiple BorderStrokes. This class defines 8 different values, corresponding to the horizontal and vertical components of 4 quarter ellipses, which in turn define the curvature of the corners of the BorderStroke.

Since:

JavaFX 8.0

  • Field Summary

    Fields
    Modifier and Type Field and Description
    static CornerRadii EMPTY
    A CornerRadii which is entirely empty, indicating squared corners.
  • Constructor Summary

    Constructors
    Constructor and Description
    CornerRadii(double radius)
    Create a new CornerRadii with a single uniform radii value for all components of all corners.
    CornerRadii(double radius, boolean asPercent)
    Create a new CornerRadii with the given radii for each corner.
    CornerRadii(double topLeft, double topRight, double bottomRight, double bottomLeft, boolean asPercent)
    Create a new CornerRadii with uniform yet independent radii for each corner.
    CornerRadii(double topLeftHorizontalRadius, double topLeftVerticalRadius, double topRightVerticalRadius, double topRightHorizontalRadius, double bottomRightHorizontalRadius, double bottomRightVerticalRadius, double bottomLeftVerticalRadius, double bottomLeftHorizontalRadius, boolean topLeftHorizontalRadiusAsPercent, boolean topLeftVerticalRadiusAsPercent, boolean topRightVerticalRadiusAsPercent, boolean topRightHorizontalRadiusAsPercent, boolean bottomRightHorizontalRadiusAsPercent, boolean bottomRightVerticalRadiusAsPercent, boolean bottomLeftVerticalRadiusAsPercent, boolean bottomLeftHorizontalRadiusAsPercent)
    Creates a new CornerRadii, allowing for specification of each component of each corner radii and whether each component should be treated as a value or percentage.
  • Method Summary

    All MethodsInstance MethodsConcrete Methods
    Modifier and Type Method and Description
    boolean equals(Object o)
    double getBottomLeftHorizontalRadius()
    The length of the horizontal radii of the bottom-left corner.
    double getBottomLeftVerticalRadius()
    The length of the vertical radii of the bottom-left corner.
    double getBottomRightHorizontalRadius()
    The length of the horizontal radii of the bottom-right corner.
    double getBottomRightVerticalRadius()
    The length of the vertical radii of the bottom-right corner.
    double getTopLeftHorizontalRadius()
    The length of the horizontal radii of the top-left corner.
    double getTopLeftVerticalRadius()
    The length of the vertical radii of the top-left corner.
    double getTopRightHorizontalRadius()
    The length of the horizontal radii of the top-right corner.
    double getTopRightVerticalRadius()
    The length of the vertical radii of the top-right corner.
    int hashCode()
    boolean isBottomLeftHorizontalRadiusAsPercentage()
    indicates whether bottomLeftHorizontalRadius is interpreted as a value or a percentage.
    boolean isBottomLeftVerticalRadiusAsPercentage()
    indicates whether bottomLeftVerticalRadius is interpreted as a value or a percentage.
    boolean isBottomRightHorizontalRadiusAsPercentage()
    indicates whether bottomRightHorizontalRadius is interpreted as a value or a percentage.
    boolean isBottomRightVerticalRadiusAsPercentage()
    indicates whether bottomRightVerticalRadius is interpreted as a value or a percentage.
    boolean isTopLeftHorizontalRadiusAsPercentage()
    indicates whether topLeftHorizontalRadius is interpreted as a value or a percentage.
    boolean isTopLeftVerticalRadiusAsPercentage()
    indicates whether topLeftVerticalRadius is interpreted as a value or a percentage.
    boolean isTopRightHorizontalRadiusAsPercentage()
    indicates whether topRightHorizontalRadius is interpreted as a value or a percentage.
    boolean isTopRightVerticalRadiusAsPercentage()
    indicates whether topRightVerticalRadius is interpreted as a value or a percentage.
    boolean isUniform()
    Indicates whether each corner radius is exactly the same, and each are either uniformly percentage-based or not.
    String toString()
    • Methods inherited from class java.lang.Object

      clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Detail

    • EMPTY

      public static final CornerRadii EMPTY
      A CornerRadii which is entirely empty, indicating squared corners. This is the default value for a BorderStroke's radii.
  • Constructor Detail

    • CornerRadii

      public CornerRadii(double radius)
      Create a new CornerRadii with a single uniform radii value for all components of all corners. This constructor will create the CornerRadii such that none of the values are percentages.

      Parameters:

      radius - The radii for each corner. Negative values are not allowed.

    • CornerRadii

      public CornerRadii(double radius,
                         boolean asPercent)
      Create a new CornerRadii with the given radii for each corner. The value is interpreted either as being a percentage or not based on the asPercent argument.

      Parameters:

      radius - The radii for each corner. Negative values are not allowed.

    • CornerRadii

      public CornerRadii(double topLeft,
                         double topRight,
                         double bottomRight,
                         double bottomLeft,
                         boolean asPercent)
      Create a new CornerRadii with uniform yet independent radii for each corner. That is, each corner can be specified independently, but the horizontal and vertical components of each corner is uniform.

      Parameters:

      topLeft - The radii of the top-left corner. Negative numbers are not allowed.

    • CornerRadii

      public CornerRadii(double topLeftHorizontalRadius,
                         double topLeftVerticalRadius,
                         double topRightVerticalRadius,
                         double topRightHorizontalRadius,
                         double bottomRightHorizontalRadius,
                         double bottomRightVerticalRadius,
                         double bottomLeftVerticalRadius,
                         double bottomLeftHorizontalRadius,
                         boolean topLeftHorizontalRadiusAsPercent,
                         boolean topLeftVerticalRadiusAsPercent,
                         boolean topRightVerticalRadiusAsPercent,
                         boolean topRightHorizontalRadiusAsPercent,
                         boolean bottomRightHorizontalRadiusAsPercent,
                         boolean bottomRightVerticalRadiusAsPercent,
                         boolean bottomLeftVerticalRadiusAsPercent,
                         boolean bottomLeftHorizontalRadiusAsPercent)
      Creates a new CornerRadii, allowing for specification of each component of each corner radii and whether each component should be treated as a value or percentage.

      Parameters:

      topLeftHorizontalRadius -

  • Method Detail

    • getTopLeftHorizontalRadius

      public final double getTopLeftHorizontalRadius()
      The length of the horizontal radii of the top-left corner.
    • getTopLeftVerticalRadius

      public final double getTopLeftVerticalRadius()
      The length of the vertical radii of the top-left corner.
    • getTopRightVerticalRadius

      public final double getTopRightVerticalRadius()
      The length of the vertical radii of the top-right corner.
    • getTopRightHorizontalRadius

      public final double getTopRightHorizontalRadius()
      The length of the horizontal radii of the top-right corner.
    • getBottomRightHorizontalRadius

      public final double getBottomRightHorizontalRadius()
      The length of the horizontal radii of the bottom-right corner.
    • getBottomRightVerticalRadius

      public final double getBottomRightVerticalRadius()
      The length of the vertical radii of the bottom-right corner.
    • getBottomLeftVerticalRadius

      public final double getBottomLeftVerticalRadius()
      The length of the vertical radii of the bottom-left corner.
    • getBottomLeftHorizontalRadius

      public final double getBottomLeftHorizontalRadius()
      The length of the horizontal radii of the bottom-left corner.
    • isTopLeftHorizontalRadiusAsPercentage

      public final boolean isTopLeftHorizontalRadiusAsPercentage()
      indicates whether topLeftHorizontalRadius is interpreted as a value or a percentage.
    • isTopLeftVerticalRadiusAsPercentage

      public final boolean isTopLeftVerticalRadiusAsPercentage()
      indicates whether topLeftVerticalRadius is interpreted as a value or a percentage.
    • isTopRightVerticalRadiusAsPercentage

      public final boolean isTopRightVerticalRadiusAsPercentage()
      indicates whether topRightVerticalRadius is interpreted as a value or a percentage.
    • isTopRightHorizontalRadiusAsPercentage

      public final boolean isTopRightHorizontalRadiusAsPercentage()
      indicates whether topRightHorizontalRadius is interpreted as a value or a percentage.
    • isBottomRightHorizontalRadiusAsPercentage

      public final boolean isBottomRightHorizontalRadiusAsPercentage()
      indicates whether bottomRightHorizontalRadius is interpreted as a value or a percentage.
    • isBottomRightVerticalRadiusAsPercentage

      public final boolean isBottomRightVerticalRadiusAsPercentage()
      indicates whether bottomRightVerticalRadius is interpreted as a value or a percentage.
    • isBottomLeftVerticalRadiusAsPercentage

      public final boolean isBottomLeftVerticalRadiusAsPercentage()
      indicates whether bottomLeftVerticalRadius is interpreted as a value or a percentage.
    • isBottomLeftHorizontalRadiusAsPercentage

      public final boolean isBottomLeftHorizontalRadiusAsPercentage()
      indicates whether bottomLeftHorizontalRadius is interpreted as a value or a percentage.
    • isUniform

      public final boolean isUniform()
      Indicates whether each corner radius is exactly the same, and each are either uniformly percentage-based or not.
    • equals

      public boolean equals(Object o)

      Overrides:

      equals in class Object

    • hashCode

      public int hashCode()

      Overrides:

      hashCode in class Object

    • toString

      public String toString()

      Overrides:

      toString in class Object

© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API