Package org.gjt.sp.jedit.bufferset
Class BufferSetManager
- java.lang.Object
-
- org.gjt.sp.jedit.bufferset.BufferSetManager
-
public class BufferSetManager extends java.lang.Object
The buffersets manager. A singleton instance of this can be obtained from jEdit.getBufferSetManager()- Since:
- jEdit 4.3pre15
-
-
Constructor Summary
Constructors Constructor Description BufferSetManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBuffer(EditPane editPane, Buffer buffer)
Add a buffer into the given editPane.void
addBuffer(View view, Buffer buffer)
Add a buffer into the current editPane of the given view.int
countBufferSets(Buffer buffer)
Count the bufferSets in which the buffer is.static Buffer
createUntitledBuffer()
Create an untitled bufferjava.util.Set<BufferSet>
getOwners(Buffer buffer)
BufferSet.Scope
getScope()
void
handleEditPaneUpdate(EditPaneUpdate message)
void
handlePropertiesChanged(PropertiesChanged msg)
void
moveBuffer(EditPane editPane, int oldPosition, int newPosition)
Moves a buffer from a old position to a new position in the BufferSet used in an EditPane.void
removeBuffer(Buffer buffer)
remove a buffer from all bufferSets.void
removeBuffer(EditPane editPane, Buffer buffer)
Remove a buffer from the EditPane's bufferSet.void
setScope(BufferSet.Scope scope)
-
-
-
Method Detail
-
handleEditPaneUpdate
public void handleEditPaneUpdate(EditPaneUpdate message)
-
handlePropertiesChanged
public void handlePropertiesChanged(PropertiesChanged msg)
-
countBufferSets
public int countBufferSets(Buffer buffer)
Count the bufferSets in which the buffer is.- Parameters:
buffer
- the buffer- Returns:
- the number of buffersets in which buffer is
- See Also:
jEdit.closeBuffer(org.gjt.sp.jedit.EditPane, org.gjt.sp.jedit.Buffer)
-
setScope
public void setScope(BufferSet.Scope scope)
-
getScope
public BufferSet.Scope getScope()
-
addBuffer
public void addBuffer(View view, Buffer buffer)
Add a buffer into the current editPane of the given view. If the view is null, it will be added to the current editPane of the active view.- Parameters:
view
- a view (or null)buffer
- the buffer to add
-
addBuffer
public void addBuffer(EditPane editPane, Buffer buffer)
Add a buffer into the given editPane. If the editPane is null, it will be added to the current editPane of the active view.- Parameters:
editPane
- an EditPane (or null)buffer
- the buffer to add
-
moveBuffer
public void moveBuffer(EditPane editPane, int oldPosition, int newPosition)
Moves a buffer from a old position to a new position in the BufferSet used in an EditPane.
-
removeBuffer
public void removeBuffer(EditPane editPane, Buffer buffer)
Remove a buffer from the EditPane's bufferSet.- Parameters:
editPane
- the editPane It cannot be nullbuffer
- the buffer
-
removeBuffer
public void removeBuffer(Buffer buffer)
remove a buffer from all bufferSets.- Parameters:
buffer
- the buffer that must be removed
-
createUntitledBuffer
public static Buffer createUntitledBuffer()
Create an untitled buffer- Returns:
- the new untitled buffer
-
-