DocumentUtilities.getText(javax.swing.text.Document)
.public interface GapStart
For example Document
instance
having gap-based document content can allow to get an instance
of GapStart as a property:
GapStart gs = (GapStart)doc.getProperty(GapStart.class); int gapStart = gs.getGapStart();Once the start of the gap is known the client can optimize access to the document's data. For example if the client does not care about the chunks in which it gets the document's data it can access the characters so that no character copying is done:Segment text = new Segment(); doc.getText(0, gapStart, text); // document's data below gap ... doc.getText(gapStart, doc.getLength(), text); // document's data over gap ...
Modifier and Type | Method and Description |
---|---|
int |
getGapStart()
Deprecated.
Get the begining of the gap in the object's gap-based data.
|