Border for styling a Region.
The stroke is a vector-based rendering that outlines the border area.
It can be inset (or outset) from the Region's edge, and the values
of the stroke are taken into account when computing the Region's
insets (for defining the content area). The stroke visuals are not used when
any BorderImages are in use.
When applied to a Region with a defined shape, the border width
and stroking information for the top is used, while the other
attributes are ignored.
| Modifier and Type | Field and Description |
|---|---|
| private final Paint | |
| private final BorderStrokeStyle | |
| public static final BorderWidths | DEFAULT_WIDTHS
The default Insets to be used with a BorderStroke that does not otherwise define any. |
| private final int | hash
A cached hash code |
| pack-priv final Insets | |
| private final Insets | |
| private final Paint | |
| private final BorderStrokeStyle | |
| public static final BorderWidths | MEDIUM
The default insets when "medium" is specified |
| pack-priv final Insets | |
| private final CornerRadii | |
| private final Paint | |
| private final BorderStrokeStyle | |
| private final boolean | |
| public static final BorderWidths | THICK
The default insets when "thick" is specified |
| public static final BorderWidths | THIN
The default insets when "thin" is specified. |
| private final Paint | |
| private final BorderStrokeStyle | |
| private final BorderWidths |
| Access | Constructor and Description |
|---|---|
| public | BorderStroke(Paint
The stroke to use for all sides. If stroke, BorderStrokeStyle null, defaults to Color.BLACK.The style to use for all sides. If style, CornerRadii null, defaults to BorderStrokeStyle.NONE.The radii to use. If radii, BorderWidths null, defaults to CornerRadii.EMPTY.The widths to use. If widths)null, defaults to DEFAULT_WIDTHS.Creates a new |
| public | BorderStroke(Paint
The stroke to use for all sides. If stroke, BorderStrokeStyle null, defaults to Color.BLACK.The style to use for all sides. If style, CornerRadii null, defaults to BorderStrokeStyle.NONE.The radii to use. If radii, BorderWidths null, defaults to CornerRadii.EMPTY.The widths to use. If widths, Insets null, defaults to DEFAULT_WIDTHS.The insets indicating where to draw the border relative to the region edges.
If insets)null, defaults to Insets.EMPTY.Creates a new |
| public | BorderStroke(Paint
The fill to use on the top. If topStroke, Paint null, defaults to Color.BLACK.The fill to use on the right. If rightStroke, Paint null, defaults to the same value as topStroke.The fill to use on the bottom. If bottomStroke, Paint null, defaults to the same value as topStroke.The fill to use on the left. If leftStroke, BorderStrokeStyle null, defaults to the same value as rightStroke.The style to use on the top. If topStyle, BorderStrokeStyle null, defaults to BorderStrokeStyle.NONE.The style to use on the right. If rightStyle, BorderStrokeStyle null, defaults to the same value as topStyle.The style to use on the bottom. If bottomStyle, BorderStrokeStyle null, defaults to the same value as topStyle.The style to use on the left. If leftStyle, CornerRadii null, defaults to the same value as rightStyle.The radii. If radii, BorderWidths null, defaults to square corners by using CornerRadii.EMPTY.The thickness of each side. If widths, Insets null, defaults to DEFAULT_WIDTHS.The insets indicating where to draw the border relative to the region edges.
If insets)null, defaults to Insets.EMPTY.Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| private double | |
| private double | |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. Indicates whether some other object is "equal to" this one. |
| public final Paint | Returns: the fill of bottom side of this borderDefines the fill of bottom side of this border. |
| public final BorderStrokeStyle | Returns: the style of bottom side of this borderDefines the style of bottom side of this border. |
| public final Insets | Returns: the insets of each side of theBorderStrokeDefines the insets of each side of the |
| public final Paint | Returns: the fill of left side of this borderDefines the fill of left side of this border. |
| public final BorderStrokeStyle | Returns: the style of left side of this borderDefines the style of left side of this border. |
| public final CornerRadii | Returns: the radii for each corner of thisBorderStrokeDefines the radii for each corner of this |
| public final Paint | Returns: the fill of right side of this borderDefines the fill of right side of this border. |
| public final BorderStrokeStyle | Returns: the style of right side of this borderDefines the style of right side of this border. |
| public final Paint | Returns: the fill of top side of this borderDefines the fill of top side of this border. |
| public final BorderStrokeStyle | Returns: the style of top side of this borderDefines the style of top side of this border. |
| public final BorderWidths | Returns: the thickness of each side of theBorderStrokeDefines the thickness of each side of the |
| public int | |
| public BorderStroke | interpolate(BorderStroke
the target value endValue, double the interpolation factor t)Implements javafx. Returns an intermediate value between the value of this |
| private boolean | isSame(Paint topStroke, Paint rightStroke, Paint bottomStroke, Paint leftStroke, BorderStrokeStyle topStyle, BorderStrokeStyle rightStyle, BorderStrokeStyle bottomStyle, BorderStrokeStyle leftStyle, CornerRadii radii, BorderWidths widths, Insets insets)
|
| public final boolean | Returns: true if border stroke is uniformChecks if the stroke of this region is uniform. |
| private int |
| bottomStroke | back to summary |
|---|---|
| private final Paint bottomStroke | |
| bottomStyle | back to summary |
|---|---|
| private final BorderStrokeStyle bottomStyle | |
| DEFAULT_WIDTHS | back to summary |
|---|---|
| public static final BorderWidths DEFAULT_WIDTHS The default Insets to be used with a BorderStroke that does not otherwise define any. | |
| hash | back to summary |
|---|---|
| private final int hash A cached hash code | |
| innerEdge | back to summary |
|---|---|
| pack-priv final Insets innerEdge | |
| insets | back to summary |
|---|---|
| private final Insets insets | |
| leftStroke | back to summary |
|---|---|
| private final Paint leftStroke | |
| leftStyle | back to summary |
|---|---|
| private final BorderStrokeStyle leftStyle | |
| MEDIUM | back to summary |
|---|---|
| public static final BorderWidths MEDIUM The default insets when "medium" is specified | |
| outerEdge | back to summary |
|---|---|
| pack-priv final Insets outerEdge | |
| radii | back to summary |
|---|---|
| private final CornerRadii radii | |
| rightStroke | back to summary |
|---|---|
| private final Paint rightStroke | |
| rightStyle | back to summary |
|---|---|
| private final BorderStrokeStyle rightStyle | |
| strokeUniform | back to summary |
|---|---|
| private final boolean strokeUniform | |
| THICK | back to summary |
|---|---|
| public static final BorderWidths THICK The default insets when "thick" is specified | |
| THIN | back to summary |
|---|---|
| public static final BorderWidths THIN The default insets when "thin" is specified. | |
| topStroke | back to summary |
|---|---|
| private final Paint topStroke | |
| topStyle | back to summary |
|---|---|
| private final BorderStrokeStyle topStyle | |
| widths | back to summary |
|---|---|
| private final BorderWidths widths | |
| BorderStroke | back to summary |
|---|---|
| public BorderStroke(Paint stroke, BorderStrokeStyle style, CornerRadii radii, BorderWidths widths) Creates a new
| |
| BorderStroke | back to summary |
|---|---|
| public BorderStroke(Paint stroke, BorderStrokeStyle style, CornerRadii radii, BorderWidths widths, Insets insets) Creates a new
| |
| BorderStroke | back to summary |
|---|---|
| public BorderStroke(Paint topStroke, Paint rightStroke, Paint bottomStroke, Paint leftStroke, BorderStrokeStyle topStyle, BorderStrokeStyle rightStyle, BorderStrokeStyle bottomStyle, BorderStrokeStyle leftStyle, CornerRadii radii, BorderWidths widths, Insets insets) Creates a new
| |
| computeInside | back to summary |
|---|---|
| private double computeInside(StrokeType type, double width) | |
| computeOutside | back to summary |
|---|---|
| private double computeOutside(StrokeType type, double width) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getBottomStroke | back to summary |
|---|---|
| public final Paint getBottomStroke() Defines the fill of bottom side of this border. If
| |
| getBottomStyle | back to summary |
|---|---|
| public final BorderStrokeStyle getBottomStyle() Defines the style of bottom side of this border. If
| |
| getInsets | back to summary |
|---|---|
| public final Insets getInsets() Defines the insets of each side of the
| |
| getLeftStroke | back to summary |
|---|---|
| public final Paint getLeftStroke() Defines the fill of left side of this border. If
| |
| getLeftStyle | back to summary |
|---|---|
| public final BorderStrokeStyle getLeftStyle() Defines the style of left side of this border. If
| |
| getRadii | back to summary |
|---|---|
| public final CornerRadii getRadii() Defines the radii for each corner of this
| |
| getRightStroke | back to summary |
|---|---|
| public final Paint getRightStroke() Defines the fill of right side of this border. If
| |
| getRightStyle | back to summary |
|---|---|
| public final BorderStrokeStyle getRightStyle() Defines the style of right side of this border. If
| |
| getTopStroke | back to summary |
|---|---|
| public final Paint getTopStroke() Defines the fill of top side of this border.
| |
| getTopStyle | back to summary |
|---|---|
| public final BorderStrokeStyle getTopStyle() Defines the style of top side of this border.
| |
| getWidths | back to summary |
|---|---|
| public final BorderWidths getWidths() Defines the thickness of each side of the
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| interpolate | back to summary |
|---|---|
| public BorderStroke interpolate(BorderStroke endValue, double t) Implements javafx. Doc from javafx. Returns an intermediate value between the value of this The returned value might not be a new instance; the implementation might also return one of the two existing instances if the intermediate value would be equal to one of the existing values. However, this is an optimization and applications should not assume any particular identity of the returned value.
| |
| isSame | back to summary |
|---|---|
| private boolean isSame(Paint topStroke, Paint rightStroke, Paint bottomStroke, Paint leftStroke, BorderStrokeStyle topStyle, BorderStrokeStyle rightStyle, BorderStrokeStyle bottomStyle, BorderStrokeStyle leftStyle, CornerRadii radii, BorderWidths widths, Insets insets) | |
| isStrokeUniform | back to summary |
|---|---|
| public final boolean isStrokeUniform() Checks if the stroke of this region is uniform. A uniform stroke has all its side strokes (top, bottom, left, right) of same color, width and style.
| |
| preComputeHash | back to summary |
|---|---|
| private int preComputeHash() | |