|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.newdawn.slick.util.FontUtils
public class FontUtils
Simple utility class to support justified text http://slick.javaunlimited.net/viewtopic.php?t=2640
Nested Class Summary | |
---|---|
class |
FontUtils.Alignment
Alignment indicators |
Constructor Summary | |
---|---|
FontUtils()
|
Method Summary | |
---|---|
static void |
drawCenter(Font font,
java.lang.String s,
int x,
int y,
int width)
Draw text center justified |
static void |
drawCenter(Font font,
java.lang.String s,
int x,
int y,
int width,
Color color)
Draw text center justified |
static void |
drawLeft(Font font,
java.lang.String s,
int x,
int y)
Draw text left justified |
static void |
drawRight(Font font,
java.lang.String s,
int x,
int y,
int width)
Draw text right justified |
static void |
drawRight(Font font,
java.lang.String s,
int x,
int y,
int width,
Color color)
Draw text right justified |
static int |
drawString(Font font,
java.lang.String s,
int alignment,
int x,
int y,
int width,
Color color)
Draw a string |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FontUtils()
Method Detail |
---|
public static void drawLeft(Font font, java.lang.String s, int x, int y)
font
- The font to draw withs
- The string to drawx
- The x location to draw aty
- The y location to draw atpublic static void drawCenter(Font font, java.lang.String s, int x, int y, int width)
font
- The font to draw withs
- The string to drawx
- The x location to draw aty
- The y location to draw atwidth
- The width to fill with the textpublic static void drawCenter(Font font, java.lang.String s, int x, int y, int width, Color color)
font
- The font to draw withs
- The string to drawx
- The x location to draw aty
- The y location to draw atwidth
- The width to fill with the textcolor
- The color to draw inpublic static void drawRight(Font font, java.lang.String s, int x, int y, int width)
font
- The font to draw withs
- The string to drawx
- The x location to draw aty
- The y location to draw atwidth
- The width to fill with the textpublic static void drawRight(Font font, java.lang.String s, int x, int y, int width, Color color)
font
- The font to draw withs
- The string to drawx
- The x location to draw aty
- The y location to draw atwidth
- The width to fill with the textcolor
- The color to draw inpublic static final int drawString(Font font, java.lang.String s, int alignment, int x, int y, int width, Color color)
font
- The font to draw withs
- The text to drawalignment
- The alignment to applyx
- The x location to draw aty
- The y location to draw atwidth
- The width to fill with the stringcolor
- The color to draw in
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |