|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A project. A project has (currently) exactly one frame with exactly one model and corresponding graphical system. It has two states: the modelling state, where nodes and connections may be added or removed etc., and the demonstration state, where the algorithm is demonstrated.
Field Summary | |
static int |
STATE_DEMONSTRATION
demonstration state |
static int |
STATE_MOD
modelling state |
Method Summary | |
void |
addConnection(Connection connection)
Adds a connection to the project |
void |
addNode(Node node)
Adds a node to the project |
void |
clear()
Removes all nodes and connections. |
Iterator |
connections()
Returns an iterator over the connections in the project. |
Algorithm |
getAlgorithm()
Returns the algorithm that is currently assigned to the project. |
GraphicalSystem |
getGraphicalSystem()
Returns the graphical system of the project. |
String |
getLocation()
Returns the location where the project is stored, e.g. a file path |
String |
getName()
Returns the name of the project. |
int |
getState()
Returns the state of the project (modelling or demonstration) |
boolean |
isLocationKnown()
Returns whether a storage location for the project is known. |
Iterator |
nodes()
Returns an iterator over the nodes in the project. |
void |
removeConnection(Connection connection)
Removes a connection from the project |
void |
removeNode(Node node)
Removes a node from the project |
void |
setAlgorithm(Algorithm algorithm)
Assigns an algorithm to the project. |
void |
setChanged(boolean changed)
Sets whether the project was changed since the last save operation. |
void |
setGraphicalSystem(GraphicalSystem system)
Sets the graphical system of the project. |
void |
setLocation(String location)
Sets the location where the project is stored, e.g. a file path. |
boolean |
wasChanged()
Returns whether the project was changed since the last save operation. |
Field Detail |
public static final int STATE_MOD
public static final int STATE_DEMONSTRATION
Method Detail |
public void setLocation(String location)
location
- the locationpublic String getLocation()
public boolean isLocationKnown()
public int getState()
public GraphicalSystem getGraphicalSystem()
public void setGraphicalSystem(GraphicalSystem system)
system
- the graphical systempublic String getName()
public void addNode(Node node)
node
- the nodepublic void removeNode(Node node)
node
- the nodepublic void addConnection(Connection connection)
connection
- the connectionpublic void removeConnection(Connection connection)
connection
- the connectionpublic void clear()
public Iterator nodes()
public Iterator connections()
public boolean wasChanged()
public void setChanged(boolean changed)
changed
- whether the project was changedpublic Algorithm getAlgorithm()
public void setAlgorithm(Algorithm algorithm)
algorithm
- the algorithm
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |