public class Pen
extends java.lang.Object
| 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()
Queries the
Pens color. |
float[] |
getDashArray()
Queries the
Pens dash array. |
float |
getDashPhase()
Queries the
Pens dash phase. |
int |
getEndCap()
Queries the
Pens end cap style. |
java.awt.Color |
getFillColor()
Queries the
Pens fill color. |
java.awt.Font |
getFont()
Queries the current font.
|
int |
getFontSize()
Queries the size (in points, rounded to int) of the current font.
|
int |
getLineJoin()
Queries the
Pens line join style. |
float |
getLineWidth()
Queries the
Pens line width |
float |
getMiterLimit()
Queries the
Pens miter limit style. |
java.awt.Stroke |
getStroke()
Gets the
Pens Stroke |
void |
setColor(java.awt.Color color)
Sets the
Pens color. |
void |
setDash(float[] dashArray)
Sets the
Pens dash array. |
void |
setDashPhase(float dashPhase)
Sets the
Pens dash phase. |
void |
setEndCap(int endCap)
Sets the
Pens end cap style. |
void |
setFillColor(java.awt.Color color)
Sets the
Pens fill color. |
void |
setFont(java.awt.Font f)
Changes the font to the given one.
|
void |
setFontSize(float size)
Changes the font size (in points).
|
void |
setFontSize(int size)
Changes the font size (in points).
|
void |
setFontStyle(int style)
Changes the font style.
|
void |
setLineJoin(int join)
Sets the
Pens line join style. |
void |
setLineWidth(float width)
Sets the
Pens line width. |
void |
setMiterLimit(float miterlimit)
Sets the
Pens miter limit. |
public static java.awt.Font DEFAULT_FONT
for more information, e.g. on font styles.public Pen()
BasicStrokepublic Pen(java.awt.Color color)
color and standard Stroke.BasicStrokepublic java.awt.Color getColor()
Pens color.public void setColor(java.awt.Color color)
Pens color.public void setFillColor(java.awt.Color color)
Pens fill color.public java.awt.Color getFillColor()
Pens fill color.public java.awt.Stroke getStroke()
Pens StrokeBasicStroke,
Strokepublic float getLineWidth()
Pens line widthpublic int getEndCap()
Pens end cap style.BasicStrokepublic int getLineJoin()
Pens line join style.BasicStrokepublic float getMiterLimit()
Pens miter limit style.BasicStrokepublic float[] getDashArray()
Pens dash array.BasicStrokepublic float getDashPhase()
Pens dash phase.BasicStrokepublic void setLineWidth(float width)
Pens line width.public void setEndCap(int endCap)
Pens end cap style.BasicStrokepublic void setLineJoin(int join)
Pens line join style.BasicStrokepublic void setMiterLimit(float miterlimit)
Pens miter limit.BasicStrokepublic void setDash(float[] dashArray)
Pens dash array.BasicStrokepublic void setDashPhase(float dashPhase)
Pens dash phase.BasicStrokepublic 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()