Spec-Zone.ru › OpenJavaFX 11
Модуль javafx.graphics
Пакет javafx.scene.layout

Класс CornerRadii

  • java.lang.Object
    • javafx.scene.layout.CornerRadii
  • public class CornerRadii
    extends Object
    Определяет радиусы каждого из четырёх углов BorderStroke. Класс CornerRadii является неизменяемым и поэтому может быть повторно использован в нескольких BorderStroke. Этот класс определяет 8 различных значений, соответствующих горизонтальным и вертикальным компонентам 4 четвертей эллипсов, которые в свою очередь определяют кривизну углов BorderStroke.
    Since:
    JavaFX 8.0
  • Краткое описание полей

    Поля
    Модификатор и тип Поле Описание
    static CornerRadii EMPTY
    CornerRadii, полностью пустой, указывающий на квадратные углы.
  • Краткое описание конструкторов

    Конструкторы
    Конструктор Описание
    CornerRadii​(double radius)
    Создаёт новый CornerRadii с одинаковым значением радиуса для всех компонентов всех углов.
    CornerRadii​(double radius, boolean asPercent)
    Создаёт новый CornerRadii с заданными радиусами для каждого угла.
    CornerRadii​(double topLeft, double topRight, double bottomRight, double bottomLeft, boolean asPercent)
    Создаёт новый CornerRadii с одинаковыми, но независимыми радиусами для каждого угла.
    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)
    Создаёт новый CornerRadii, позволяющий указать каждый компонент радиуса каждого угла и то, рассматривается ли каждый компонент как значение или процент.
  • Краткое описание методов

    Все методыМетоды классаКонкретные методы
    Модификатор и тип Метод Описание
    boolean equals​(Object o)
    double getBottomLeftHorizontalRadius()
    Длина горизонтального радиуса левого нижнего угла.
    double getBottomLeftVerticalRadius()
    Длина вертикального радиуса левого нижнего угла.
    double getBottomRightHorizontalRadius()
    Длина горизонтального радиуса правого нижнего угла.
    double getBottomRightVerticalRadius()
    Длина вертикального радиуса правого нижнего угла.
    double getTopLeftHorizontalRadius()
    Длина горизонтального радиуса левого верхнего угла.
    double getTopLeftVerticalRadius()
    Длина вертикального радиуса левого верхнего угла.
    double getTopRightHorizontalRadius()
    Длина горизонтального радиуса правого верхнего угла.
    double getTopRightVerticalRadius()
    Длина вертикального радиуса правого верхнего угла.
    int hashCode()
    boolean isBottomLeftHorizontalRadiusAsPercentage()
    указывает, интерпретируется ли bottomLeftHorizontalRadius как значение или процент.
    boolean isBottomLeftVerticalRadiusAsPercentage()
    указывает, интерпретируется ли bottomLeftVerticalRadius как значение или процент.
    boolean isBottomRightHorizontalRadiusAsPercentage()
    указывает, интерпретируется ли bottomRightHorizontalRadius как значение или процент.
    boolean isBottomRightVerticalRadiusAsPercentage()
    указывает, интерпретируется ли bottomRightVerticalRadius как значение или процент.
    boolean isTopLeftHorizontalRadiusAsPercentage()
    указывает, интерпретируется ли topLeftHorizontalRadius как значение или процент.
    boolean isTopLeftVerticalRadiusAsPercentage()
    указывает, интерпретируется ли topLeftVerticalRadius как значение или процент.
    boolean isTopRightHorizontalRadiusAsPercentage()
    указывает, интерпретируется ли topRightHorizontalRadius как значение или процент.
    boolean isTopRightVerticalRadiusAsPercentage()
    указывает, интерпретируется ли topRightVerticalRadius как значение или процент.
    boolean isUniform()
    Указывает, одинаковы ли радиусы каждого угла и являются ли они единообразно заданными в процентах или нет.
    String toString()
    • Методы, унаследованные от класса java.lang.Object

      clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Краткое описание полей

    • 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.
  • Краткое описание конструкторов

    • 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.
      asPercent - Whether the radii should be interpreted as a percentage.
    • 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.
      topRight - The radii of the top-right corner. Negative numbers are not allowed.
      bottomRight - The radii of the bottom-right corner. Negative numbers are not allowed.
      bottomLeft - The radii of the bottom-left corner. Negative numbers are not allowed.
      asPercent - Whether all four radii should be considered as values or percentages
    • 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 - The length of the horizontal radii of the top-left corner
      topLeftVerticalRadius - The length of the vertical radii of the top-left corner
      topRightVerticalRadius - The length of the vertical radii of the top-right corner
      topRightHorizontalRadius - The length of the horizontal radii of the top-right corner
      bottomRightHorizontalRadius - The length of the horizontal radii of the bottom-right corner
      bottomRightVerticalRadius - The length of the vertical radii of the bottom-right corner
      bottomLeftVerticalRadius - The length of the vertical radii of the bottom-left corner
      bottomLeftHorizontalRadius - The length of the horizontal radii of the bottom-left corner
      topLeftHorizontalRadiusAsPercent - Is the horizontal radii of the top-left corner as percentage
      topLeftVerticalRadiusAsPercent - Is the vertical radii of the top-left corner as percentage
      topRightVerticalRadiusAsPercent - Is the vertical radii of the top-right corner as percentage
      topRightHorizontalRadiusAsPercent - Is the horizontal radii of the top-right corner as percentage
      bottomRightHorizontalRadiusAsPercent - Is the horizontal radii of the bottom-right corner as percentage
      bottomRightVerticalRadiusAsPercent - Is the vertical radii of the bottom-right corner as percentage
      bottomLeftVerticalRadiusAsPercent - Is the vertical radii of the bottom-left corner as percentage
      bottomLeftHorizontalRadiusAsPercent - Is the horizontal radii of the bottom-left corner as percentage
  • Краткое описание методов

    • getTopLeftHorizontalRadius

      public final double getTopLeftHorizontalRadius()
      The length of the horizontal radii of the top-left corner.
      Returns:
      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.
      Returns:
      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.
      Returns:
      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.
      Returns:
      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.
      Returns:
      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.
      Returns:
      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.
      Returns:
      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.
      Returns:
      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.
      Returns:
      if true topLeftHorizontalRadius is in percentage, otherwise a value
    • isTopLeftVerticalRadiusAsPercentage

      public final boolean isTopLeftVerticalRadiusAsPercentage()
      indicates whether topLeftVerticalRadius is interpreted as a value or a percentage.
      Returns:
      if true topLeftVerticalRadius is in percentage, otherwise a value
    • isTopRightVerticalRadiusAsPercentage

      public final boolean isTopRightVerticalRadiusAsPercentage()
      indicates whether topRightVerticalRadius is interpreted as a value or a percentage.
      Returns:
      if true topRightVerticalRadius is in percentage, otherwise a value
    • isTopRightHorizontalRadiusAsPercentage

      public final boolean isTopRightHorizontalRadiusAsPercentage()
      indicates whether topRightHorizontalRadius is interpreted as a value or a percentage.
      Returns:
      if true topRightHorizontalRadius is in percentage, otherwise a value
    • isBottomRightHorizontalRadiusAsPercentage

      public final boolean isBottomRightHorizontalRadiusAsPercentage()
      indicates whether bottomRightHorizontalRadius is interpreted as a value or a percentage.
      Returns:
      if true bottomRightHorizontalRadius is in percentage, otherwise a value
    • isBottomRightVerticalRadiusAsPercentage

      public final boolean isBottomRightVerticalRadiusAsPercentage()
      indicates whether bottomRightVerticalRadius is interpreted as a value or a percentage.
      Returns:
      if true bottomRightVerticalRadius is in percentage, otherwise a value
    • isBottomLeftVerticalRadiusAsPercentage

      public final boolean isBottomLeftVerticalRadiusAsPercentage()
      indicates whether bottomLeftVerticalRadius is interpreted as a value or a percentage.
      Returns:
      if true bottomLeftVerticalRadius is in percentage, otherwise a value
    • isBottomLeftHorizontalRadiusAsPercentage

      public final boolean isBottomLeftHorizontalRadiusAsPercentage()
      indicates whether bottomLeftHorizontalRadius is interpreted as a value or a percentage.
      Returns:
      if true bottomLeftHorizontalRadius is in percentage, otherwise a value
    • isUniform

      public final boolean isUniform()
      Indicates whether each corner radius is exactly the same, and each are either uniformly percentage-based or not.
      Returns:
      if true each corner radius is uniformly percentage-based, otherwise 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