public class TextFormat
Provides different ways for text to be formatted.
Fields
Name | Description |
---|---|
ALL | All viable flags in the bit mask. |
BOTTOM | Formats the text along the bottom of the rectangle. |
EDITCONTROL | Draws the text in the same manner as a Windows Edit control does. |
ENDELLIPSIS | Puts an ellipsis at the end of the text if it is too long to fit into the rectangle. |
EXPANDTABS | Expands tabs in the text. |
HORIZONTALCENTER | Centers the text horizontally. |
LEFT | Aligns the text to the left. |
NOPREFIX | Automatically breaks words at the end of the line. |
PATHELLIPSIS | Puts an ellipsis in the middle of the text, properly breaking the text with appropriate backslashes. |
RIGHT | Aligns the text to the right. |
RIGHTTOLEFT | The text is laid from right to left, as when using Hebrew or Arabic fonts. |
SINGLELINE | Automatically breaks words at the end of the line. |
TOP | Aligns text to the top of the rectangle. |
VERTICALCENTER | Vertically aligns text. |
WORDBREAK | Automatically breaks words at the end of the line. |
WORDELLIPSIS | Puts an ellipsis at the end of the text at a word break if the text is too long to fit in the rectangle. |
Methods
Name | Description |
---|---|
ensureValid(int format) | Throws an exception if the given value is not possible for this class. |
valid(int format) | Determines whether the specified format is valid for this class. |
Throws an exception if the given value is not possible for this class.
Returns true if the given value is a valid format; otherwise, returns false.
Determines whether the specified format is valid for this class.