Added Description for each step
This commit is contained in:
parent
e2c2038531
commit
6060796ddd
34
.idea/workspace.xml
generated
34
.idea/workspace.xml
generated
@ -6,10 +6,14 @@
|
|||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="70f8ea87-9ffc-471a-8059-ebbfc323adcc" name="Changes" comment="LegendArea gestaltet">
|
<list default="true" id="70f8ea87-9ffc-471a-8059-ebbfc323adcc" name="Changes" comment="LegendArea gestaltet">
|
||||||
<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/OurLegendArea.java" beforeDir="false" afterPath="$PROJECT_DIR$/OurApplication/OurLegendArea.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/OurApplication/OurLogElement.java" beforeDir="false" afterPath="$PROJECT_DIR$/OurApplication/OurLogElement.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/OurApplication/OurParameterArea.java" beforeDir="false" afterPath="$PROJECT_DIR$/OurApplication/OurParameterArea.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/OurApplication/OurTextArea.java" beforeDir="false" afterPath="$PROJECT_DIR$/OurApplication/OurTextArea.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurApplication.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurApplication.class" 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/OurApplication/OurLegendArea.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurLegendArea.class" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/out/production/ProjektGraph/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/ProjektGraph/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurLogElement.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurLogElement.class" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurParameterArea.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurParameterArea.class" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurTextArea.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurTextArea.class" 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" />
|
||||||
@ -34,17 +38,17 @@
|
|||||||
<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": {
|
"keyToString": {
|
||||||
"Application.Display.executor": "Run",
|
"Application.Display.executor": "Run",
|
||||||
"Application.OurApplication.executor": "Debug",
|
"Application.OurApplication.executor": "Debug",
|
||||||
"Application.OurLegendArea.executor": "Run",
|
"Application.OurLegendArea.executor": "Run",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"git-widget-placeholder": "main",
|
"git-widget-placeholder": "main",
|
||||||
"kotlin-language-version-configured": "true",
|
"kotlin-language-version-configured": "true",
|
||||||
"last_opened_file_path": "C:/Git/ProjektGraphMain"
|
"last_opened_file_path": "C:/Git/ProjektGraphMain"
|
||||||
}
|
}
|
||||||
}]]></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" />
|
||||||
@ -173,7 +177,7 @@
|
|||||||
<line-breakpoint enabled="true" type="java-line">
|
<line-breakpoint enabled="true" type="java-line">
|
||||||
<url>file://$PROJECT_DIR$/OurApplication/OurApplication.java</url>
|
<url>file://$PROJECT_DIR$/OurApplication/OurApplication.java</url>
|
||||||
<line>49</line>
|
<line>49</line>
|
||||||
<option name="timeStamp" value="1" />
|
<option name="timeStamp" value="2" />
|
||||||
</line-breakpoint>
|
</line-breakpoint>
|
||||||
</breakpoints>
|
</breakpoints>
|
||||||
</breakpoint-manager>
|
</breakpoint-manager>
|
||||||
|
@ -40,19 +40,19 @@ public class OurLogElement extends LogElement{
|
|||||||
* @param description the log element's step description
|
* @param description the log element's step description
|
||||||
* @param value the log element's sum up value
|
* @param value the log element's sum up value
|
||||||
*/
|
*/
|
||||||
public OurLogElement(int step, String description, long value, Vertex v){
|
public OurLogElement(int step, String description, long value, Vertex vertex){
|
||||||
this.step = step;
|
this.step = step;
|
||||||
this.description = description;
|
this.description = description;
|
||||||
this.value = value;
|
this.value = value;
|
||||||
this.vertex = v;
|
this.vertex = vertex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public OurLogElement(int step, String description, long value, Edge e){
|
public OurLogElement(int step, String description, long value, Edge edge){
|
||||||
this.step = step;
|
this.step = step;
|
||||||
this.description = description;
|
this.description = description;
|
||||||
this.value = value;
|
this.value = value;
|
||||||
this.edge = e;
|
this.edge = edge;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package OurApplication;
|
package OurApplication;
|
||||||
|
|
||||||
|
import logging.LogElement;
|
||||||
import logging.LogElementList;
|
import logging.LogElementList;
|
||||||
import visualisation.TextArea;
|
import visualisation.TextArea;
|
||||||
|
|
||||||
@ -36,6 +37,8 @@ public class OurTextArea extends TextArea{
|
|||||||
* No output.
|
* No output.
|
||||||
*/
|
*/
|
||||||
public boolean print(){
|
public boolean print(){
|
||||||
|
LogElement logElement=(LogElement)logList.get();
|
||||||
|
setText(logElement.getDescription());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -228,11 +228,15 @@ public class DirectedGraph<T extends VertexMarking, U extends EdgeMarking> exten
|
|||||||
int dist = 0;
|
int dist = 0;
|
||||||
// Zähler für LogList
|
// Zähler für LogList
|
||||||
int step = 0;
|
int step = 0;
|
||||||
|
// String für den Description Inhalt
|
||||||
|
String textDescription;
|
||||||
|
|
||||||
// Färben der Start und Ziel Knoten für Visualisierung + hinzufügen zur LogList
|
// Färben der Start und Ziel Knoten für Visualisierung + hinzufügen zur LogList
|
||||||
n1.getScreenVertex().setColor(Color.RED);
|
n1.getScreenVertex().setColor(Color.RED);
|
||||||
n2.getScreenVertex().setColor(Color.RED);
|
n2.getScreenVertex().setColor(Color.RED);
|
||||||
this.logList.add(new OurLogElement(step, "Step: " + step, 0, this.getScreenGraphCopy()));
|
textDescription = "Startknoten: " + n1.getScreenVertex().getMarking()
|
||||||
|
+ ", Endknoten: " + n2.getScreenVertex().getMarking();
|
||||||
|
this.logList.add(new OurLogElement(step, textDescription, 0, this.getScreenGraphCopy()));
|
||||||
|
|
||||||
while (!queue.isEmpty()) {
|
while (!queue.isEmpty()) {
|
||||||
// Den nächsten Knoten, der am wenigsten kostet, besuchen
|
// Den nächsten Knoten, der am wenigsten kostet, besuchen
|
||||||
@ -243,9 +247,10 @@ public class DirectedGraph<T extends VertexMarking, U extends EdgeMarking> exten
|
|||||||
|
|
||||||
|
|
||||||
// Logging
|
// Logging
|
||||||
System.out.println("Visit " + nextVertex.getElement().getName());
|
textDescription = "Visit " + nextVertex.getElement().getName();
|
||||||
|
System.out.println(textDescription);
|
||||||
nextVertex.getElement().getScreenVertex().setColor(Color.BLUE);
|
nextVertex.getElement().getScreenVertex().setColor(Color.BLUE);
|
||||||
this.logList.add(new OurLogElement(step, "Step: " + step, 0, this.getScreenGraphCopy()));
|
this.logList.add(new OurLogElement(step, textDescription, 0, this.getScreenGraphCopy()));
|
||||||
|
|
||||||
|
|
||||||
// Gehe von diesem Knoten aus alle erreichbaren Knoten durch
|
// Gehe von diesem Knoten aus alle erreichbaren Knoten durch
|
||||||
@ -270,9 +275,10 @@ public class DirectedGraph<T extends VertexMarking, U extends EdgeMarking> exten
|
|||||||
distance.put(i, dist);
|
distance.put(i, dist);
|
||||||
|
|
||||||
// Logging
|
// Logging
|
||||||
System.out.println("Add " + i.getName() + " with " + dist + " weight to queue.");
|
textDescription = "Add " + i.getName() + " with " + dist + " weight to queue.";
|
||||||
|
System.out.println(textDescription);
|
||||||
i.getScreenVertex().setColor(Color.YELLOW);
|
i.getScreenVertex().setColor(Color.YELLOW);
|
||||||
this.logList.add(new OurLogElement(step, "Step: " + step, 0, this.getScreenGraphCopy()));
|
this.logList.add(new OurLogElement(step, textDescription, 0, this.getScreenGraphCopy()));
|
||||||
|
|
||||||
// Nehme nächsten Knoten in die Queue auf
|
// Nehme nächsten Knoten in die Queue auf
|
||||||
queue.add(new WrapperElement<>(i, dist));
|
queue.add(new WrapperElement<>(i, dist));
|
||||||
@ -318,11 +324,15 @@ public class DirectedGraph<T extends VertexMarking, U extends EdgeMarking> exten
|
|||||||
int distToFinish = 0;
|
int distToFinish = 0;
|
||||||
// Zähler für LogList
|
// Zähler für LogList
|
||||||
int step = 0;
|
int step = 0;
|
||||||
|
// String für den Description Inhalt
|
||||||
|
String textDescription;
|
||||||
|
|
||||||
// Färben der Start und Ziel Knoten für Visualisierung + hinzufügen zur LogList
|
// Färben der Start und Ziel Knoten für Visualisierung + hinzufügen zur LogList
|
||||||
n1.getScreenVertex().setColor(Color.RED);
|
n1.getScreenVertex().setColor(Color.RED);
|
||||||
n2.getScreenVertex().setColor(Color.RED);
|
n2.getScreenVertex().setColor(Color.RED);
|
||||||
this.logList.add(new OurLogElement(step, "Step: " + step, 0, this.getScreenGraphCopy()));
|
textDescription = "Startknoten: " + n1.getScreenVertex().getMarking()
|
||||||
|
+ ", Endknoten: " + n2.getScreenVertex().getMarking();
|
||||||
|
this.logList.add(new OurLogElement(step, textDescription, 0, this.getScreenGraphCopy()));
|
||||||
|
|
||||||
while (!queue.isEmpty()) {
|
while (!queue.isEmpty()) {
|
||||||
// Den nächsten Knoten, der am wenigsten kostet, besuchen
|
// Den nächsten Knoten, der am wenigsten kostet, besuchen
|
||||||
@ -333,9 +343,10 @@ public class DirectedGraph<T extends VertexMarking, U extends EdgeMarking> exten
|
|||||||
|
|
||||||
|
|
||||||
// Logging
|
// Logging
|
||||||
System.out.println("Visit " + nextVertex.getElement().getName());
|
textDescription = "Visit " + nextVertex.getElement().getName();
|
||||||
|
System.out.println(textDescription);
|
||||||
nextVertex.getElement().getScreenVertex().setColor(Color.BLUE);
|
nextVertex.getElement().getScreenVertex().setColor(Color.BLUE);
|
||||||
this.logList.add(new OurLogElement(step, "Step: " + step, 0, this.getScreenGraphCopy()));
|
this.logList.add(new OurLogElement(step, textDescription, 0, this.getScreenGraphCopy()));
|
||||||
|
|
||||||
|
|
||||||
// Gehe von diesem Knoten aus alle erreichbaren Knoten durch
|
// Gehe von diesem Knoten aus alle erreichbaren Knoten durch
|
||||||
@ -365,9 +376,10 @@ public class DirectedGraph<T extends VertexMarking, U extends EdgeMarking> exten
|
|||||||
distance.put(i, dist);
|
distance.put(i, dist);
|
||||||
|
|
||||||
// Logging
|
// Logging
|
||||||
System.out.println("Add " + i.getName() + " with " + dist + " weight to queue.");
|
textDescription = "Add " + i.getName() + " with " + dist + " weight to queue.";
|
||||||
|
System.out.println(textDescription);
|
||||||
i.getScreenVertex().setColor(Color.YELLOW);
|
i.getScreenVertex().setColor(Color.YELLOW);
|
||||||
this.logList.add(new OurLogElement(step, "Step: " + step, 0, this.getScreenGraphCopy()));
|
this.logList.add(new OurLogElement(step, textDescription, 0, this.getScreenGraphCopy()));
|
||||||
|
|
||||||
// Nehme nächsten Knoten in die Queue auf
|
// Nehme nächsten Knoten in die Queue auf
|
||||||
queue.add(new WrapperElement<>(i, distToFinish));
|
queue.add(new WrapperElement<>(i, distToFinish));
|
||||||
|
51
out/production/ProjektGraph/.idea/workspace.xml
generated
51
out/production/ProjektGraph/.idea/workspace.xml
generated
@ -4,7 +4,13 @@
|
|||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="70f8ea87-9ffc-471a-8059-ebbfc323adcc" name="Changes" comment="Beispiele überarbeitet" />
|
<list default="true" id="70f8ea87-9ffc-471a-8059-ebbfc323adcc" name="Changes" comment="LegendArea gestaltet">
|
||||||
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/OurApplication/OurLegendArea.java" beforeDir="false" afterPath="$PROJECT_DIR$/OurApplication/OurLegendArea.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/OurApplication/OurParameterArea.java" beforeDir="false" afterPath="$PROJECT_DIR$/OurApplication/OurParameterArea.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurApplication.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurApplication.class" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurLegendArea.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/ProjektGraph/OurApplication/OurLegendArea.class" afterDir="false" />
|
||||||
|
</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" />
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
@ -28,16 +34,17 @@
|
|||||||
<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">{
|
<component name="PropertiesComponent"><![CDATA[{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
"Application.Display.executor": "Run",
|
"Application.Display.executor": "Run",
|
||||||
"Application.OurApplication.executor": "Run",
|
"Application.OurApplication.executor": "Debug",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"Application.OurLegendArea.executor": "Run",
|
||||||
"git-widget-placeholder": "main",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"kotlin-language-version-configured": "true",
|
"git-widget-placeholder": "main",
|
||||||
"last_opened_file_path": "C:/Git/ProjektGraphMain"
|
"kotlin-language-version-configured": "true",
|
||||||
|
"last_opened_file_path": "C:/Git/ProjektGraphMain"
|
||||||
}
|
}
|
||||||
}</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" />
|
||||||
@ -128,7 +135,15 @@
|
|||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1720311867957</updated>
|
<updated>1720311867957</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="10" />
|
<task id="LOCAL-00010" summary="LegendArea gestaltet">
|
||||||
|
<option name="closed" value="true" />
|
||||||
|
<created>1720347450647</created>
|
||||||
|
<option name="number" value="00010" />
|
||||||
|
<option name="presentableId" value="LOCAL-00010" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1720347450647</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="11" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="Vcs.Log.Tabs.Properties">
|
<component name="Vcs.Log.Tabs.Properties">
|
||||||
@ -149,6 +164,18 @@
|
|||||||
<MESSAGE value="Tests with marking of Edges and Vertexes Adding Visualisation of Edge weight and Vertex name fixed AStar" />
|
<MESSAGE value="Tests with marking of Edges and Vertexes Adding Visualisation of Edge weight and Vertex name fixed AStar" />
|
||||||
<MESSAGE value="small fix" />
|
<MESSAGE value="small fix" />
|
||||||
<MESSAGE value="Beispiele überarbeitet" />
|
<MESSAGE value="Beispiele überarbeitet" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="Beispiele überarbeitet" />
|
<MESSAGE value="LegendArea gestaltet" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="LegendArea gestaltet" />
|
||||||
|
</component>
|
||||||
|
<component name="XDebuggerManager">
|
||||||
|
<breakpoint-manager>
|
||||||
|
<breakpoints>
|
||||||
|
<line-breakpoint enabled="true" type="java-line">
|
||||||
|
<url>file://$PROJECT_DIR$/OurApplication/OurApplication.java</url>
|
||||||
|
<line>49</line>
|
||||||
|
<option name="timeStamp" value="1" />
|
||||||
|
</line-breakpoint>
|
||||||
|
</breakpoints>
|
||||||
|
</breakpoint-manager>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user