|
Eclipse Draw2d 3.3 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.draw2d.text.FlowUtilities
Utility class for FlowFigures.
| Field Summary | |
static FlowUtilities |
INSTANCE
a singleton default instance |
| Constructor Summary | |
FlowUtilities()
|
|
| Method Summary | |
protected float |
getAverageCharWidth(TextFragmentBox fragment,
Font font)
Gets the average character width. |
protected Rectangle |
getTextLayoutBounds(String s,
Font f,
int start,
int end)
|
protected TextUtilities |
getTextUtilities()
Returns an instance of a TextUtililities class on which
text calculations can be performed. |
protected void |
setupFragment(TextFragmentBox frag,
Font f,
String s)
|
protected int |
wrapFragmentInContext(TextFragmentBox frag,
String string,
FlowContext context,
org.eclipse.draw2d.text.FlowUtilities.LookAhead lookahead,
Font font,
int wrapping)
Sets up a fragment and returns the number of characters consumed from the given String. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static FlowUtilities INSTANCE
| Constructor Detail |
public FlowUtilities()
| Method Detail |
protected float getAverageCharWidth(TextFragmentBox fragment,
Font font)
fragment - the supplied TextFragmentBox to use for calculation.
if the length is 0 or if the width is or below 0,
the average character width is taken from standard
font metrics.font - the font to use in case the TextFragmentBox conditions
above are true.
protected void setupFragment(TextFragmentBox frag,
Font f,
String s)
protected int wrapFragmentInContext(TextFragmentBox frag,
String string,
FlowContext context,
org.eclipse.draw2d.text.FlowUtilities.LookAhead lookahead,
Font font,
int wrapping)
frag - the TextFragmentBoxstring - the Stringfont - the Font used for measuringcontext - the flow contextwrapping - the word wrap style
protected Rectangle getTextLayoutBounds(String s,
Font f,
int start,
int end)
TextLayout#getBounds()protected TextUtilities getTextUtilities()
TextUtililities class on which
text calculations can be performed. Clients may override to customize.
TextUtililities instance
|
Eclipse Draw2d 3.3 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||