-
Notifications
You must be signed in to change notification settings - Fork 0
Commands
Samuel Gurský edited this page May 4, 2017
·
7 revisions
Every command appends an appropriate message (success, failure, relevant information) to the TextArea present under the panel.
- Save (String) filename : Saves current graph to the file named filename, or filename.graph if filename does not have said extension.
- Load (String) filename : Loads graph from file named filename, or filename.graph if filename does not have said extension.
- Add Vertex (optional (double) x (double) y) : Adds a new vertex to the graph. If no coordinates are given, vertices are added in a grid-like fashion spaced out on the panel. Otherwise it adds a new vertex to the graph with the given coordinates.
- Add Edge (int) from (int) to : Adds an edge from the vertex with id from to vertex with id to.
- Select Vertex (int) vertexId : Selects the vertex with id vertexId.
- Select Edge (int) from (int) to : Selects edge with originId from and destinationId to.
- Edit Vertex (int) vertexId (int) value: Sets the value of vertex with id vertexId to value.
- Edit Vertex (int) vertexId (String) color: Sets the color of vertex with id vertexId to color.
- Edit Edge (int) from (int) to (int) value: Sets the value of edge with oridingId from and destinationId to to value.
- Edit Edge (int) from (int) to (String) color: Sets the color of edge with oridingId from and destinationId to to color.
- Remove Vertex (int) vertexId : Removes the vertex with id vertexId.
- Remove Edge (int) from (int) to : Removes edge with originId from and destinationId to.
- Move (int) vertexId (double) x (double) y : Moves vertex with id vertexId vertexId to new coordinates (x, y).
- Deselect Edge : Deselects currently selected edge
- Deselect Vertex : Deselects currently selected vertex
- Run : Runs controller.runGraphAlgorithm().
- Dialog: Runs controller.runDialog().
- Exit : Exits the application.
- Help : Displays help alert.