Visualisation progress reset

This commit is contained in:
i23007 2024-07-02 17:51:22 +02:00
parent 213638ad16
commit 6036220c6a
4 changed files with 25 additions and 25 deletions

27
.idea/workspace.xml generated
View File

@ -6,10 +6,7 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="70f8ea87-9ffc-471a-8059-ebbfc323adcc" name="Changes" comment="OurApplication test"> <list default="true" id="70f8ea87-9ffc-471a-8059-ebbfc323adcc" name="Changes" comment="OurApplication test">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OurApplication/OurAlgorithm.java" beforeDir="false" afterPath="$PROJECT_DIR$/OurApplication/OurAlgorithm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/OurApplication/OurDrawArea.java" beforeDir="false" afterPath="$PROJECT_DIR$/OurApplication/OurDrawArea.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/OurApplication/OurDrawArea.java" beforeDir="false" afterPath="$PROJECT_DIR$/OurApplication/OurDrawArea.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/graph/DirectedGraph.java" beforeDir="false" afterPath="$PROJECT_DIR$/graph/DirectedGraph.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/graph/Graph.java" beforeDir="false" afterPath="$PROJECT_DIR$/graph/Graph.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/graph/MarkedVertex.java" beforeDir="false" afterPath="$PROJECT_DIR$/graph/MarkedVertex.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/graph/MarkedVertex.java" beforeDir="false" afterPath="$PROJECT_DIR$/graph/MarkedVertex.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/graph/Vertex.java" beforeDir="false" afterPath="$PROJECT_DIR$/graph/Vertex.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/graph/Vertex.java" beforeDir="false" afterPath="$PROJECT_DIR$/graph/Vertex.java" afterDir="false" />
</list> </list>
@ -46,19 +43,19 @@
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent"><![CDATA[{ <component name="PropertiesComponent">{
"keyToString": { &quot;keyToString&quot;: {
"Application.OurApplication.executor": "Run", &quot;Application.OurApplication.executor&quot;: &quot;Run&quot;,
"DefaultHtmlFileTemplate": "HTML File", &quot;DefaultHtmlFileTemplate&quot;: &quot;HTML File&quot;,
"RunOnceActivity.OpenProjectViewOnStart": "true", &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
"RunOnceActivity.ShowReadmeOnStart": "true", &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
"SHARE_PROJECT_CONFIGURATION_FILES": "true", &quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
"git-widget-placeholder": "main", &quot;git-widget-placeholder&quot;: &quot;main&quot;,
"kotlin-language-version-configured": "true", &quot;kotlin-language-version-configured&quot;: &quot;true&quot;,
"last_opened_file_path": "C:/Users/jonas/DHBW Dateien/Semester 2/Programmieren 2/Projekt/ProjektGraph/OurApplication", &quot;last_opened_file_path&quot;: &quot;C:/Users/jonas/DHBW Dateien/Semester 2/Programmieren 2/Projekt/ProjektGraph/OurApplication&quot;,
"settings.editor.selected.configurable": "vcs.Git" &quot;settings.editor.selected.configurable&quot;: &quot;vcs.Git&quot;
} }
}]]></component> }</component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS"> <key name="CopyFile.RECENT_KEYS">
<recent name="C:\Users\jonas\DHBW Dateien\Semester 2\Programmieren 2\Projekt\ProjektGraph\OurApplication" /> <recent name="C:\Users\jonas\DHBW Dateien\Semester 2\Programmieren 2\Projekt\ProjektGraph\OurApplication" />

View File

@ -56,7 +56,7 @@ public class OurDrawArea extends DrawArea{
private void drawGraph(DirectedGraph<VertexMarking, EdgeMarking> ourGraph, Graphics g) { private void drawGraph(DirectedGraph<VertexMarking, EdgeMarking> ourGraph, Graphics g) {
String convertedMarking; String convertedMarking;
/*Vector<Vertex> vertexes = new Vector<Vertex>(); Vector<Vertex> vertexes = new Vector<Vertex>();
for(MarkedVertex<VertexMarking> i : ourGraph.getAllVertexes()){ for(MarkedVertex<VertexMarking> i : ourGraph.getAllVertexes()){
if(i.getMarking() != null){ if(i.getMarking() != null){
@ -64,7 +64,7 @@ public class OurDrawArea extends DrawArea{
}else{ }else{
convertedMarking = ""; convertedMarking = "";
} }
vertexes.add(new Vertex(i.getXCoordinate(), i.getYCoordinate(), convertedMarking, Color.GRAY)); vertexes.add(new Vertex(i.getXCoordinate(), i.getYCoordinate(), convertedMarking, i.getColor()));
} }
Vector<Edge> edges = new Vector<Edge>(); Vector<Edge> edges = new Vector<Edge>();
@ -75,9 +75,9 @@ public class OurDrawArea extends DrawArea{
Graph graph = new Graph(vertexes, edges, true, EdgeStyle.Direct); Graph graph = new Graph(vertexes, edges, true, EdgeStyle.Direct);
graph.draw(g);*/ graph.draw(g);
Vector<Vertex> vertexes = new Vector<Vertex>(); /*Vector<Vertex> vertexes = new Vector<Vertex>();
for(MarkedVertex<VertexMarking> i : ourGraph.getAllVertexes()){ for(MarkedVertex<VertexMarking> i : ourGraph.getAllVertexes()){
@ -92,7 +92,7 @@ public class OurDrawArea extends DrawArea{
Graph graph = new Graph(vertexes, edges, true, EdgeStyle.Direct); Graph graph = new Graph(vertexes, edges, true, EdgeStyle.Direct);
graph.draw(g); graph.draw(g);*/
} }
} }

View File

@ -24,7 +24,7 @@ public class MarkedVertex<T extends VertexMarking> extends Vertex{
// GET-ER // GET-ER
/*public T getMarking() { public T getMarking() {
return this.marking; return this.marking;
} }
@ -33,7 +33,7 @@ public class MarkedVertex<T extends VertexMarking> extends Vertex{
public void setMarking(T t) { public void setMarking(T t) {
this.marking = t; this.marking = t;
}*/ }
// Ausgabe // Ausgabe

View File

@ -2,7 +2,7 @@ package graph;
import java.awt.Color; import java.awt.Color;
public abstract class Vertex extends visualizationElements.Vertex { public abstract class Vertex{
// ATTRIBUTE // ATTRIBUTE
@ -17,12 +17,15 @@ public abstract class Vertex extends visualizationElements.Vertex {
// KONSTRUKTOREN // KONSTRUKTOREN
public Vertex() { public Vertex() {
super(0, 0);
} }
public Vertex(int xCoordinate, int yCoordinate, String name, Color color) { public Vertex(int xCoordinate, int yCoordinate, String name, Color color) {
super(xCoordinate, yCoordinate, name, color); this.xCoordinate = xCoordinate;
this.yCoordinate = yCoordinate;
this.name = name;
this.color = color;
} }