public class LoadController
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LoadController.Mode
enum Mode.
|
| Constructor and Description |
|---|
LoadController(Model model,
CategoryController cg,
CanvasController cvs,
ObjectController obj,
MultiPurposeController mp)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
convert(int x)
converting saved Integers into Booleans.
|
void |
dispatch(java.util.ArrayList<java.lang.String> input,
org.json.simple.JSONObject json)
dispatch the Keys into the right processing.
|
java.lang.String |
next(java.util.Iterator<java.lang.Object> i)
Get the Next Element from an Iterator.
|
void |
readCanvasObject(org.json.simple.JSONArray arr)
Read all Objects in Canvas from JSON File.
|
void |
readCategory(org.json.simple.JSONArray arr)
Read all Categories from the JSON file.
|
void |
readCategoryObject(org.json.simple.JSONArray arr)
Read all Objects in Category from the JSON File.
|
void |
readEdge(org.json.simple.JSONArray arr)
Read.
|
void |
readElement(org.json.simple.JSONArray arr)
Read all Elements in Category and Canvas from JSON File.
|
void |
readElementGraph(org.json.simple.JSONArray arr)
Read the Element Graph.
|
void |
readJson(java.lang.String path)
Reads the the JSON File and load the state into the Model.
|
public LoadController(Model model, CategoryController cg, CanvasController cvs, ObjectController obj, MultiPurposeController mp)
model - Modelcg - CategoryControllercvs - CanvasControllerobj - ObjectControllermp - MultiPurposeControllerpublic void readJson(java.lang.String path)
throws java.io.IOException
path - the Pathjava.io.IOException - exceptionpublic void dispatch(java.util.ArrayList<java.lang.String> input,
org.json.simple.JSONObject json)
input - inputjson - Jsonpublic void readCategory(org.json.simple.JSONArray arr)
arr - JSONArraypublic void readCategoryObject(org.json.simple.JSONArray arr)
arr - JSON Arraypublic void readCanvasObject(org.json.simple.JSONArray arr)
arr - JSON Arraypublic void readElement(org.json.simple.JSONArray arr)
arr - JSON Arraypublic void readEdge(org.json.simple.JSONArray arr)
arr - JSON Arraypublic void readElementGraph(org.json.simple.JSONArray arr)
arr - JSON Arraypublic java.lang.String next(java.util.Iterator<java.lang.Object> i)
i - Iteratorpublic boolean convert(int x)
x - integer