Package gnu.kawa.swingviews
Class SwingContent
java.lang.Object
gnu.kawa.swingviews.SwingContent
- All Implemented Interfaces:
AbstractDocument.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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreatePosition(int offset) voidgetString(int where, int len) insertString(int where, String str) insertString(int where, String str, boolean beforeMarkers) intlength()remove(int where, int nitems)
-
Field Details
-
buffer
-
-
Constructor Details
-
SwingContent
-
SwingContent
public SwingContent(int initialSize) -
SwingContent
public SwingContent()
-
-
Method Details
-
length
public int length()- Specified by:
lengthin interfaceAbstractDocument.Content
-
getChars
- Specified by:
getCharsin interfaceAbstractDocument.Content- Throws:
BadLocationException
-
getString
- Specified by:
getStringin interfaceAbstractDocument.Content- Throws:
BadLocationException
-
remove
- Specified by:
removein interfaceAbstractDocument.Content- Throws:
BadLocationException
-
insertString
public UndoableEdit insertString(int where, String str, boolean beforeMarkers) throws BadLocationException - Throws:
BadLocationException
-
insertString
- Specified by:
insertStringin interfaceAbstractDocument.Content- Throws:
BadLocationException
-
createPosition
- Specified by:
createPositionin interfaceAbstractDocument.Content- Throws:
BadLocationException
-