Class BorderStrokeStyle
java.lang.Object
javafx.scene.layout.BorderStrokeStyle
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 SummaryFieldsModifier and TypeFieldDescriptionstatic final BorderStrokeStyleA predefined dashed pattern to be used for strokingstatic final BorderStrokeStyleA predefined dotted pattern to be used for strokingstatic final BorderStrokeStyleIndicates that no stroke should be drawn.static final BorderStrokeStyleA predefined solid line to be used for stroking
- 
Constructor SummaryConstructorsConstructorDescriptionBorderStrokeStyle(StrokeType type, StrokeLineJoin lineJoin, StrokeLineCap lineCap, double miterLimit, double dashOffset, List<Double> dashArray) Creates a new BorderStrokeStyle.
- 
Method SummaryModifier and TypeMethodDescriptionDefines the array representing the lengths of the dash segments.final doubleDefines a distance specified in user coordinates that represents an offset into the dashing pattern.final StrokeLineCapThe end cap style of thisShapeas one of the following values that define possible end cap styles:StrokeLineCap.BUTT,StrokeLineCap.ROUND, andStrokeLineCap.SQUARE.final StrokeLineJoinDefines the decoration applied where path segments meet.final doubleDefines the limit for theStrokeLineJoin.MITERline join style.final StrokeTypegetType()Defines the direction (inside, outside, or both) that the strokeWidth is applied to the boundary of the shape.
- 
Field Details- 
NONEIndicates that no stroke should be drawn.
- 
DOTTEDA predefined dotted pattern to be used for stroking
- 
DASHEDA predefined dashed pattern to be used for stroking
- 
SOLIDA predefined solid line to be used for stroking
 
- 
- 
Constructor Details- 
BorderStrokeStylepublic 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.
- lineJoin- The line join. If null, defaults to MITER
- lineCap- The line cap. If null, defaults to BUTT.
- miterLimit- The miter limit. 10 is a good default value.
- dashOffset- The dashOffset. 0 is a good default value.
- dashArray- The dash array. If null, defaults to an empty list.
 
 
- 
- 
Method Details- 
getTypeDefines the direction (inside, outside, or both) that the strokeWidth is applied to the boundary of the shape.- Default value:
- CENTERED
- Returns:
- the the direction that the strokeWidth is applied to the boundary of the shape
 
- 
getLineJoinDefines the decoration applied where path segments meet. The value must have one of the following values:StrokeLineJoin.BEVEL,StrokeLineJoin.MITER, andStrokeLineJoin.ROUND.- Default value:
- MITER
- Returns:
- the decoration applied where path segments meet
 
- 
getLineCapThe end cap style of thisShapeas one of the following values that define possible end cap styles:StrokeLineCap.BUTT,StrokeLineCap.ROUND, andStrokeLineCap.SQUARE.- Default value:
- SQUARE
- Returns:
- the end cap style
 
- 
getMiterLimitpublic final double getMiterLimit()Defines the limit for theStrokeLineJoin.MITERline join style.- Default value:
- 10
- Returns:
- the limit for the StrokeLineJoin.MITER line join style
 
- 
getDashOffsetpublic 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
- Returns:
- the offset into the dashing pattern
 
- 
getDashArrayDefines 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 theShapeto 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
- Returns:
- the array representing the lengths of the dash segments
 
 
-