public class TextSize extends Object
| Constructor and Description |
|---|
TextSize()
|
| Modifier and Type | Method and Description |
|---|---|
static Dimension |
getPreferredSize(JTextArea
|
static float |
getWidth(String
|
static String |
truncate(String
Truncate a String to fit within the number of pixels provided.
|
public static Stringtruncate(String text, Font font, FontRenderContext frc, int width)
text - the text to consider truncating
font - the font used to render the string
frc - the FontRenderContext in use
width - the width (in pixels) the String should fit within.
public static float getWidth(Stringtext, Font font, FontRenderContext frc)