public final class TextStyle extends Object
Output
object you draw the graph to. By default, the
font used across the whole graph is called "Default".
Axis
and the tooth itself can be adjusted by setting padding.
Modifier and Type | Field and Description |
---|---|
static float |
ROTATE_AUTO
A special value for
setRotate(double) that may be used with labels on PieGraphs -
causes the label to be rotated to match the angle of the slice. |
Constructor and Description |
---|
TextStyle(String fontname,
double size,
Paint textcolor)
Create a new TextStyle and set the font, size and color
|
TextStyle(String fontname,
double size,
Paint textcolor,
int align)
Create a new TextStyle and set the font, size and textcolor
|
TextStyle(TextStyle style)
Create a new TextStyle that is a clone of the specified style
|
Modifier and Type | Method and Description |
---|---|
void |
addBackupFont(String name)
Add a backup font to this style.
|
void |
setAlign(int align)
Set the alignment of the text
|
void |
setFont(String name,
double size)
Set the font
|
void |
setOverflow(boolean overflow)
Set whether this text can overflow the edge of the graph.
|
void |
setPaddingBottom(double padding)
Set the padding to the bottom of the text
|
void |
setPaddingLeft(double padding)
Set the padding to the left of the text
|
void |
setPaddingRight(double padding)
Set the padding to the right of the text
|
void |
setPaddingTop(double padding)
Set the padding to the top of the text
|
void |
setRotate(double val)
Set the rotation of the text
|
void |
setTextColor(Paint textcolor)
Set the color of the text
|
String |
toString() |
public static final float ROTATE_AUTO
setRotate(double)
that may be used with labels on PieGraphs -
causes the label to be rotated to match the angle of the slice. With other labels
this has no effect.public TextStyle(String fontname, double size, Paint textcolor)
fontname
- the name of the font to use.size
- The size of the text. Typically in points but may be in whatever units your Output uses.textcolor
- what color to make the textpublic TextStyle(String fontname, double size, Paint textcolor, int align)
fontname
- the name of the font to use.size
- The size of the text. Typically in points but may be in whatever units your Output uses.textcolor
- what color to make the textalign
- the alignment to use - a combination of one or more of the values from the Align
classpublic TextStyle(TextStyle style)
public void setOverflow(boolean overflow)
public void setTextColor(Paint textcolor)
textcolor
- the color to make the textpublic void setFont(String name, double size)
name
- the name of the font to usesize
- The size of the text. Typically in points but may be in whatever units your Output uses.public void addBackupFont(String name)
name
- the name of the font to usepublic void setRotate(double val)
val
- the angle to rotate the text, in degrees clockwise from 12 o'clockpublic void setAlign(int align)
align
- a combination of one or more of the values from the Align
classpublic void setPaddingRight(double padding)
padding
- the padding to use, in pixels or whatever units are use by your Output
classpublic void setPaddingTop(double padding)
padding
- the padding to use, in pixels or whatever units are use by your Output
classpublic void setPaddingBottom(double padding)
padding
- the padding to use, in pixels or whatever units are use by your Output
classpublic void setPaddingLeft(double padding)
padding
- the padding to use, in pixels or whatever units are use by your Output
classCopyright © 2001-2016 Big Faceless Organization