org.netbeans.modules.editor.lib/3 3.23.0 19

org.netbeans.editor
Interface GapStart


Deprecated. deprecated without replacement. Possibly use document's view as CharSequence by DocumentUtilities.getText(javax.swing.text.Document).

public interface GapStart

A given object can publish this interface if it allows an efficient access to its gap-based data storage and wants to give its clients a hint about how to access the data efficiently.

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
      ...
 


Method Summary
 int getGapStart()
          Deprecated. Get the begining of the gap in the object's gap-based data.
 

Method Detail

getGapStart

int getGapStart()
Deprecated. 
Get the begining of the gap in the object's gap-based data.

Returns:
>=0 and <= total size of the data of the object.

org.netbeans.modules.editor.lib/3 3.23.0 19

Built on May 22 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.