|
java-gnome version 4.0.19 | ||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectorg.freedesktop.bindings.Pointer
org.freedesktop.bindings.Proxy
org.gnome.glib.Object
org.gnome.gtk.TextBuffer
org.gnome.sourceview.SourceBuffer
public class SourceBuffer
SourceBuffer is the model used in a SourceView
. It extends GTK's
TextBuffer
and adds features typical for text editors. SourceBuffer
contains the actual text that is displayed in the view and allows its
manipulation.
TextTagTable table; SourceBuffer buffer; ... table = new TextTagTable(); buffer = new SourceBuffer(); buffer.setText("Insert text here...");The language used for syntax highlighting has to be obtained from the LanguageManager:
manager = LanguageManager.getDefault(); language = manager.getLanguage("java"); buffer.setLanguage(language);
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.gnome.gtk.TextBuffer |
---|
TextBuffer.ApplyTag, TextBuffer.BeginUserAction, TextBuffer.Changed, TextBuffer.DeleteRange, TextBuffer.EndUserAction, TextBuffer.InsertText, TextBuffer.MarkSet, TextBuffer.NotifyCursorPosition, TextBuffer.RemoveTag |
Field Summary |
---|
Fields inherited from class org.gnome.gtk.TextBuffer |
---|
OBJECT_REPLACEMENT_CHARACTER |
Constructor Summary | |
---|---|
SourceBuffer()
Create a new SourceBuffer. |
|
SourceBuffer(TextTagTable tags)
Create a new SourceBuffer using the given TextTagTable. |
Method Summary | |
---|---|
void |
beginNotUndoableAction()
Indicate the beginning of an action that cannot be undone. |
boolean |
canRedo()
Return true if an operation can be redone. |
boolean |
canUndo()
Return true if an operation can be undone. |
void |
endNotUndoableAction()
Indicate the end of an action that cannot be undone. |
boolean |
getHighlightMatchingBrackets()
Return whether matching brackets are highlighted. |
boolean |
getHighlightSyntax()
Return whether syntax highlighting is enabled or not. |
Language |
getLanguage()
Get the Language that is used for syntax highlighting. |
void |
redo()
Redo the last undone operation. |
void |
setHighlightMatchingBrackets(boolean highlight)
Enable or disable highlighting of matching brackets. |
void |
setHighlightSyntax(boolean highlight)
Enable/disable syntax higlighting. |
void |
setLanguage(Language language)
Set the Language that is used for syntax highlighting. |
void |
undo()
Undo the last operation. |
Methods inherited from class org.gnome.gtk.TextBuffer |
---|
applyTag, applyTag, beginUserAction, connect, connect, connect, connect, connect, connect, connect, connect, connect, connectAfter, createMark, delete, deleteInteractive, endUserAction, getCharCount, getCursorPosition, getHasSelection, getInsert, getIter, getIter, getIterEnd, getIterStart, getLineCount, getModified, getSelectionBound, getSlice, getText, getText, insert, insert, insert, insert, insert, insert, insertAtCursor, insertInteractive, moveMark, placeCursor, removeAllTags, removeTag, selectRange, setModified, setText, stopDeleteRange, stopInsertText |
Methods inherited from class org.freedesktop.bindings.Pointer |
---|
toString |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SourceBuffer()
<init>()
for
details.
public SourceBuffer(TextTagTable tags)
Method Detail |
---|
public void beginNotUndoableAction()
public boolean canRedo()
true
if an operation can be redone.
public boolean canUndo()
true
if an operation can be undone.
public void endNotUndoableAction()
public boolean getHighlightMatchingBrackets()
public boolean getHighlightSyntax()
public Language getLanguage()
public void redo()
canRedo()
.
public void setHighlightMatchingBrackets(boolean highlight)
public void setHighlightSyntax(boolean highlight)
setLanguage
. Highlighting is enabled by default.
public void setLanguage(Language language)
public void undo()
canUndo()
.
|
![]() java-gnome |
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |