public class EditorState
extends chargerlib.undo.UndoableState
Modifier and Type | Field and Description |
---|---|
(package private) String |
graph
A CGX string that is parseable to form the current graph
|
(package private) KnowledgeBase |
kb
A copy of the ENTIRE knowledge base.
|
(package private) boolean |
somethingHasChanged
Remembers whether this state represents a change from the last save, backup, etc.
|
Constructor and Description |
---|
EditorState(String holdgraph)
Create a new editor state, converting the graph from a CGXML string
|
Modifier and Type | Method and Description |
---|---|
String |
getGraph()
Gets the graph stored in this state
|
KnowledgeBase |
getKB() |
boolean |
isSomethingHasChanged()
Returns whether this state represents a change from the last save, backup, etc.
|
void |
setGraph(String graph)
Sets the stored graph as a new CGXML string
|
void |
setKB(KnowledgeBase kb) |
void |
setSomethingHasChanged(boolean somethingHasChanged)
Remember for the editor state that when this state is active, the graph
is considered changed from its last save, etc.
|
String graph
boolean somethingHasChanged
KnowledgeBase kb
public EditorState(String holdgraph)
public String getGraph()
public void setGraph(String graph)
public KnowledgeBase getKB()
public void setKB(KnowledgeBase kb)
public boolean isSomethingHasChanged()
public void setSomethingHasChanged(boolean somethingHasChanged)
EditFrame.somethingHasChanged