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

Class BorderStrokeStyle

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


public final class BorderStrokeStyle
extends Object
Defines the style of the stroke to use on one side of a BorderStroke. There are several predefined styles, although the properties of these predefined styles may not match the settings used to ultimately draw them. Or you may create a new BorderStrokeStyle and define each of the stroke settings manually, similar to any Shape.

Since:

JavaFX 8.0

  • Field Summary

    Fields
    Modifier and Type Field and Description
    static BorderStrokeStyle DASHED
    A predefined dashed pattern to be used for stroking
    static BorderStrokeStyle DOTTED
    A predefined dotted pattern to be used for stroking
    static BorderStrokeStyle NONE
    Indicates that no stroke should be drawn.
    static BorderStrokeStyle SOLID
    A predefined solid line to be used for stroking
  • Constructor Summary

    Constructors
    Constructor and Description
    BorderStrokeStyle(StrokeType type, StrokeLineJoin lineJoin, StrokeLineCap lineCap, double miterLimit, double dashOffset, List<Double> dashArray)
    Creates a new BorderStrokeStyle.
  • Method Summary

    All MethodsInstance MethodsConcrete Methods
    Modifier and Type Method and Description
    boolean equals(Object o)
    List<Double> getDashArray()
    Defines the array representing the lengths of the dash segments.
    double getDashOffset()
    Defines a distance specified in user coordinates that represents an offset into the dashing pattern.
    StrokeLineCap getLineCap()
    The end cap style of this Shape as one of the following values that define possible end cap styles: StrokeLineCap.BUTT, StrokeLineCap.ROUND, and StrokeLineCap.SQUARE.
    StrokeLineJoin getLineJoin()
    Defines the decoration applied where path segments meet.
    double getMiterLimit()
    Defines the limit for the StrokeLineJoin.MITER line join style.
    StrokeType getType()
    Defines the direction (inside, outside, or both) that the strokeWidth is applied to the boundary of the shape.
    int hashCode()
    String toString()
    • Methods inherited from class java.lang.Object

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

    • NONE

      public static final BorderStrokeStyle NONE
      Indicates that no stroke should be drawn.
    • DOTTED

      public static final BorderStrokeStyle DOTTED
      A predefined dotted pattern to be used for stroking
    • DASHED

      public static final BorderStrokeStyle DASHED
      A predefined dashed pattern to be used for stroking
    • SOLID

      public static final BorderStrokeStyle SOLID
      A predefined solid line to be used for stroking
  • Constructor Detail

    • BorderStrokeStyle

      public BorderStrokeStyle(StrokeType type,
                               StrokeLineJoin lineJoin,
                               StrokeLineCap lineCap,
                               double miterLimit,
                               double dashOffset,
                               List<Double> dashArray)
      Creates a new BorderStrokeStyle.

      Parameters:

      type - The type of stroke, whether rendered OUTSIDE, INSIDE, or CENTERED on the border line. If null, defaults to CENTERED.

  • Method Detail

    • getType

      public final StrokeType getType()
      Defines the direction (inside, outside, or both) that the strokeWidth is applied to the boundary of the shape.

      Default value:

      CENTERED

    • getLineJoin

      public final StrokeLineJoin getLineJoin()
      Defines the decoration applied where path segments meet. The value must have one of the following values: StrokeLineJoin.BEVEL, StrokeLineJoin.MITER, and StrokeLineJoin.ROUND.

      Default value:

      MITER

    • getLineCap

      public final StrokeLineCap getLineCap()
      The end cap style of this Shape as one of the following values that define possible end cap styles: StrokeLineCap.BUTT, StrokeLineCap.ROUND, and StrokeLineCap.SQUARE.

      Default value:

      SQUARE

    • getMiterLimit

      public final double getMiterLimit()
      Defines the limit for the StrokeLineJoin.MITER line join style.

      Default value:

      10

    • getDashOffset

      public final double getDashOffset()
      Defines a distance specified in user coordinates that represents an offset into the dashing pattern. In other words, the dash phase defines the point in the dashing pattern that will correspond to the beginning of the stroke.

      Default value:

      0

    • getDashArray

      public final List<Double> getDashArray()
      Defines the array representing the lengths of the dash segments. Alternate entries in the array represent the user space lengths of the opaque and transparent segments of the dashes. As the pen moves along the outline of the Shape to be stroked, the user space distance that the pen travels is accumulated. The distance value is used to index into the dash array. The pen is opaque when its current cumulative distance maps to an even element of the dash array and transparent otherwise. An empty dashArray indicates a solid line with no spaces.

      Default value:

      empty

    • toString

      public String toString()

      Overrides:

      toString in class Object

    • equals

      public boolean equals(Object o)

      Overrides:

      equals in class Object

    • hashCode

      public int hashCode()

      Overrides:

      hashCode 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