|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ijchart.xychart.util.TextUtil
public abstract class TextUtil
Title: IJChart
Description: a chart library for the Java(tm) platform.
Nice static helpers for working with StringsCopyright: Copyright (c) 2013
Company:
Constructor Summary | |
---|---|
TextUtil()
|
Method Summary | |
---|---|
static java.awt.geom.Rectangle2D |
getStringBound(java.awt.Font font,
java.lang.String str)
Returns the bounds of the specified array of characters in the specified font. |
static java.awt.geom.Rectangle2D |
getStringBound(java.awt.Graphics g2,
java.lang.String str)
Returns the bounds of the specified array of characters in the specified Graphics context.If the string contains '\n' will be wrapped. |
static java.awt.geom.Rectangle2D |
getStringBound(java.awt.Graphics g2,
java.lang.String str,
int beginIndex,
int endIndex)
Returns the bounds of the specified array of characters in the specified Graphics context.If the string contains '\n' will be wrapped. |
static java.awt.geom.Rectangle2D |
getStringBoundWithFm(java.awt.Graphics g2,
java.lang.String str)
Returns the bounds of the specified array of characters in the specified Graphics context. |
static double |
getStringHeight(java.awt.Graphics g2,
java.lang.String str)
Returns the height of the specified array of characters in the specified Graphics context. |
static java.awt.geom.Rectangle2D |
getStringNoWrapBounds(java.lang.String text,
java.awt.Font font)
Returns the bounds of the specified array of characters in the specified Graphics context.If the string contains '\n' will be not wrapped. |
static double |
getStringWidth(java.awt.Graphics g2,
java.lang.String str)
Returns the width of the specified array of characters in the specified Graphics context. |
static java.awt.geom.Rectangle2D |
getStringWrapBounds(java.lang.String text,
java.awt.Font font)
Returns the bounds of the specified array of characters in the specified Graphics context.If the string contains '\n' will be wrapped. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextUtil()
Method Detail |
---|
public static java.awt.geom.Rectangle2D getStringBound(java.awt.Graphics g2, java.lang.String str)
g2
- Graphics
The specified Graphics context (null not permitted).str
- String
The specified String (null permitted).
public static java.awt.geom.Rectangle2D getStringBound(java.awt.Graphics g2, java.lang.String str, int beginIndex, int endIndex)
g2
- Graphics
The specified Graphics context (null not permitted).str
- String
The specified String (null permitted).beginIndex
- int
The offset of the beginning of strendIndex
- int
The offset of the ending of str
public static java.awt.geom.Rectangle2D getStringBound(java.awt.Font font, java.lang.String str)
font
- Font
The font.str
- String
The specified String.
public static java.awt.geom.Rectangle2D getStringBoundWithFm(java.awt.Graphics g2, java.lang.String str)
g2
- Graphics2D
The specified Graphics context.str
- String
The specified String.
public static double getStringWidth(java.awt.Graphics g2, java.lang.String str)
g2
- Graphics
The specified Graphics context (null not permitted).str
- String
The specified String (null permitted).
public static double getStringHeight(java.awt.Graphics g2, java.lang.String str)
g2
- Graphics
The specified Graphics context (null not permitted).str
- String
The specified String (null permitted).
public static java.awt.geom.Rectangle2D getStringWrapBounds(java.lang.String text, java.awt.Font font)
text
- String
The specified String (null not permitted).font
- Font
The font (null not permitted).
public static java.awt.geom.Rectangle2D getStringNoWrapBounds(java.lang.String text, java.awt.Font font)
text
- String
The specified String (null not permitted).font
- Font
The font (null not permitted).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |