Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gjt.sp.jedit.buffer
Class ContentManager

    java.lang.Object
      org.gjt.sp.jedit.buffer.ContentManager

    public class ContentManager

extends java.lang.Object

A class internal to jEdit's document model. You should not use it directly. To improve performance, none of the methods in this class check for out of bounds access, nor are they thread-safe. The `Buffer` class, through which these methods must be called through, implements such protection.

Since:
  jEdit 4.0pre1

Constructor Summary
`ContentManager()`

Method Summary
`void` | `_setContent(char[] text, int length)`
`int` | `getLength()`
`java.lang.CharSequence` | `getSegment(int start, int len)` Returns a read-only segment of the buffer.
`java.lang.String` | `getText(int start, int len)`
`void` | `getText(int start, int len, javax.swing.text.Segment seg)` Returns the specified text range in a `Segment`.
`void` | `insert(int start, java.lang.CharSequence str)` Inserts the given data into the buffer.
`void` | `insert(int start, javax.swing.text.Segment seg)`
`void` | `insert(int start, java.lang.String str)`
`void` | `remove(int start, int len)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ContentManager

    public ContentManager()

Method Detail

### getLength

    public final int getLength()

### getText

    public java.lang.String getText(int start,
                                    int len)

### getText

    public void getText(int start,
                        int len,
                        javax.swing.text.Segment seg)

  Returns the specified text range in a `Segment`.

  Using a Segment is generally more efficient than using a String because it results in less memory allocation and array copying.

  Parameters:
    `start` - The start offset
    `len` - The number of characters to get
    `seg` - The segment to copy the text to
  See Also:
    `JEditBuffer.getText(int, int, Segment)`

### getSegment

    public java.lang.CharSequence getSegment(int start,
                                             int len)

  Returns a read-only segment of the buffer.

  Since:
    jEdit 4.3pre15

### insert

    public void insert(int start,
                       java.lang.String str)

### insert

    public void insert(int start,
                       java.lang.CharSequence str)

  Inserts the given data into the buffer.

  Since:
    jEdit 4.3pre15

### insert

    public void insert(int start,
                       javax.swing.text.Segment seg)

### _setContent

    public void _setContent(char[] text,
                            int length)

### remove

    public void remove(int start,
                       int len)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD