Oracle JEWT API Reference
Release 4.2.24.0.0
B12199-01

oracle.bali.ewt.text
Interface WrapInfo

All Known Implementing Classes:
WrappedText

public interface WrapInfo

The WrapInfo Interface declares the methods used by TextWrapper's when wrapping text.

Clients should ignore this interface.

See Also:
TextWrapper

Method Summary
 boolean addLine(java.lang.String text, int startOfLine, int endOfLine)
          The textWrapper calls this method to add a line of wrappedText to the WrapInfo.
 java.awt.FontMetrics getFontMetrics()
          Returns the FontMetrics the TextWrapper should use when measuring text.
 java.util.Locale getLocale()
          Returns the locale to use when wrapping text.
 int getWrapWidth()
          Returns the wrapping point at which the TextWrapper should wrap the text.
 boolean isCalculatingPreferred()
          Returns true if the TextWrapper should wrap optimally, false if it should try to force the words to fit in the wrap width.
 

Method Detail

getWrapWidth

public int getWrapWidth()
Returns the wrapping point at which the TextWrapper should wrap the text.

getFontMetrics

public java.awt.FontMetrics getFontMetrics()
Returns the FontMetrics the TextWrapper should use when measuring text.

getLocale

public java.util.Locale getLocale()
Returns the locale to use when wrapping text.

addLine

public boolean addLine(java.lang.String text,
                       int startOfLine,
                       int endOfLine)
The textWrapper calls this method to add a line of wrappedText to the WrapInfo.

Parameters:
text - the text being wrapped
startOfLine - the index of the start of the next line
endOfLine - the index of the end of the next line
Returns:
true to continue wrapping, false to abort

isCalculatingPreferred

public boolean isCalculatingPreferred()
Returns true if the TextWrapper should wrap optimally, false if it should try to force the words to fit in the wrap width.

Oracle JEWT 4.2.24

Copyright © [xxxx],2003, Oracle. All Rights Reserved.