
Hierar chy: Object→ GraphicAttribute→ ImageGraphicAttribute
Passed To: ImageGraphicAttribute.equals()
LineBreakMeasurer Ja va 1.2
java.awt.font
This class breaks a paragraph of text into individual lines of a specified width, where
each line is repr esented by a TextLayout object. When you create a LineBreakMeasurer, you
must specify the paragraph to be broken with a java.text.AttributedCharacterIterator, which is
usually is obtained from a java.text.AttributedString.You may optionally specify a
java.text.BreakIterator to indicate where line breaks are allowed. The default is to use the
line breaking rules of the current locale. You must also pass a FontRenderContext to the
LineBreakMeasurer() constructor. The FontRenderContext is usually obtained with the get-
FontRenderContext() method of Graphics2D.
Once you have created a LineBreakMeasurer for your paragraph, you use it by repeatedly
calling nextLayout() to create TextLayout objects that repr esent lines. nextLayout() retur ns null
when it reaches the end of the paragraph. The desired width of each line is passed as
an argument to nextLayout(). This allows the first line of a paragraph to be made shorter
than the following lines, for example.
public final class LineBreakMeasurer {
// Public Constructors
public LineBreakMeasurer(java.text.AttributedCharacterIterator text, FontRenderContext frc);
public LineBreakMeasurer(java.text.AttributedCharacterIterator ...