public class Stroke
extends java.lang.Object
Use the Shape.getStroke() property to access stroke properties of a shape. You do not create instances of the Stroke class directly.
Shape.getStroke()| Modifier and Type | Method and Description |
|---|---|
java.awt.Color |
getBackColor()
Gets the background color of the stroke.
|
java.awt.Color |
getColor()
Defines the color of a stroke.
|
java.awt.Color |
getColor2()
Defines a second color for a stroke.
|
int |
getDashStyle()
Specifies the dot and dash pattern for a stroke.
|
int |
getEndArrowLength()
Defines the arrowhead length for the end of a stroke.
|
int |
getEndArrowType()
Defines the arrowhead for the end of a stroke.
|
int |
getEndArrowWidth()
Defines the arrowhead width for the end of a stroke.
|
int |
getEndCap()
Defines the cap style for the end of a stroke.
|
java.awt.Color |
getForeColor()
Gets the foreground color of the stroke.
|
byte[] |
getImageBytes()
Defines the image for a stroke image or pattern fill.
|
int |
getJoinStyle()
Defines the join style of a polyline.
|
int |
getLineStyle()
Defines the line style of the stroke.
|
boolean |
getOn()
Defines whether the path will be stroked.
|
double |
getOpacity()
Defines the amount of transparency of a stroke.
|
int |
getStartArrowLength()
Defines the arrowhead length for the start of a stroke.
|
int |
getStartArrowType()
Defines the arrowhead for the start of a stroke.
|
int |
getStartArrowWidth()
Defines the arrowhead width for the start of a stroke.
|
double |
getTransparency()
Gets a value between 0.0 (opaque) and 1.0 (clear) representing the degree of transparency of the stroke.
|
boolean |
getVisible()
Gets a flag indicating whether the stroke is visible.
|
double |
getWeight()
Defines the brush thickness that strokes the path of a shape in points.
|
void |
setBackColor(java.awt.Color value)
Sets the background color of the stroke.
|
void |
setColor(java.awt.Color value)
Defines the color of a stroke.
|
void |
setColor2(java.awt.Color value)
Defines a second color for a stroke.
|
void |
setDashStyle(int value)
Specifies the dot and dash pattern for a stroke.
|
void |
setEndArrowLength(int value)
Defines the arrowhead length for the end of a stroke.
|
void |
setEndArrowType(int value)
Defines the arrowhead for the end of a stroke.
|
void |
setEndArrowWidth(int value)
Defines the arrowhead width for the end of a stroke.
|
void |
setEndCap(int value)
Defines the cap style for the end of a stroke.
|
void |
setForeColor(java.awt.Color value)
Sets the foreground color of the stroke.
|
void |
setJoinStyle(int value)
Defines the join style of a polyline.
|
void |
setLineStyle(int value)
Defines the line style of the stroke.
|
void |
setOn(boolean value)
Defines whether the path will be stroked.
|
void |
setOpacity(double value)
Defines the amount of transparency of a stroke.
|
void |
setStartArrowLength(int value)
Defines the arrowhead length for the start of a stroke.
|
void |
setStartArrowType(int value)
Defines the arrowhead for the start of a stroke.
|
void |
setStartArrowWidth(int value)
Defines the arrowhead width for the start of a stroke.
|
void |
setTransparency(double value)
Sets a value between 0.0 (opaque) and 1.0 (clear) representing the degree of transparency of the stroke.
|
void |
setVisible(boolean value)
Sets a flag indicating whether the stroke is visible.
|
void |
setWeight(double value)
Defines the brush thickness that strokes the path of a shape in points.
|
public boolean getOn()
The default value for a Shape is true.
boolean value.public void setOn(boolean value)
The default value for a Shape is true.
value - The corresponding boolean value.public java.awt.Color getColor()
The default value for a Shape is .
Color value.public void setColor(java.awt.Color value)
The default value for a Shape is .
value - The corresponding Color value.public java.awt.Color getColor2()
The default value for a Shape is .
Color value.public void setColor2(java.awt.Color value)
The default value for a Shape is .
value - The corresponding Color value.public java.awt.Color getForeColor()
Shape is .public void setForeColor(java.awt.Color value)
Shape is .value - The foreground color of the stroke.public java.awt.Color getBackColor()
Shape is .public void setBackColor(java.awt.Color value)
Shape is .value - The background color of the stroke.public boolean getVisible()
Shape is true.public void setVisible(boolean value)
Shape is true.value - A flag indicating whether the stroke is visible.public double getTransparency()
public void setTransparency(double value)
value - A value between 0.0 (opaque) and 1.0 (clear) representing the degree of transparency of the stroke.public double getWeight()
The default value for a Shape is 0.75.
double value.public void setWeight(double value)
The default value for a Shape is 0.75.
value - The corresponding double value.public int getDashStyle()
The default value is DashStyle.SOLID.
int value. The returned value is one of DashStyle constants.public void setDashStyle(int value)
The default value is DashStyle.SOLID.
value - The corresponding int value. The value must be one of DashStyle constants.public int getJoinStyle()
The default value is JoinStyle.ROUND.
int value. The returned value is one of JoinStyle constants.public void setJoinStyle(int value)
The default value is JoinStyle.ROUND.
value - The corresponding int value. The value must be one of JoinStyle constants.public int getEndCap()
The default value is EndCap.FLAT.
int value. The returned value is one of EndCap constants.public void setEndCap(int value)
The default value is EndCap.FLAT.
value - The corresponding int value. The value must be one of EndCap constants.public int getLineStyle()
The default value is ShapeLineStyle.SINGLE.
int value. The returned value is one of ShapeLineStyle constants.public void setLineStyle(int value)
The default value is ShapeLineStyle.SINGLE.
value - The corresponding int value. The value must be one of ShapeLineStyle constants.public int getStartArrowType()
The default value is ArrowType.NONE.
int value. The returned value is one of ArrowType constants.public void setStartArrowType(int value)
The default value is ArrowType.NONE.
value - The corresponding int value. The value must be one of ArrowType constants.public int getEndArrowType()
The default value is ArrowType.NONE.
int value. The returned value is one of ArrowType constants.public void setEndArrowType(int value)
The default value is ArrowType.NONE.
value - The corresponding int value. The value must be one of ArrowType constants.public int getStartArrowWidth()
The default value is ArrowWidth.MEDIUM.
int value. The returned value is one of ArrowWidth constants.public void setStartArrowWidth(int value)
The default value is ArrowWidth.MEDIUM.
value - The corresponding int value. The value must be one of ArrowWidth constants.public int getStartArrowLength()
The default value is ArrowLength.MEDIUM.
int value. The returned value is one of ArrowLength constants.public void setStartArrowLength(int value)
The default value is ArrowLength.MEDIUM.
value - The corresponding int value. The value must be one of ArrowLength constants.public int getEndArrowWidth()
The default value is ArrowWidth.MEDIUM.
int value. The returned value is one of ArrowWidth constants.public void setEndArrowWidth(int value)
The default value is ArrowWidth.MEDIUM.
value - The corresponding int value. The value must be one of ArrowWidth constants.public int getEndArrowLength()
The default value is ArrowLength.MEDIUM.
int value. The returned value is one of ArrowLength constants.public void setEndArrowLength(int value)
The default value is ArrowLength.MEDIUM.
value - The corresponding int value. The value must be one of ArrowLength constants.public double getOpacity()
The default value is 1.
double value.public void setOpacity(double value)
The default value is 1.
value - The corresponding double value.public byte[] getImageBytes()
throws java.lang.Exception
byte[] value.java.lang.Exception