| java.lang.Object it.stefanochizzolini.clown.documents.contents.composition.TextFitter
TextFitter | final class TextFitter (Code) | | Text fitter.
author: Stefano Chizzolini version: 0.0.4 since: 0.0.3 |
Constructor Summary | |
| TextFitter(String text, double width, Font font, double fontSize, boolean hyphenation) |
Method Summary | |
public boolean | fit() Fits the text inside the specified width. | public boolean | fit(int index, double width) Fits the text inside the specified width.
Parameters: index - Beginning index, inclusive. Parameters: width - Available width. | public int | getBeginIndex() Gets the begin index of the fitted text inside the available text. | public int | getEndIndex() Gets the end index of the fitted text inside the available text. | public String | getFittedText() Gets the fitted text. | public double | getFittedWidth() Gets the fitted text's width. | public Font | getFont() Gets the font used to fit the text. | public double | getFontSize() Gets the size of the font used to fit the text. | public boolean | getHyphenation() Gets whether the hyphenation algorithm has to be applied. | public String | getText() Gets the available text. | public double | getWidth() Gets the available width. |
TextFitter | TextFitter(String text, double width, Font font, double fontSize, boolean hyphenation)(Code) | | |
fit | public boolean fit()(Code) | | Fits the text inside the specified width.
Whether the operation was successful. |
fit | public boolean fit(int index, double width)(Code) | | Fits the text inside the specified width.
Parameters: index - Beginning index, inclusive. Parameters: width - Available width. Whether the operation was successful. version: 0.0.4 |
getBeginIndex | public int getBeginIndex()(Code) | | Gets the begin index of the fitted text inside the available text.
|
getEndIndex | public int getEndIndex()(Code) | | Gets the end index of the fitted text inside the available text.
|
getFittedText | public String getFittedText()(Code) | | Gets the fitted text.
|
getFittedWidth | public double getFittedWidth()(Code) | | Gets the fitted text's width.
|
getFont | public Font getFont()(Code) | | Gets the font used to fit the text.
|
getFontSize | public double getFontSize()(Code) | | Gets the size of the font used to fit the text.
|
getHyphenation | public boolean getHyphenation()(Code) | | Gets whether the hyphenation algorithm has to be applied.
|
getText | public String getText()(Code) | | Gets the available text.
|
getWidth | public double getWidth()(Code) | | Gets the available width.
|
|
|