Package org.qdl_lang.workspace
Class BufferManager
- java.lang.Object
-
- org.qdl_lang.workspace.BufferManager
-
- All Implemented Interfaces:
Serializable
public class BufferManager extends Object implements Serializable
This manages buffers, i.e., things that may be edited and run.Created by Jeff Gaynor
on 4/27/20 at 6:47 AM- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BufferManager.BufferRecord
-
Constructor Summary
Constructors Constructor Description BufferManager()
-
Method Summary
-
-
-
Method Detail
-
getBufferRecords
public ArrayList<BufferManager.BufferRecord> getBufferRecords()
-
getState
public State getState()
-
getBufferRecord
public BufferManager.BufferRecord getBufferRecord(int index)
Get the record by index- Parameters:
index
-- Returns:
-
anyEdited
public boolean anyEdited()
-
getBufferRecord
public BufferManager.BufferRecord getBufferRecord(String name)
-
hasBR
public boolean hasBR(int index)
-
hasBR
public boolean hasBR(String name)
-
create
public int create(String alias)
-
getIndex
protected int getIndex(BufferManager.BufferRecord br)
-
remove
public boolean remove(String name)
-
figureOutSavePath
protected String figureOutSavePath(String parent, String name)
- Parameters:
parent
-name
-- Returns:
-
write
public boolean write(BufferManager.BufferRecord currentBR) throws Throwable
- Throws:
Throwable
-
defaultBR
public BufferManager.BufferRecord defaultBR()
-
defaultBR
public BufferManager.BufferRecord defaultBR(BufferManager.BufferRecord br)
-
toXML
public void toXML(XMLStreamWriter xsw) throws XMLStreamException
- Throws:
XMLStreamException
-
toJSON
public net.sf.json.JSONObject toJSON()
-
fromJSON
public void fromJSON(net.sf.json.JSONObject json)
-
fromXML
public void fromXML(XMLEventReader xer) throws XMLStreamException
- Throws:
XMLStreamException
-
doBRecs
protected void doBRecs(XMLEventReader xer) throws XMLStreamException
- Throws:
XMLStreamException
-
isEmpty
public boolean isEmpty()
-
-