|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.faceless.graph2.TextStyle
public final class TextStyle
The TextStyle class sets the font, color and so on for any text displayed on the Graph. Each item of text has several attributes:
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.
Field Summary | |
---|---|
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 Summary | |
---|---|
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 |
Method Summary | |
---|---|
void |
setAlign(int align)
Set the alignment of the text |
void |
setFont(String name,
double size)
Set the font |
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()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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.
Constructor Detail |
---|
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)
Method Detail |
---|
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 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
classpublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |