public final class BorderStrokeStyle
extends java.lang.Object
javafx.scene.shape.Shape
.Modifier and Type | Field and Description |
---|---|
private java.util.List<java.lang.Double> |
dashArray |
static BorderStrokeStyle |
DASHED
A predefined dashed pattern to be used for stroking
|
private static java.util.List<java.lang.Double> |
DASHED_LIST |
private double |
dashOffset |
static BorderStrokeStyle |
DOTTED
A predefined dotted pattern to be used for stroking
|
private static java.util.List<java.lang.Double> |
DOTTED_LIST |
private int |
hash
A cached hash code
|
private StrokeLineCap |
lineCap |
private StrokeLineJoin |
lineJoin |
private double |
miterLimit |
static BorderStrokeStyle |
NONE
Indicates that no stroke should be drawn.
|
static BorderStrokeStyle |
SOLID
A predefined solid line to be used for stroking
|
private StrokeType |
type |
Constructor and Description |
---|
BorderStrokeStyle(StrokeType type,
StrokeLineJoin lineJoin,
StrokeLineCap lineCap,
double miterLimit,
double dashOffset,
java.util.List<java.lang.Double> dashArray)
Creates a new BorderStrokeStyle.
|
Modifier and Type | Method and Description |
---|---|
private static java.util.List<java.lang.Double> |
asList(double... items) |
boolean |
equals(java.lang.Object o) |
java.util.List<java.lang.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() |
java.lang.String |
toString() |
private static final java.util.List<java.lang.Double> DOTTED_LIST
private static final java.util.List<java.lang.Double> DASHED_LIST
public static final BorderStrokeStyle NONE
public static final BorderStrokeStyle DOTTED
public static final BorderStrokeStyle DASHED
public static final BorderStrokeStyle SOLID
private final StrokeType type
private final StrokeLineJoin lineJoin
private final StrokeLineCap lineCap
private final double miterLimit
private final double dashOffset
private final java.util.List<java.lang.Double> dashArray
private final int hash
public BorderStrokeStyle(StrokeType type, StrokeLineJoin lineJoin, StrokeLineCap lineCap, double miterLimit, double dashOffset, java.util.List<java.lang.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 java.util.List<java.lang.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.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
private static java.util.List<java.lang.Double> asList(double... items)