Uses of Class javax.swing.text.Segment

Uses in package javax.swing.text

Methods with parameter type javax.swing.text.Segment

int
Utilities.drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset)
Draws the given text segment.
int
Utilities.getBreakLocation(Segment s, FontMetrics metrics, int x0, int x, TabExpander e, int startOffset)
Determine where to break the text in the given Segment, attempting to find a word boundary.
void
AbstractDocument.Content.getChars(int where, int len, Segment txt)
Fetches a piece of content and stores it in txt.
void
GapContent.getChars(int where, int len, Segment txt)
Fetches a piece of content and stores it in a Segment object.
void
StringContent.getChars(int where, int len, Segment txt)
Updates txt to contain a direct reference to the underlying character array.
int
Utilities.getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0)
Provides a facility to map screen coordinates into a model location.
int
Utilities.getTabbedTextOffset(Segment s, FontMetrics fm, int x0, int x, TabExpander te, int p0, boolean round)
Provides a facility to map screen coordinates into a model location.
int
Utilities.getTabbedTextWidth(Segment s, FontMetrics metrics, int x, TabExpander e, int startOffset)
Determines the width, that the given text s would take if it was printed with the given FontMetrics on the specified screen position.
void
AbstractDocument.getText(int offset, int length, Segment segment)
Fetches a piece of this Document's content and stores it in the given Segment.
void
Document.getText(int offset, int length, Segment txt)
Fetch the textual content starting at offset with a length of length and store it in txt.

Methods with return type javax.swing.text.Segment

Segment
Provides a Segment object, that can be used to fetch text from the document.
Segment
Provides access to the Segment used for retrievals from the Document.
Segment
GlyphView.getText(int p0, int p1)
Returns the text segment that this view is responsible for.