gnu.kawa.swingviews

Class SwingContent

public class SwingContent extends Object implements Content

A wrapper around a CharBuffer that implements Swing's Content. This allows us to use a CharBuffer for a Document's Content.
Field Summary
CharBufferbuffer
Constructor Summary
SwingContent(CharBuffer buffer)
SwingContent(int initialSize)
SwingContent()
Method Summary
PositioncreatePosition(int offset)
voidgetChars(int where, int len, Segment txt)
StringgetString(int where, int len)
UndoableEditinsertString(int where, String str, boolean beforeMarkers)
UndoableEditinsertString(int where, String str)
intlength()
UndoableEditremove(int where, int nitems)

Field Detail

buffer

public final CharBuffer buffer

Constructor Detail

SwingContent

public SwingContent(CharBuffer buffer)

SwingContent

public SwingContent(int initialSize)

SwingContent

public SwingContent()

Method Detail

createPosition

public Position createPosition(int offset)

getChars

public void getChars(int where, int len, Segment txt)

getString

public String getString(int where, int len)

insertString

public UndoableEdit insertString(int where, String str, boolean beforeMarkers)

insertString

public UndoableEdit insertString(int where, String str)

length

public int length()

remove

public UndoableEdit remove(int where, int nitems)