Oracle JEWT 4.2.10

oracle.bali.ewt.text
Class CharacterWrapper

java.lang.Object
  |
  +--oracle.bali.ewt.text.CharacterWrapper
All Implemented Interfaces:
TextWrapper

public final class CharacterWrapper
extends java.lang.Object
implements TextWrapper

The CharacterWrapper class implements the TextWrapper interface to wrap a paragraph of text at the last full character that can fit on each line.

See Also:
TextWrapper

Constructor Summary
CharacterWrapper()
           
 
Method Summary
static TextWrapper getTextWrapper()
          Returns the TextWrapper which wraps the MultiLineLabel's text to the nearest character that fits within the wrapping point.
 void wrapParagraph(WrapInfo geometry, java.lang.String text)
          Wrap a paragraph of text into one or more lines of text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharacterWrapper

public CharacterWrapper()
Method Detail

getTextWrapper

public static TextWrapper getTextWrapper()
Returns the TextWrapper which wraps the MultiLineLabel's text to the nearest character that fits within the wrapping point.

See Also:
NoWrapper.getTextWrapper(), WordWrapper.getTextWrapper()

wrapParagraph

public void wrapParagraph(WrapInfo geometry,
                          java.lang.String text)
Wrap a paragraph of text into one or more lines of text. CharacterWrapper breaks each line after the last full character what will fit within the wrapping width

Specified by:
wrapParagraph in interface TextWrapper
Parameters:
geometry - A geometry object containing the FontMetrics and wrapping width to use when wrapping the text. The TextWrapper calls geometry.addLine() for each wrapped line that it finishes
text - The text that the TextWrapper is to wrap. It is guaranteed that this text will not contain any carriage returns

See Also:
TextWrapper, WrapInfo

Oracle JEWT 4.2.10