public final class BorderStrokeStyle extends Object
Shape
.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 and Description |
---|
BorderStrokeStyle(StrokeType type,
StrokeLineJoin lineJoin,
StrokeLineCap lineCap,
double miterLimit,
double dashOffset,
List<Double> dashArray)
Creates a new BorderStrokeStyle.
|
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() |
public static final BorderStrokeStyle NONE
public static final BorderStrokeStyle DOTTED
public static final BorderStrokeStyle DASHED
public static final BorderStrokeStyle SOLID
public BorderStrokeStyle(StrokeType type, StrokeLineJoin lineJoin, StrokeLineCap lineCap, double miterLimit, double dashOffset, List<Double> dashArray)
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 MITERlineCap
- 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.public final StrokeType getType()
public final StrokeLineJoin getLineJoin()
StrokeLineJoin.BEVEL
, StrokeLineJoin.MITER
,
and StrokeLineJoin.ROUND
.public final StrokeLineCap getLineCap()
Shape
as one of the following
values that define possible end cap styles:
StrokeLineCap.BUTT
, StrokeLineCap.ROUND
,
and StrokeLineCap.SQUARE
.public final double getMiterLimit()
StrokeLineJoin.MITER
line join style.public final double getDashOffset()
public final List<Double> getDashArray()
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.Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.