Lines Matching defs:text

43 import java.text.BreakIterator;
44 import java.text.CharacterIterator;
45 import java.text.AttributedCharacterIterator;
49 * The <code>LineBreakMeasurer</code> class allows styled text to be
52 * text that fits within a specific width, called the <b>wrapping
56 * styled text. The iterator's range should be a single paragraph in the
57 * text.
58 * <code>LineBreakMeasurer</code> maintains a position in the text for the
59 * start of the next text segment. Initially, this position is the
60 * start of text. Paragraphs are assigned an overall direction (either
65 * Segments of text are obtained by calling the method
67 * representing the text that fits within the wrapping width.
81 * in the text.
84 * at the limit provided (or before, if the text between the current
88 * Clients who are laying out tab-delimited text need a slightly
99 * In general, if the text used to construct the
103 * function properly, but it won't be aware of the text change.)
104 * Nevertheless, if the text change is the insertion or deletion of a
109 * Clients who modify text based on user typing should take advantage
143 * Rendering text with tabs. For simplicity, the overall text
166 * // the text. For convenience, the last entry is tabLocations
167 * // is the offset of the last character in the text.
258 * Constructs a <code>LineBreakMeasurer</code> for the specified text.
260 * @param text the text for which this <code>LineBreakMeasurer</code>
261 * produces <code>TextLayout</code> objects; the text must contain
262 * at least one character; if the text available through
268 * needed to measure the text correctly;
269 * text measurements can vary slightly depending on the
276 public LineBreakMeasurer(AttributedCharacterIterator text, FontRenderContext frc) {
277 this(text, BreakIterator.getLineInstance(), frc);
281 * Constructs a <code>LineBreakMeasurer</code> for the specified text.
283 * @param text the text for which this <code>LineBreakMeasurer</code>
284 * produces <code>TextLayout</code> objects; the text must contain
285 * at least one character; if the text available through
293 * needed to measure the text correctly;
294 * text measurements can vary slightly depending on the
298 * @throws IllegalArgumentException if the text has less than one character
302 public LineBreakMeasurer(AttributedCharacterIterator text,
305 if (text.getEndIndex() - text.getBeginIndex() < 1) {
310 this.measurer = new TextMeasurer(text, frc);
311 this.limit = text.getEndIndex();
312 this.pos = this.start = text.getBeginIndex();
323 * the text in the next layout
324 * @return an offset in the text representing the limit of the
336 * the text in the next layout
338 * in the next layout, even if the text after the limit would fit
345 * @return an offset in the text representing the limit of the
407 * the text in the next layout
420 * for the text in the next layout
422 * included in the next layout, even if the text after the limit
433 * of the text used by this <code>LineBreakMeasurer</code>,
469 * text used to construct this <code>LineBreakMeasurer</code> (or in
470 * the text most recently passed to <code>insertChar</code>
483 * character is inserted into the text, and sets the current
486 * @param newParagraph the text after the insertion
487 * @param insertPos the position in the text at which the character
510 * character is deleted from the text, and sets the current
512 * @param newParagraph the text after the deletion
513 * @param deletePos the position in the text at which the character