Fixed start stop Color Bug

This commit is contained in:
i23007 2024-07-06 00:51:44 +02:00
parent 7180d7951a
commit 79198f4f4a
3 changed files with 24 additions and 9 deletions

20
.idea/workspace.xml generated
View File

@ -5,7 +5,9 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="70f8ea87-9ffc-471a-8059-ebbfc323adcc" name="Changes" comment="Stable Version 3.0"> <list default="true" id="70f8ea87-9ffc-471a-8059-ebbfc323adcc" name="Changes" comment="Stable Version 3.0">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/graph/DirectedGraph.java" beforeDir="false" afterPath="$PROJECT_DIR$/graph/DirectedGraph.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/graph/DirectedGraph.java" beforeDir="false" afterPath="$PROJECT_DIR$/graph/DirectedGraph.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/ProjektGraph/graph/DirectedGraph.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/ProjektGraph/graph/DirectedGraph.class" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -25,16 +27,16 @@
<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.Display.executor": "Run", &quot;Application.Display.executor&quot;: &quot;Run&quot;,
"Application.OurApplication.executor": "Run", &quot;Application.OurApplication.executor&quot;: &quot;Run&quot;,
"RunOnceActivity.ShowReadmeOnStart": "true", &quot;RunOnceActivity.ShowReadmeOnStart&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:/Git/ProjektGraphMain" &quot;last_opened_file_path&quot;: &quot;C:/Git/ProjektGraphMain&quot;
} }
}]]></component> }</component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS"> <key name="CopyFile.RECENT_KEYS">
<recent name="C:\Git\ProjektGraph" /> <recent name="C:\Git\ProjektGraph" />

View File

@ -281,6 +281,9 @@ public class DirectedGraph<T extends VertexMarking, U extends EdgeMarking> exten
} }
} }
//zurücksetzten der Färbungen
this.clearScreenGraphColor();
System.out.println("Done"); System.out.println("Done");
// Gibt Distanz zu gefragtem Knoten zurück // Gibt Distanz zu gefragtem Knoten zurück
return distance.get(n2); return distance.get(n2);
@ -370,8 +373,18 @@ public class DirectedGraph<T extends VertexMarking, U extends EdgeMarking> exten
} }
} }
//zurücksetzten der Färbungen
this.clearScreenGraphColor();
System.out.println("Done"); System.out.println("Done");
// Gibt Distanz zu gefragtem Knoten zurück // Gibt Distanz zu gefragtem Knoten zurück
return distance.get(n2); return distance.get(n2);
} }
// Methode für das Zurücksetzten der Knotenfarben
public void clearScreenGraphColor(){
for(visualizationElements.Vertex screenVertexes : this.getScreenGraph().getVertexes()){
screenVertexes.setColor(Color.BLACK);
}
}
} }