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) void
getString
(int where, int len) insertString
(int where, String str) insertString
(int where, String str, boolean beforeMarkers) int
length()
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:
length
in interfaceAbstractDocument.Content
-
getChars
- Specified by:
getChars
in interfaceAbstractDocument.Content
- Throws:
BadLocationException
-
getString
- Specified by:
getString
in interfaceAbstractDocument.Content
- Throws:
BadLocationException
-
remove
- Specified by:
remove
in interfaceAbstractDocument.Content
- Throws:
BadLocationException
-
insertString
public UndoableEdit insertString(int where, String str, boolean beforeMarkers) throws BadLocationException - Throws:
BadLocationException
-
insertString
- Specified by:
insertString
in interfaceAbstractDocument.Content
- Throws:
BadLocationException
-
createPosition
- Specified by:
createPosition
in interfaceAbstractDocument.Content
- Throws:
BadLocationException
-