java.lang.Object
org.gjt.sp.jedit.bufferset.BufferSet
An ordered list of buffers, normally attached to an EditPane
and viewed in a BufferSwitcher.
- Since:
- jEdit 4.3pre15
- Author:
- Matthieu Casanova
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static enum
Possible scopes for BufferSets. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addBufferAt
(Buffer buffer, int position) void
addBufferSetListener
(BufferSetListener listener) Add a BufferSetListener.Buffer[]
Returns an array of all buffers in this bufferSet.void
getAllBuffers
(BufferSetListener listener) getBuffer
(int index) Returns the Buffer at the given index.getNextBuffer
(int index) getPreviousBuffer
(int index) int
void
removeBufferSetListener
(BufferSetListener listener) Remove a BufferSetListener.int
size()
void
sort()
Sort the bufferSet (useful if a buffer has been renamed for exampletoString()
-
Constructor Details
-
BufferSet
-
-
Method Details
-
addBuffer
Internal use only, useBufferSetManager.addBuffer(org.gjt.sp.jedit.View, org.gjt.sp.jedit.Buffer)
orBufferSetManager.addBuffer(org.gjt.sp.jedit.EditPane, org.gjt.sp.jedit.Buffer)
- Parameters:
buffer
- the buffer to be added
-
addBufferAt
Internal use only, useBufferSetManager.addBuffer(org.gjt.sp.jedit.View, org.gjt.sp.jedit.Buffer)
orBufferSetManager.addBuffer(org.gjt.sp.jedit.EditPane, org.gjt.sp.jedit.Buffer)
- Parameters:
buffer
- the buffer to be addedposition
- the position where it must be added or -1 if we don't care
-
getBuffer
Returns the Buffer at the given index.- Parameters:
index
- the index. The index must exists- Returns:
- the buffer at the index.
-
getSorter
- Returns:
- the Comparator used for this bufferset can be null if there is no sorting
- Since:
- jEdit 5.2
-
getPreviousBuffer
-
getNextBuffer
-
indexOf
-
size
public int size() -
getAllBuffers
-
getAllBuffers
Returns an array of all buffers in this bufferSet.- Returns:
- an array of all Buffers
-
addBufferSetListener
Add a BufferSetListener.- Parameters:
listener
- the new BufferSetListener
-
removeBufferSetListener
Remove a BufferSetListener. If there are no listeners anymore, remove all buffers from the bufferSet.- Parameters:
listener
- the removed BufferSetListener
-
toString
-
sort
public void sort()Sort the bufferSet (useful if a buffer has been renamed for example- Since:
- jEdit 4.4pre1
-