public class Pen
extends java.lang.Object
BasicStroke
Modifier and Type | Field and Description |
---|---|
static java.awt.Font |
DEFAULT_FONT
The default font that is used when drawing Text.
|
Constructor and Description |
---|
Pen()
Constructor with standard Color and standard Stroke.
|
Pen(java.awt.Color color)
Constructor with Color
color and standard Stroke. |
Modifier and Type | Method and Description |
---|---|
static java.lang.String[] |
getAvailableFontFamilies()
Provides information about the currently available font families (e.g.
|
java.awt.Color |
getColor()
Query the
Pen s color. |
float[] |
getDashArray()
Query the
Pen s dash array. |
float |
getDashPhase()
Query the
Pen s dash phase. |
int |
getEndCap()
Query the
Pen s end cap style. |
java.awt.Color |
getFillColor()
Query the
Pen s fill color. |
java.awt.Font |
getFont()
Query the current font.
|
int |
getFontSize()
Query the size (in points, rounded to int) of the current font.
|
int |
getLineJoin()
Query the
Pen s line join style. |
float |
getLineWidth()
Query the
Pen s line width |
float |
getMiterLimit()
Query the
Pen s miter limit style. |
java.awt.Stroke |
getStroke()
Get the
Pen s Stroke |
void |
setColor(java.awt.Color color)
Set the
Pen s color. |
void |
setDash(float[] dashArray)
Set the
Pen s dash array. |
void |
setDashPhase(float dashPhase)
Set the
Pen s dash phase. |
void |
setEndCap(int endCap)
Set the
Pen s end cap style. |
void |
setFillColor(java.awt.Color color)
Set the
Pen s fill color. |
void |
setFont(java.awt.Font f)
Change the font to the given one.
|
void |
setFontSize(float size)
Change the font size (in points).
|
void |
setFontSize(int size)
Change the font size (in points).
|
void |
setFontStyle(int style)
Change the font style.
|
void |
setLineJoin(int join)
Set the
Pen s line join style. |
void |
setLineWidth(float width)
Set the
Pen s line width. |
void |
setMiterLimit(float miterlimit)
Set the
Pen s miter limit. |
public static java.awt.Font DEFAULT_FONT
for more information, e.g. on font styles.
public Pen()
BasicStroke
public Pen(java.awt.Color color)
color
and standard Stroke.BasicStroke
public java.awt.Color getColor()
Pen
s color.public void setColor(java.awt.Color color)
Pen
s color.public void setFillColor(java.awt.Color color)
Pen
s fill color.public java.awt.Color getFillColor()
Pen
s fill color.public java.awt.Stroke getStroke()
Pen
s Stroke
BasicStroke
,
Stroke
public float getLineWidth()
Pen
s line widthpublic int getEndCap()
Pen
s end cap style.BasicStroke
public int getLineJoin()
Pen
s line join style.BasicStroke
public float getMiterLimit()
Pen
s miter limit style.BasicStroke
public float[] getDashArray()
Pen
s dash array.BasicStroke
public float getDashPhase()
Pen
s dash phase.BasicStroke
public void setLineWidth(float width)
Pen
s line width.public void setEndCap(int endCap)
Pen
s end cap style.BasicStroke
public void setLineJoin(int join)
Pen
s line join style.BasicStroke
public void setMiterLimit(float miterlimit)
Pen
s miter limit.BasicStroke
public void setDash(float[] dashArray)
Pen
s dash array.BasicStroke
public void setDashPhase(float dashPhase)
Pen
s dash phase.BasicStroke
public static java.lang.String[] getAvailableFontFamilies()
for more information about font attributes etc.
public void setFontStyle(int style)
for possible styles.
public void setFontSize(int size)
public void setFontSize(float size)
public int getFontSize()
public void setFont(java.awt.Font f)
public java.awt.Font getFont()