mirror of
https://codeberg.org/qg-info-unterricht/zpg-graphentester.git
synced 2026-03-24 20:48:26 +01:00
Sync with upstream
This commit is contained in:
parent
39a2f13410
commit
66e8fa72bf
135 changed files with 38902 additions and 37757 deletions
|
|
@ -13,7 +13,8 @@ import control.Controller;
|
|||
* offen bleiben. Dann bitte das Programm über die Main-Funktion starten.
|
||||
*
|
||||
* @author Dirk Zechnall, Thomas Schaller
|
||||
* @version 12.02.2021 (v6.6)
|
||||
* @version 28.02.2023 (v7.0)
|
||||
*
|
||||
*/
|
||||
|
||||
public class GraphenTester extends Application {
|
||||
|
|
@ -23,15 +24,21 @@ public class GraphenTester extends Application {
|
|||
try {
|
||||
FXMLLoader loader = new FXMLLoader(getClass().getResource("/view/graphenalgorithmen.fxml"));
|
||||
Controller c = new Controller();
|
||||
c.setStage(primaryStage);
|
||||
loader.setController(c);
|
||||
VBox root = (VBox) loader.load();
|
||||
Scene scene = new Scene(root);
|
||||
Image icon = new Image("/view/icon.png");
|
||||
primaryStage.getIcons().add(icon);
|
||||
primaryStage.setScene(scene);
|
||||
primaryStage.setTitle("Graphentester");
|
||||
primaryStage.show();
|
||||
primaryStage.setOnCloseRequest(e->c.mBeenden(null));
|
||||
primaryStage.setOnCloseRequest(e ->
|
||||
{
|
||||
c.saveAktConfig();
|
||||
|
||||
c.mBeenden(null);
|
||||
System.exit(0);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
PROJEKTBEZEICHNUNG: GraphenTester
|
||||
PROJEKTZWECK: Didaktisches Werkzeug um Graphenrepräsentation und -algorithmen kennen zu lernen
|
||||
VERSION oder DATUM: 09.12.2020
|
||||
|
||||
INSTALLATIONSHINWEISE:
|
||||
im Ordner Hintergrund
|
||||
VERSION oder DATUM: 24.06.2021
|
||||
|
||||
WIE IST DAS PROJEKT IN BLUEJ ZU STARTEN:
|
||||
Rechtsklick auf die Klasse Graphentester
|
||||
|
|
@ -11,5 +8,6 @@ Rechtsklick auf die Klasse Graphentester
|
|||
--> OK
|
||||
|
||||
AUTOR(EN): Dirk Zechnall / Thomas Schaller
|
||||
**********************************************************************************************
|
||||
|
||||
UPSTREAM URL: https://edugit.edugit.org/ts-zsl-rska/graphentester/-/tree/master/3_vorlagen_tauschordner/1_graphentester
|
||||
|
||||
|
|
|
|||
|
|
@ -8,25 +8,24 @@ import javafx.scene.control.Alert;
|
|||
import javafx.scene.control.Alert.AlertType;
|
||||
import javafx.scene.control.ButtonType;
|
||||
import javafx.application.Platform;
|
||||
import javafx.scene.control.TextInputDialog;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
*
|
||||
* description
|
||||
* Abstrakte Oberklasse für alle zu simulierende Algorithmen
|
||||
* Diese müssen die Methode getBezeichnung(): String und fuehreAlgorithmusAus() überschreiben.
|
||||
*
|
||||
* @version 1.0 from 26.04.2019
|
||||
* @author
|
||||
* @version 6.7 (Dez. 2020)
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public abstract class GraphAlgo extends Thread {
|
||||
|
||||
// Anfang Attribute
|
||||
private boolean stepping;
|
||||
private boolean waitforrepaint;
|
||||
private boolean waitforclick;
|
||||
private boolean stepping; // Einzelschrittmodus
|
||||
private boolean waitforrepaint; // wird gerade gezeichnet (=> nicht nochmal zeichnen beauftragen)
|
||||
private boolean waitforclick; // wird auf Klick für nächsten Step gewartet
|
||||
protected boolean inArbeit;
|
||||
private GraphPlotter gp;
|
||||
protected GraphPlotter gp;
|
||||
private Knoten startKnoten;
|
||||
private int speed =100;
|
||||
private Hilfe hilfe;
|
||||
|
|
@ -35,6 +34,9 @@ public abstract class GraphAlgo extends Thread {
|
|||
// Ende Attribute
|
||||
|
||||
// Anfang Methoden
|
||||
/**
|
||||
* Erzeugt neues Algorithmus-Objekt
|
||||
*/
|
||||
public GraphAlgo() {
|
||||
stepping = true;
|
||||
waitforrepaint = false;
|
||||
|
|
@ -43,6 +45,11 @@ public abstract class GraphAlgo extends Thread {
|
|||
setDaemon(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setzt die Referenz auf die GraphAnzeige und das Hilfefenster
|
||||
* @param graphPlotter
|
||||
* @param hilfe
|
||||
*/
|
||||
public void setGUIElemente(GraphPlotter graphPlotter, Hilfe hilfe) {
|
||||
gp = graphPlotter;
|
||||
g = gp.getGraph();
|
||||
|
|
@ -50,15 +57,31 @@ public abstract class GraphAlgo extends Thread {
|
|||
if (hilfe != null) hilfe.setGraphPlotter(gp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setzt Referenz auf den Graphen
|
||||
* @param g Graph auf den der Algorithmus angewendet wird
|
||||
*/
|
||||
public void setGraph(Graph g) {
|
||||
this.g = g;
|
||||
gp = null;
|
||||
hilfe = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gibt Referenz auf den Graphen zurück
|
||||
* @return g Graph, auf den der Algorithmus angewendet wird
|
||||
*/
|
||||
public Graph getGraph() {
|
||||
return g;
|
||||
}
|
||||
|
||||
/**
|
||||
* Muss vom Algorithmus aufgerufen werden, um einen Haltepunkt zu setzen
|
||||
*/
|
||||
public void step() {
|
||||
if(gp == null) return;
|
||||
try{
|
||||
//System.out.println("Step");
|
||||
gp.updateImage();
|
||||
aktuellerZustand = g.getStatus();
|
||||
waitforclick = true;
|
||||
|
|
@ -68,6 +91,7 @@ public abstract class GraphAlgo extends Thread {
|
|||
Thread.sleep(10);
|
||||
i++;
|
||||
}
|
||||
|
||||
if (hilfe != null) hilfe.setReviewAllowed(false);
|
||||
g.setStatus(aktuellerZustand);
|
||||
aktuellerZustand = null;
|
||||
|
|
@ -77,30 +101,41 @@ public abstract class GraphAlgo extends Thread {
|
|||
}
|
||||
}
|
||||
|
||||
public boolean getWaitforrepaint() {
|
||||
return waitforrepaint;
|
||||
}
|
||||
|
||||
public void setWaitforrepaint(boolean waitforrepaintNeu) {
|
||||
waitforrepaint = waitforrepaintNeu;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wird gerade auf einen Buttonklick für den nächsten Step gewartet?
|
||||
* @return true/false
|
||||
*/
|
||||
public boolean getWaitforclick() {
|
||||
return waitforclick;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setzt, ob gewartet wird. Damit kann übermittelt werden, dass der Button gedrückt wurde
|
||||
* @param wairforclickNeu Soll weiter gewartet werden?
|
||||
*/
|
||||
public void setWaitforclick(boolean waitforclickNeu) {
|
||||
waitforclick = waitforclickNeu;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setzt, ob im Einzelschrittmodus ausgeführt werden soll
|
||||
* @param stepping true/false
|
||||
*/
|
||||
public void setStepping(boolean stepping) {
|
||||
this.stepping = stepping;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setzt die Wartezeit im automatischen Modus
|
||||
* @param delay Wartezeit
|
||||
*/
|
||||
public void setSpeed(int delay) {
|
||||
this.speed = delay;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ausführung des Algorithmus
|
||||
*/
|
||||
public void run()
|
||||
{
|
||||
if(!inArbeit && gp != null)
|
||||
|
|
@ -110,9 +145,10 @@ public abstract class GraphAlgo extends Thread {
|
|||
try{
|
||||
if (hilfe != null) hilfe.setReviewAllowed(false);
|
||||
fuehreAlgorithmusAus();
|
||||
gp.updateImage();
|
||||
// System.out.println("Algorithmus beendet");
|
||||
} catch( ThreadDeath e){
|
||||
// System.out.println("Algorithmus vorzeitig beendet.");
|
||||
// System.out.println("Algorithmus vorzeitig beendet."+e);
|
||||
}
|
||||
if (hilfe != null) hilfe.setReviewAllowed(true);
|
||||
inArbeit = false;
|
||||
|
|
@ -125,10 +161,18 @@ public abstract class GraphAlgo extends Thread {
|
|||
}
|
||||
// Ende Methoden
|
||||
|
||||
/**
|
||||
* Setzen des Startknotens
|
||||
* @param k Startknoten
|
||||
*/
|
||||
public void setStartKnoten(Knoten k) {
|
||||
startKnoten = k;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abfragen des Startknotens für den Algorithmus
|
||||
* @return gesetzter Startknoten oder Knoten Nr. 0
|
||||
*/
|
||||
public Knoten getStartKnoten() {
|
||||
if (startKnoten != null) {
|
||||
return startKnoten;
|
||||
|
|
@ -137,24 +181,22 @@ public abstract class GraphAlgo extends Thread {
|
|||
} // end of if-else
|
||||
}
|
||||
|
||||
/**
|
||||
* Methode für den eigentlichen Algorithmus
|
||||
*/
|
||||
public abstract void fuehreAlgorithmusAus();
|
||||
|
||||
/**
|
||||
* Name des Algorithmus für die Dropdown-Auswahl
|
||||
*/
|
||||
public abstract String getBezeichnung();
|
||||
|
||||
public void eingabe() {
|
||||
Platform.runLater(() -> {
|
||||
TextInputDialog dialog = new TextInputDialog(); // create an instance
|
||||
|
||||
dialog.setTitle("Title");
|
||||
// other formatting etc
|
||||
|
||||
Optional<String> result = dialog.showAndWait();
|
||||
// this shows the dialog, waits until it is closed, and stores the result
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Öffnet ein Anzeigefenster mit einer Meldung. Die
|
||||
* Meldung wird ggf. auch im Hilfefenster angezeigt.
|
||||
* Ist für die Verwendung im Algorithmus gedacht.
|
||||
* @param s Meldung
|
||||
*/
|
||||
public void melde(String s) {
|
||||
info(s);
|
||||
Platform.runLater(() -> {
|
||||
|
|
@ -165,22 +207,53 @@ public abstract class GraphAlgo extends Thread {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Text in das Hilfefenster einfügen
|
||||
* Ist für die Verwendung im Algorithmus gedacht.
|
||||
* @param s Hilfetext
|
||||
*/
|
||||
public void info(String s) {
|
||||
if(hilfe != null) hilfe.append(s+"\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* Löscht das Hilfefenster
|
||||
*/
|
||||
public void resetInfo() {
|
||||
if(hilfe != null) hilfe.loescheAlles();
|
||||
}
|
||||
|
||||
/**
|
||||
* Rückt im Hilfefenster eine Ebene tiefer ein.
|
||||
* Ist für die Verwendung im Algorithmus gedacht.
|
||||
*/
|
||||
public void infoIndentMore() {
|
||||
if(hilfe != null) hilfe.indentMore();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Rückt im Hilfefenster eine Ebene aus.
|
||||
* Ist für die Verwendung im Algorithmus gedacht.
|
||||
*/
|
||||
public void infoIndentLess() {
|
||||
if(hilfe != null) hilfe.indentLess();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialisiert den Graphen
|
||||
*/
|
||||
public void init() {
|
||||
gp.getGraphOptions().knotenKurztext = new String[]{"Wert"};
|
||||
gp.getGraphOptions().knotenLangtext = new String[]{"Infotext","Wert","Markiert","Besucht"};
|
||||
if(g.isGewichtet()) {
|
||||
gp.getGraphOptions().kanteKurztext = new String[]{"Gewicht"};
|
||||
gp.getGraphOptions().kanteLangtext = new String[]{"Gewicht","Markiert","Gelöscht"};
|
||||
} else {
|
||||
gp.getGraphOptions().kanteKurztext = new String[]{};
|
||||
gp.getGraphOptions().kanteLangtext = new String[]{"Markiert","Gelöscht"};
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,15 +29,19 @@ public class GraphAlgo_BellmanFord extends GraphAlgo {
|
|||
}
|
||||
}
|
||||
|
||||
public void init() {
|
||||
for(Knoten k : g.getAlleKnoten()) {
|
||||
k.setWert(Double.POSITIVE_INFINITY);
|
||||
}
|
||||
info("Setze alle Entfernungen auf unendlich");
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
public void fuehreAlgorithmusAus() {
|
||||
if (g.getAnzahlKnoten()==0) {
|
||||
return;
|
||||
}
|
||||
for(Knoten k : g.getAlleKnoten()) {
|
||||
k.setWert(1000);
|
||||
}
|
||||
info("Setze alle Entfernungen auf unendlich (1000)");
|
||||
|
||||
getStartKnoten().setWert(0);
|
||||
info("Setze Startknoten auf Entfernung 0");
|
||||
step();
|
||||
|
|
|
|||
|
|
@ -22,6 +22,13 @@ public class GraphAlgo_Dijkstra extends GraphAlgo {
|
|||
return "Kürzester Pfad (Dijkstra)";
|
||||
}
|
||||
|
||||
public void init() {
|
||||
super.init();
|
||||
for(Knoten k : g.getAlleKnoten()) {
|
||||
k.setWert(Double.POSITIVE_INFINITY);
|
||||
}
|
||||
info("Setze alle Entfernungen auf unendlich");
|
||||
}
|
||||
// Anfang Methoden
|
||||
|
||||
public void fuehreAlgorithmusAus() {
|
||||
|
|
@ -50,13 +57,10 @@ public class GraphAlgo_Dijkstra extends GraphAlgo {
|
|||
if(!n.isMarkiert()){
|
||||
info("- ist noch nicht markiert");
|
||||
Kante ka = g.getKante(k, n);
|
||||
if(!n.isBesucht() || n.getDoubleWert() > k.getDoubleWert()+ka.getGewicht()){
|
||||
if(n.getDoubleWert() > k.getDoubleWert()+ka.getGewicht()){
|
||||
if(n.isBesucht()) {
|
||||
List<Kante> eingehend = g.getEingehendeKanten(n, ka2 -> !ka2.isGeloescht() && ka2.isMarkiert());
|
||||
Kante alterWeg = eingehend.get(0);
|
||||
// Kante alterWeg = g.beschraenkeKantenAuf(g.getEingehendeKanten(n), Graph.MARKIERT, Graph.NICHTGELOESCHT).get(0);
|
||||
// alterWeg.setGeloescht(true);
|
||||
// alterWeg.setMarkiert(false);
|
||||
alterWeg.setGeloescht(true);
|
||||
alterWeg.setMarkiert(false);
|
||||
|
||||
|
|
|
|||
109
algorithmen/GraphAlgo_DijkstraMitVorgaenger.java
Normal file
109
algorithmen/GraphAlgo_DijkstraMitVorgaenger.java
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
package algorithmen;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.nio.file.*;
|
||||
import java.util.Arrays;
|
||||
|
||||
import graph.*;
|
||||
/**
|
||||
* Dieser Algorithmus findet die kürzesten Pfade in einem gewichteten Graphen.
|
||||
* Algorithmus: Dijkstra
|
||||
*
|
||||
* @version 1.0 from 10.12.2020
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class GraphAlgo_DijkstraMitVorgaenger extends GraphAlgo {
|
||||
|
||||
// Anfang Attribute
|
||||
public String getBezeichnung() {
|
||||
return "Kürzester Pfad (Dijkstra mit Vorgänger)";
|
||||
}
|
||||
|
||||
|
||||
public void init() {
|
||||
List<Knoten> alle = g.getAlleKnoten();
|
||||
for(Knoten k : alle) {
|
||||
k.set("Vorgänger","-");
|
||||
k.set("Entfernung",Double.POSITIVE_INFINITY);
|
||||
k.setSortierkriterium("Entfernung");
|
||||
}
|
||||
gp.getGraphOptions().knotenKurztext = new String[]{"Entfernung","Vorgänger"};
|
||||
gp.getGraphOptions().knotenLangtext = new String[]{"Infotext","Entfernung","Vorgänger","Markiert","Besucht"};
|
||||
}
|
||||
|
||||
public void fuehreAlgorithmusAus() {
|
||||
if (g.getAnzahlKnoten()==0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
info("Erzeuge leere toDo-Liste und füge Startknoten hinzu");
|
||||
List<Knoten> toDo = new ArrayList<Knoten>();
|
||||
getStartKnoten().setBesucht(true);
|
||||
getStartKnoten().set("Entfernung", 0);
|
||||
toDo.add(getStartKnoten());
|
||||
|
||||
while(toDo.size()>0) {
|
||||
info("Sortiere toDo-Liste nach der Entfernung");
|
||||
Collections.sort(toDo);
|
||||
info("Nimm ersten Knoten aus der toDo-Liste (momentan "+toDo.size()+" Elemente) heraus");
|
||||
Knoten k = toDo.remove(0);
|
||||
infoIndentMore();
|
||||
k.setMarkiert(true);
|
||||
info("Markiere den Knoten");
|
||||
info("Er hat Entfernung "+k.getString("Entfernung"));
|
||||
info("Für jeden Nachbarknoten");
|
||||
infoIndentMore();
|
||||
for(Knoten n : g.getNachbarknoten(k)) {
|
||||
if(!n.isMarkiert()){
|
||||
if(!n.getInfotext().isEmpty()) {
|
||||
info("- "+n.getInfotext()+" ist noch nicht markiert");
|
||||
} else {
|
||||
info("- Knoten Nr. "+g.getNummer(n)+" ist noch nicht markiert");
|
||||
}
|
||||
Kante ka = g.getKante(k, n);
|
||||
if(!n.isBesucht() || n.getDouble("Entfernung") > k.getDouble("Entfernung") + ka.getGewicht()){
|
||||
if(n.isBesucht()) {
|
||||
List<Kante> eingehend = g.getEingehendeKanten(n, ka2 -> !ka2.isGeloescht() && ka2.isMarkiert());
|
||||
Kante alterWeg = eingehend.get(0);
|
||||
// Kante alterWeg = g.beschraenkeKantenAuf(g.getEingehendeKanten(n), Graph.MARKIERT, Graph.NICHTGELOESCHT).get(0);
|
||||
// alterWeg.setGeloescht(true);
|
||||
// alterWeg.setMarkiert(false);
|
||||
alterWeg.setGeloescht(true);
|
||||
alterWeg.setMarkiert(false);
|
||||
|
||||
info(" loesche bisherigen Weg dorthin");
|
||||
}
|
||||
|
||||
n.set("Entfernung", k.getInt("Entfernung")+ka.getGewicht());
|
||||
if(k.getInfotext().equals("")) {
|
||||
n.set("Vorgänger",g.getNummer(k));
|
||||
} else {
|
||||
n.set("Vorgänger",k.getInfotext());
|
||||
}
|
||||
if(!toDo.contains(n)) toDo.add(n);
|
||||
ka.setMarkiert(true);
|
||||
n.setBesucht(true);
|
||||
info(" setze Entfernung "+n.getString("Entfernung")+" und füge ggf. ToDo-Liste hinzu.");
|
||||
info(" toDo-Liste hat jetzt "+toDo.size()+" Elemente");
|
||||
} else {
|
||||
info(" keine neue beste Entfernung");
|
||||
ka.setGeloescht(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
infoIndentLess();
|
||||
infoIndentLess();
|
||||
step();
|
||||
}
|
||||
info("ToDo-Liste fertig abgearbeitet");
|
||||
|
||||
} // end
|
||||
// Ende Methoden
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ import graph.*;
|
|||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class GraphAlgo_DominatingSetGreedyA extends GraphAlgo_DominatingSetGreedy {
|
||||
public class GraphAlgo_DominatingSetGreedyA extends GraphAlgo {
|
||||
|
||||
// Anfang Attribute
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ public class GraphAlgo_DominatingSetGreedyA extends GraphAlgo_DominatingSetGreed
|
|||
/** Bestimmt besten Knoten nach Strategie:
|
||||
* Nimm den Knoten mit den meisten Nachbarn
|
||||
*/
|
||||
public Knoten bestimmeBesten() {
|
||||
private Knoten bestimmeBesten() {
|
||||
List<Knoten> knoten = g.getAlleKnoten(k->!k.isMarkiert());
|
||||
|
||||
info("Wiederhole für jeden noch nicht markierten Knoten");
|
||||
|
|
@ -47,5 +47,32 @@ public class GraphAlgo_DominatingSetGreedyA extends GraphAlgo_DominatingSetGreed
|
|||
return bester;
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
public void fuehreAlgorithmusAus() {
|
||||
if (g.getAnzahlKnoten()==0) {
|
||||
return;
|
||||
}
|
||||
List<Knoten> knoten = g.getAlleKnoten(k->!k.isMarkiert() && !k.isBesucht());
|
||||
info("Solange es noch nicht überdeckte Knoten gibt, wiederhole...");
|
||||
int nr = 1;
|
||||
while(knoten.size() > 0) {
|
||||
info("Bestimme "+(nr++)+". hinzuzufügenden Knoten");
|
||||
infoIndentMore();
|
||||
Knoten bester = bestimmeBesten();
|
||||
bester.setMarkiert(true);
|
||||
bester.setBesucht(false);
|
||||
info("Markiere diesen Knoten ...");
|
||||
List<Knoten> nachbarn = g.getNachbarknoten(bester,kn->!kn.isMarkiert() && !kn.isBesucht());
|
||||
for(Knoten k : nachbarn) {
|
||||
k.setBesucht(true);
|
||||
}
|
||||
info("... und setze alle bisher nicht überdeckten Nachbarn auf besucht");
|
||||
knoten = g.getAlleKnoten(kn->!kn.isMarkiert() && !kn.isBesucht());
|
||||
step();
|
||||
infoIndentLess();
|
||||
}// end of while
|
||||
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import graph.*;
|
|||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class GraphAlgo_DominatingSetGreedyB extends GraphAlgo_DominatingSetGreedy {
|
||||
public class GraphAlgo_DominatingSetGreedyB extends GraphAlgo {
|
||||
|
||||
// Anfang Attribute
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ public class GraphAlgo_DominatingSetGreedyB extends GraphAlgo_DominatingSetGreed
|
|||
/** Bestimmt besten Knoten nach Strategie:
|
||||
* Nimm den Knoten mit den wenigsten Nachbarn
|
||||
*/
|
||||
protected Knoten bestimmeBesten() {
|
||||
private Knoten bestimmeBesten() {
|
||||
List<Knoten> knoten = g.getAlleKnoten(k->!k.isMarkiert());
|
||||
|
||||
info("Wiederhole für jeden noch nicht markierten Knoten");
|
||||
|
|
@ -46,4 +46,32 @@ public class GraphAlgo_DominatingSetGreedyB extends GraphAlgo_DominatingSetGreed
|
|||
return bester;
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
public void fuehreAlgorithmusAus() {
|
||||
if (g.getAnzahlKnoten()==0) {
|
||||
return;
|
||||
}
|
||||
List<Knoten> knoten = g.getAlleKnoten(k->!k.isMarkiert() && !k.isBesucht());
|
||||
info("Solange es noch nicht überdeckte Knoten gibt, wiederhole...");
|
||||
int nr = 1;
|
||||
while(knoten.size() > 0) {
|
||||
info("Bestimme "+(nr++)+". hinzuzufügenden Knoten");
|
||||
infoIndentMore();
|
||||
Knoten bester = bestimmeBesten();
|
||||
bester.setMarkiert(true);
|
||||
bester.setBesucht(false);
|
||||
info("Markiere diesen Knoten ...");
|
||||
List<Knoten> nachbarn = g.getNachbarknoten(bester,kn->!kn.isMarkiert() && !kn.isBesucht());
|
||||
for(Knoten k : nachbarn) {
|
||||
k.setBesucht(true);
|
||||
}
|
||||
info("... und setze alle bisher nicht überdeckten Nachbarn auf besucht");
|
||||
knoten = g.getAlleKnoten(kn->!kn.isMarkiert() && !kn.isBesucht());
|
||||
step();
|
||||
infoIndentLess();
|
||||
}// end of while
|
||||
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import graph.*;
|
|||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class GraphAlgo_DominatingSetGreedyC extends GraphAlgo_DominatingSetGreedy {
|
||||
public class GraphAlgo_DominatingSetGreedyC extends GraphAlgo {
|
||||
|
||||
// Anfang Attribute
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ public class GraphAlgo_DominatingSetGreedyC extends GraphAlgo_DominatingSetGreed
|
|||
/** Bestimmt besten Knoten nach Strategie:
|
||||
* Nimm den Knoten mit den meisten Nachbarn
|
||||
*/
|
||||
protected Knoten bestimmeBesten() {
|
||||
private Knoten bestimmeBesten() {
|
||||
List<Knoten> knoten = g.getAlleKnoten(k->!k.isMarkiert());
|
||||
|
||||
info("Wiederhole für jeden noch nicht markierten Knoten");
|
||||
|
|
@ -48,5 +48,32 @@ public class GraphAlgo_DominatingSetGreedyC extends GraphAlgo_DominatingSetGreed
|
|||
return bester;
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
public void fuehreAlgorithmusAus() {
|
||||
if (g.getAnzahlKnoten()==0) {
|
||||
return;
|
||||
}
|
||||
List<Knoten> knoten = g.getAlleKnoten(k->!k.isMarkiert() && !k.isBesucht());
|
||||
info("Solange es noch nicht überdeckte Knoten gibt, wiederhole...");
|
||||
int nr = 1;
|
||||
while(knoten.size() > 0) {
|
||||
info("Bestimme "+(nr++)+". hinzuzufügenden Knoten");
|
||||
infoIndentMore();
|
||||
Knoten bester = bestimmeBesten();
|
||||
bester.setMarkiert(true);
|
||||
bester.setBesucht(false);
|
||||
info("Markiere diesen Knoten ...");
|
||||
List<Knoten> nachbarn = g.getNachbarknoten(bester,kn->!kn.isMarkiert() && !kn.isBesucht());
|
||||
for(Knoten k : nachbarn) {
|
||||
k.setBesucht(true);
|
||||
}
|
||||
info("... und setze alle bisher nicht überdeckten Nachbarn auf besucht");
|
||||
knoten = g.getAlleKnoten(kn->!kn.isMarkiert() && !kn.isBesucht());
|
||||
step();
|
||||
infoIndentLess();
|
||||
}// end of while
|
||||
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import graph.*;
|
|||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class GraphAlgo_DominatingSetGreedyD extends GraphAlgo_DominatingSetGreedy {
|
||||
public class GraphAlgo_DominatingSetGreedyD extends GraphAlgo {
|
||||
|
||||
// Anfang Attribute
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ public class GraphAlgo_DominatingSetGreedyD extends GraphAlgo_DominatingSetGreed
|
|||
/** Bestimmt besten Knoten nach Strategie:
|
||||
* Nimm den Knoten mit den meisten Nachbarn
|
||||
*/
|
||||
protected Knoten bestimmeBesten() {
|
||||
private Knoten bestimmeBesten() {
|
||||
List<Knoten> knoten = g.getAlleKnoten(k->!k.isMarkiert());
|
||||
|
||||
info("Wiederhole für jeden noch nicht markierten Knoten");
|
||||
|
|
@ -48,4 +48,32 @@ public class GraphAlgo_DominatingSetGreedyD extends GraphAlgo_DominatingSetGreed
|
|||
return bester;
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
public void fuehreAlgorithmusAus() {
|
||||
if (g.getAnzahlKnoten()==0) {
|
||||
return;
|
||||
}
|
||||
List<Knoten> knoten = g.getAlleKnoten(k->!k.isMarkiert() && !k.isBesucht());
|
||||
info("Solange es noch nicht überdeckte Knoten gibt, wiederhole...");
|
||||
int nr = 1;
|
||||
while(knoten.size() > 0) {
|
||||
info("Bestimme "+(nr++)+". hinzuzufügenden Knoten");
|
||||
infoIndentMore();
|
||||
Knoten bester = bestimmeBesten();
|
||||
bester.setMarkiert(true);
|
||||
bester.setBesucht(false);
|
||||
info("Markiere diesen Knoten ...");
|
||||
List<Knoten> nachbarn = g.getNachbarknoten(bester,kn->!kn.isMarkiert() && !kn.isBesucht());
|
||||
for(Knoten k : nachbarn) {
|
||||
k.setBesucht(true);
|
||||
}
|
||||
info("... und setze alle bisher nicht überdeckten Nachbarn auf besucht");
|
||||
knoten = g.getAlleKnoten(kn->!kn.isMarkiert() && !kn.isBesucht());
|
||||
step();
|
||||
infoIndentLess();
|
||||
}// end of while
|
||||
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import graph.*;
|
|||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class GraphAlgo_DominatingSetGreedyE extends GraphAlgo_DominatingSetGreedy {
|
||||
public class GraphAlgo_DominatingSetGreedyE extends GraphAlgo {
|
||||
|
||||
// Anfang Attribute
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ public class GraphAlgo_DominatingSetGreedyE extends GraphAlgo_DominatingSetGreed
|
|||
* ein nicht abgedeckten Knoten, der von einem beliebigen schon ausgewählten Knoten die Entfernung 3 hat
|
||||
*/
|
||||
|
||||
protected Knoten bestimmeBesten() {
|
||||
private Knoten bestimmeBesten() {
|
||||
Random r= new Random();
|
||||
|
||||
List<Knoten> markierte = g.getAlleKnoten(k->k.isMarkiert() );
|
||||
|
|
@ -67,5 +67,32 @@ public class GraphAlgo_DominatingSetGreedyE extends GraphAlgo_DominatingSetGreed
|
|||
return bester;
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
public void fuehreAlgorithmusAus() {
|
||||
if (g.getAnzahlKnoten()==0) {
|
||||
return;
|
||||
}
|
||||
List<Knoten> knoten = g.getAlleKnoten(k->!k.isMarkiert() && !k.isBesucht());
|
||||
info("Solange es noch nicht überdeckte Knoten gibt, wiederhole...");
|
||||
int nr = 1;
|
||||
while(knoten.size() > 0) {
|
||||
info("Bestimme "+(nr++)+". hinzuzufügenden Knoten");
|
||||
infoIndentMore();
|
||||
Knoten bester = bestimmeBesten();
|
||||
bester.setMarkiert(true);
|
||||
bester.setBesucht(false);
|
||||
info("Markiere diesen Knoten ...");
|
||||
List<Knoten> nachbarn = g.getNachbarknoten(bester,kn->!kn.isMarkiert() && !kn.isBesucht());
|
||||
for(Knoten k : nachbarn) {
|
||||
k.setBesucht(true);
|
||||
}
|
||||
info("... und setze alle bisher nicht überdeckten Nachbarn auf besucht");
|
||||
knoten = g.getAlleKnoten(kn->!kn.isMarkiert() && !kn.isBesucht());
|
||||
step();
|
||||
infoIndentLess();
|
||||
}// end of while
|
||||
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import graph.*;
|
|||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class GraphAlgo_DominatingSetGreedyF extends GraphAlgo_DominatingSetGreedy {
|
||||
public class GraphAlgo_DominatingSetGreedyF extends GraphAlgo {
|
||||
|
||||
// Anfang Attribute
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ public class GraphAlgo_DominatingSetGreedyF extends GraphAlgo_DominatingSetGreed
|
|||
* ein nicht abgedeckten Knoten, der von einem beliebigen schon ausgewählten Knoten die Entfernung 3 hat
|
||||
*/
|
||||
|
||||
protected Knoten bestimmeBesten() {
|
||||
private Knoten bestimmeBesten() {
|
||||
Random r= new Random();
|
||||
|
||||
List<Knoten> markierte = g.getAlleKnoten(k->k.isMarkiert() );
|
||||
|
|
@ -67,4 +67,32 @@ public class GraphAlgo_DominatingSetGreedyF extends GraphAlgo_DominatingSetGreed
|
|||
return bester;
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
public void fuehreAlgorithmusAus() {
|
||||
if (g.getAnzahlKnoten()==0) {
|
||||
return;
|
||||
}
|
||||
List<Knoten> knoten = g.getAlleKnoten(k->!k.isMarkiert() && !k.isBesucht());
|
||||
info("Solange es noch nicht überdeckte Knoten gibt, wiederhole...");
|
||||
int nr = 1;
|
||||
while(knoten.size() > 0) {
|
||||
info("Bestimme "+(nr++)+". hinzuzufügenden Knoten");
|
||||
infoIndentMore();
|
||||
Knoten bester = bestimmeBesten();
|
||||
bester.setMarkiert(true);
|
||||
bester.setBesucht(false);
|
||||
info("Markiere diesen Knoten ...");
|
||||
List<Knoten> nachbarn = g.getNachbarknoten(bester,kn->!kn.isMarkiert() && !kn.isBesucht());
|
||||
for(Knoten k : nachbarn) {
|
||||
k.setBesucht(true);
|
||||
}
|
||||
info("... und setze alle bisher nicht überdeckten Nachbarn auf besucht");
|
||||
knoten = g.getAlleKnoten(kn->!kn.isMarkiert() && !kn.isBesucht());
|
||||
step();
|
||||
infoIndentLess();
|
||||
}// end of while
|
||||
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import graph.*;
|
|||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class GraphAlgo_DominatingSetGreedyG extends GraphAlgo_DominatingSetGreedy {
|
||||
public class GraphAlgo_DominatingSetGreedyG extends GraphAlgo {
|
||||
|
||||
// Anfang Attribute
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ public class GraphAlgo_DominatingSetGreedyG extends GraphAlgo_DominatingSetGreed
|
|||
* ein nicht abgedeckten Knoten, der von einem beliebigen schon ausgewählten Knoten die Entfernung 3 hat
|
||||
*/
|
||||
|
||||
protected Knoten bestimmeBesten() {
|
||||
private Knoten bestimmeBesten() {
|
||||
Random r= new Random();
|
||||
|
||||
List<Knoten> markierte = g.getAlleKnoten(k->k.isMarkiert() );
|
||||
|
|
@ -67,4 +67,32 @@ public class GraphAlgo_DominatingSetGreedyG extends GraphAlgo_DominatingSetGreed
|
|||
return bester;
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
public void fuehreAlgorithmusAus() {
|
||||
if (g.getAnzahlKnoten()==0) {
|
||||
return;
|
||||
}
|
||||
List<Knoten> knoten = g.getAlleKnoten(k->!k.isMarkiert() && !k.isBesucht());
|
||||
info("Solange es noch nicht überdeckte Knoten gibt, wiederhole...");
|
||||
int nr = 1;
|
||||
while(knoten.size() > 0) {
|
||||
info("Bestimme "+(nr++)+". hinzuzufügenden Knoten");
|
||||
infoIndentMore();
|
||||
Knoten bester = bestimmeBesten();
|
||||
bester.setMarkiert(true);
|
||||
bester.setBesucht(false);
|
||||
info("Markiere diesen Knoten ...");
|
||||
List<Knoten> nachbarn = g.getNachbarknoten(bester,kn->!kn.isMarkiert() && !kn.isBesucht());
|
||||
for(Knoten k : nachbarn) {
|
||||
k.setBesucht(true);
|
||||
}
|
||||
info("... und setze alle bisher nicht überdeckten Nachbarn auf besucht");
|
||||
knoten = g.getAlleKnoten(kn->!kn.isMarkiert() && !kn.isBesucht());
|
||||
step();
|
||||
infoIndentLess();
|
||||
}// end of while
|
||||
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import graph.*;
|
|||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class GraphAlgo_DominatingSetGreedyH extends GraphAlgo_DominatingSetGreedy {
|
||||
public class GraphAlgo_DominatingSetGreedyH extends GraphAlgo {
|
||||
|
||||
// Anfang Attribute
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ public class GraphAlgo_DominatingSetGreedyH extends GraphAlgo_DominatingSetGreed
|
|||
/** Bestimmt besten Knoten nach Strategie:
|
||||
* ein nicht abgedeckten Knoten, der von möglichst vielen schon ausgewählten Knoten die Entfernung 3 hat
|
||||
*/
|
||||
protected Knoten bestimmeBesten() {
|
||||
private Knoten bestimmeBesten() {
|
||||
Random r = new Random();
|
||||
List<Knoten> markierte = g.getAlleKnoten(k->k.isMarkiert() );
|
||||
List<Knoten> nichtabgedeckte = g.getAlleKnoten(k->!k.isMarkiert() && !k.isBesucht() );
|
||||
|
|
@ -70,4 +70,32 @@ public class GraphAlgo_DominatingSetGreedyH extends GraphAlgo_DominatingSetGreed
|
|||
return bester;
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
public void fuehreAlgorithmusAus() {
|
||||
if (g.getAnzahlKnoten()==0) {
|
||||
return;
|
||||
}
|
||||
List<Knoten> knoten = g.getAlleKnoten(k->!k.isMarkiert() && !k.isBesucht());
|
||||
info("Solange es noch nicht überdeckte Knoten gibt, wiederhole...");
|
||||
int nr = 1;
|
||||
while(knoten.size() > 0) {
|
||||
info("Bestimme "+(nr++)+". hinzuzufügenden Knoten");
|
||||
infoIndentMore();
|
||||
Knoten bester = bestimmeBesten();
|
||||
bester.setMarkiert(true);
|
||||
bester.setBesucht(false);
|
||||
info("Markiere diesen Knoten ...");
|
||||
List<Knoten> nachbarn = g.getNachbarknoten(bester,kn->!kn.isMarkiert() && !kn.isBesucht());
|
||||
for(Knoten k : nachbarn) {
|
||||
k.setBesucht(true);
|
||||
}
|
||||
info("... und setze alle bisher nicht überdeckten Nachbarn auf besucht");
|
||||
knoten = g.getAlleKnoten(kn->!kn.isMarkiert() && !kn.isBesucht());
|
||||
step();
|
||||
infoIndentLess();
|
||||
}// end of while
|
||||
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import graph.*;
|
|||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class GraphAlgo_DominatingSetGreedyI extends GraphAlgo_DominatingSetGreedy {
|
||||
public class GraphAlgo_DominatingSetGreedyI extends GraphAlgo {
|
||||
|
||||
// Anfang Attribute
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ public class GraphAlgo_DominatingSetGreedyI extends GraphAlgo_DominatingSetGreed
|
|||
* ein nicht abgedeckten Knoten, der von den ausgewählten Knoten eine möglichst große Entfernung hat
|
||||
*/
|
||||
|
||||
protected Knoten bestimmeBesten() {
|
||||
private Knoten bestimmeBesten() {
|
||||
Random r = new Random();
|
||||
List<Knoten> markierte = g.getAlleKnoten(k->k.isMarkiert() );
|
||||
List<Knoten> nichtabgedeckte = g.getAlleKnoten(k->!k.isMarkiert() && !k.isBesucht() );
|
||||
|
|
@ -82,4 +82,33 @@ public class GraphAlgo_DominatingSetGreedyI extends GraphAlgo_DominatingSetGreed
|
|||
return bester;
|
||||
}
|
||||
|
||||
|
||||
// Anfang Methoden
|
||||
public void fuehreAlgorithmusAus() {
|
||||
if (g.getAnzahlKnoten()==0) {
|
||||
return;
|
||||
}
|
||||
List<Knoten> knoten = g.getAlleKnoten(k->!k.isMarkiert() && !k.isBesucht());
|
||||
info("Solange es noch nicht überdeckte Knoten gibt, wiederhole...");
|
||||
int nr = 1;
|
||||
while(knoten.size() > 0) {
|
||||
info("Bestimme "+(nr++)+". hinzuzufügenden Knoten");
|
||||
infoIndentMore();
|
||||
Knoten bester = bestimmeBesten();
|
||||
bester.setMarkiert(true);
|
||||
bester.setBesucht(false);
|
||||
info("Markiere diesen Knoten ...");
|
||||
List<Knoten> nachbarn = g.getNachbarknoten(bester,kn->!kn.isMarkiert() && !kn.isBesucht());
|
||||
for(Knoten k : nachbarn) {
|
||||
k.setBesucht(true);
|
||||
}
|
||||
info("... und setze alle bisher nicht überdeckten Nachbarn auf besucht");
|
||||
knoten = g.getAlleKnoten(kn->!kn.isMarkiert() && !kn.isBesucht());
|
||||
step();
|
||||
infoIndentLess();
|
||||
}// end of while
|
||||
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,18 +23,18 @@ dependency7.type=UsesDependency
|
|||
dependency8.from=GraphAlgo_DominatingSetGreedyH
|
||||
dependency8.to=GraphAlgo_Moore
|
||||
dependency8.type=UsesDependency
|
||||
objectbench.height=157
|
||||
objectbench.width=1896
|
||||
objectbench.height=140
|
||||
objectbench.width=750
|
||||
package.divider.horizontal=0.6003172085646312
|
||||
package.divider.vertical=0.829698857736241
|
||||
package.editor.height=792
|
||||
package.editor.width=1774
|
||||
package.editor.x=1919
|
||||
package.editor.y=0
|
||||
package.frame.height=1054
|
||||
package.frame.width=1922
|
||||
package.divider.vertical=0.822463768115942
|
||||
package.editor.height=661
|
||||
package.editor.width=1133
|
||||
package.editor.x=234
|
||||
package.editor.y=49
|
||||
package.frame.height=928
|
||||
package.frame.width=1297
|
||||
package.numDependencies=8
|
||||
package.numTargets=31
|
||||
package.numTargets=32
|
||||
package.showExtends=true
|
||||
package.showUses=true
|
||||
readme.height=60
|
||||
|
|
@ -46,21 +46,21 @@ target1.height=50
|
|||
target1.name=GraphAlgo_ColoringGreedyRandom
|
||||
target1.showInterface=false
|
||||
target1.type=ClassTarget
|
||||
target1.width=260
|
||||
target1.width=290
|
||||
target1.x=600
|
||||
target1.y=590
|
||||
target10.height=50
|
||||
target10.name=GraphAlgo_DominatingSetGreedyF
|
||||
target10.showInterface=false
|
||||
target10.type=ClassTarget
|
||||
target10.width=260
|
||||
target10.width=280
|
||||
target10.x=290
|
||||
target10.y=420
|
||||
target11.height=50
|
||||
target11.name=GraphAlgo_DominatingSetGreedyG
|
||||
target11.showInterface=false
|
||||
target11.type=ClassTarget
|
||||
target11.width=260
|
||||
target11.width=290
|
||||
target11.x=290
|
||||
target11.y=470
|
||||
target12.height=50
|
||||
|
|
@ -74,7 +74,7 @@ target13.height=50
|
|||
target13.name=GraphAlgo_DominatingSetGreedyD
|
||||
target13.showInterface=false
|
||||
target13.type=ClassTarget
|
||||
target13.width=260
|
||||
target13.width=290
|
||||
target13.x=290
|
||||
target13.y=320
|
||||
target14.height=50
|
||||
|
|
@ -88,35 +88,35 @@ target15.height=50
|
|||
target15.name=GraphAlgo_DominatingSetGreedyE
|
||||
target15.showInterface=false
|
||||
target15.type=ClassTarget
|
||||
target15.width=260
|
||||
target15.width=280
|
||||
target15.x=290
|
||||
target15.y=370
|
||||
target16.height=50
|
||||
target16.name=GraphAlgo_DominatingSetGenetisch
|
||||
target16.showInterface=false
|
||||
target16.type=ClassTarget
|
||||
target16.width=270
|
||||
target16.width=300
|
||||
target16.x=290
|
||||
target16.y=640
|
||||
target17.height=50
|
||||
target17.name=GraphAlgo_ZyklusBacktracking
|
||||
target17.showInterface=false
|
||||
target17.type=ClassTarget
|
||||
target17.width=230
|
||||
target17.width=210
|
||||
target17.x=20
|
||||
target17.y=640
|
||||
target17.y=410
|
||||
target18.height=50
|
||||
target18.name=GraphAlgo_DominatingSetGreedyH
|
||||
target18.showInterface=false
|
||||
target18.type=ClassTarget
|
||||
target18.width=260
|
||||
target18.width=290
|
||||
target18.x=290
|
||||
target18.y=520
|
||||
target19.height=50
|
||||
target19.name=GraphAlgo_DominatingSetGreedyI
|
||||
target19.showInterface=false
|
||||
target19.type=ClassTarget
|
||||
target19.width=250
|
||||
target19.width=280
|
||||
target19.x=290
|
||||
target19.y=570
|
||||
target2.height=50
|
||||
|
|
@ -125,40 +125,40 @@ target2.showInterface=false
|
|||
target2.type=ClassTarget
|
||||
target2.width=210
|
||||
target2.x=20
|
||||
target2.y=170
|
||||
target2.y=160
|
||||
target20.height=50
|
||||
target20.name=GraphAlgo_Moore
|
||||
target20.showInterface=false
|
||||
target20.type=ClassTarget
|
||||
target20.width=210
|
||||
target20.x=20
|
||||
target20.y=440
|
||||
target20.x=10
|
||||
target20.y=480
|
||||
target21.height=50
|
||||
target21.name=GraphAlgo_BellmanFord
|
||||
target21.showInterface=false
|
||||
target21.type=ClassTarget
|
||||
target21.width=210
|
||||
target21.x=20
|
||||
target21.y=560
|
||||
target21.x=10
|
||||
target21.y=660
|
||||
target22.height=50
|
||||
target22.name=GraphAlgo_Breitensuche
|
||||
target22.showInterface=false
|
||||
target22.type=ClassTarget
|
||||
target22.width=210
|
||||
target22.x=20
|
||||
target22.y=290
|
||||
target22.y=280
|
||||
target23.height=50
|
||||
target23.name=GraphAlgo_toplogischeSortierung
|
||||
target23.showInterface=false
|
||||
target23.type=ClassTarget
|
||||
target23.width=250
|
||||
target23.width=210
|
||||
target23.x=20
|
||||
target23.y=370
|
||||
target23.y=350
|
||||
target24.height=50
|
||||
target24.name=GraphAlgo_DominatingSetBacktracking
|
||||
target24.showInterface=false
|
||||
target24.type=ClassTarget
|
||||
target24.width=290
|
||||
target24.width=320
|
||||
target24.x=290
|
||||
target24.y=100
|
||||
target25.height=50
|
||||
|
|
@ -169,33 +169,33 @@ target25.width=240
|
|||
target25.x=600
|
||||
target25.y=530
|
||||
target26.height=50
|
||||
target26.name=GraphAlgo_EulerkreisExistenz
|
||||
target26.name=GraphAlgo_DijkstraMitVorgaenger
|
||||
target26.showInterface=false
|
||||
target26.type=ClassTarget
|
||||
target26.width=220
|
||||
target26.x=20
|
||||
target26.y=100
|
||||
target26.width=210
|
||||
target26.x=10
|
||||
target26.y=600
|
||||
target27.height=50
|
||||
target27.name=GraphAlgo_TSPGreedy2
|
||||
target27.name=GraphAlgo_EulerkreisExistenz
|
||||
target27.showInterface=false
|
||||
target27.type=ClassTarget
|
||||
target27.width=230
|
||||
target27.x=600
|
||||
target27.y=220
|
||||
target27.width=210
|
||||
target27.x=20
|
||||
target27.y=100
|
||||
target28.height=50
|
||||
target28.name=GraphAlgo_TiefensucheRek
|
||||
target28.showInterface=false
|
||||
target28.type=ClassTarget
|
||||
target28.width=210
|
||||
target28.x=20
|
||||
target28.y=230
|
||||
target28.y=220
|
||||
target29.height=50
|
||||
target29.name=GraphAlgo_ColoringBacktracking
|
||||
target29.name=GraphAlgo_TSPGreedy2
|
||||
target29.showInterface=false
|
||||
target29.type=ClassTarget
|
||||
target29.width=250
|
||||
target29.width=230
|
||||
target29.x=600
|
||||
target29.y=470
|
||||
target29.y=220
|
||||
target3.height=50
|
||||
target3.name=GraphAlgo_MST_Prim
|
||||
target3.showInterface=false
|
||||
|
|
@ -204,45 +204,52 @@ target3.width=230
|
|||
target3.x=890
|
||||
target3.y=100
|
||||
target30.height=50
|
||||
target30.name=GraphAlgo_Dijkstra
|
||||
target30.name=GraphAlgo_ColoringBacktracking
|
||||
target30.showInterface=false
|
||||
target30.type=ClassTarget
|
||||
target30.width=210
|
||||
target30.x=20
|
||||
target30.y=500
|
||||
target30.width=270
|
||||
target30.x=600
|
||||
target30.y=470
|
||||
target31.height=50
|
||||
target31.name=GraphAlgo_TSPGreedyOpt
|
||||
target31.name=GraphAlgo_Dijkstra
|
||||
target31.showInterface=false
|
||||
target31.type=ClassTarget
|
||||
target31.width=230
|
||||
target31.x=600
|
||||
target31.y=280
|
||||
target31.width=210
|
||||
target31.x=10
|
||||
target31.y=540
|
||||
target32.height=50
|
||||
target32.name=GraphAlgo_TSPGreedyOpt
|
||||
target32.showInterface=false
|
||||
target32.type=ClassTarget
|
||||
target32.width=230
|
||||
target32.x=600
|
||||
target32.y=280
|
||||
target4.height=50
|
||||
target4.name=GraphAlgo_TSPBacktracking
|
||||
target4.showInterface=false
|
||||
target4.type=ClassTarget
|
||||
target4.width=230
|
||||
target4.width=240
|
||||
target4.x=600
|
||||
target4.y=100
|
||||
target5.height=50
|
||||
target5.name=GraphAlgo_DominatingSetGreedyB
|
||||
target5.showInterface=false
|
||||
target5.type=ClassTarget
|
||||
target5.width=260
|
||||
target5.width=290
|
||||
target5.x=290
|
||||
target5.y=220
|
||||
target6.height=50
|
||||
target6.name=GraphAlgo
|
||||
target6.showInterface=false
|
||||
target6.type=AbstractTarget
|
||||
target6.width=90
|
||||
target6.width=100
|
||||
target6.x=310
|
||||
target6.y=10
|
||||
target7.height=50
|
||||
target7.name=GraphAlgo_DominatingSetGreedyC
|
||||
target7.showInterface=false
|
||||
target7.type=ClassTarget
|
||||
target7.width=260
|
||||
target7.width=290
|
||||
target7.x=290
|
||||
target7.y=270
|
||||
target8.height=50
|
||||
|
|
@ -256,6 +263,6 @@ target9.height=50
|
|||
target9.name=GraphAlgo_DominatingSetGreedyA
|
||||
target9.showInterface=false
|
||||
target9.type=ClassTarget
|
||||
target9.width=260
|
||||
target9.width=290
|
||||
target9.x=290
|
||||
target9.y=170
|
||||
|
|
|
|||
|
|
@ -22,5 +22,5 @@ Schweinefarm,124,239,4
|
|||
Metzger,171,404,5,6
|
||||
Kohlemine,425,441,7,8
|
||||
Erzmine,734,308,7
|
||||
Eisenschmelze,576,315,8
|
||||
Werkzeugmacher,401,258,0,4,5,6
|
||||
Eisenschmelze,552,336,8
|
||||
Werkzeugmacher,401,258,0,4,5,7
|
||||
|
Can't render this file because it contains an unexpected character in line 7 and column 33.
|
|
|
@ -3,7 +3,7 @@ showWeights,0
|
|||
# Knoteninfo anzeigen 1,Knoteninfo nicht anzeigen 0
|
||||
showInfoText,1
|
||||
# Knoten leer 0, Knotenname anzeigen 1, Wert des Knoten anzeigen 2
|
||||
vertexStyle,2
|
||||
vertexStyle,1
|
||||
# Bild im Hintergrund (bitte im "images"-Ordner ablegen) --> Dateiname angeben. Fall kein Bild bitte 0 schreiben!
|
||||
image,siedler.png
|
||||
#
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 7 and column 33.
|
3
config.csv
Normal file
3
config.csv
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
false,false
|
||||
272.0,138.0,1648.0,822.0
|
||||
H:\GitTest\3_vorlagen_tauschordner\1_graphentester\beispielgraphen\03_routenplanung\03_badenbaden.csv
|
||||
|
|
|
@ -3,6 +3,11 @@ package control;
|
|||
import imp.*;
|
||||
import graph.*;
|
||||
import algorithmen.*;
|
||||
import java.io.FileReader;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.FileWriter;
|
||||
|
||||
import javafx.fxml.*;
|
||||
import javafx.scene.control.*;
|
||||
|
|
@ -18,6 +23,7 @@ import java.io.File;
|
|||
import java.nio.file.*;
|
||||
import javafx.stage.FileChooser.ExtensionFilter;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.geometry.Rectangle2D;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -26,11 +32,14 @@ import javafx.collections.ObservableList;
|
|||
* Die Klasse Controller stellt den Controller des Hauptfensters / Menu dar.
|
||||
*
|
||||
* @author Thomas Schaller
|
||||
* @version v6.7 (9.12.2020)
|
||||
* @version 03.03.2023 (v7.1)
|
||||
* v7.0: Die aktuelle Bildschirmposition und der angezeigte Graph werden in config.csv abgelegt.
|
||||
* v7.1: Verzeichnisauswahl für Laden/Speichern verbessert
|
||||
*/
|
||||
|
||||
public class Controller {
|
||||
private String version = "6.8 (Februar 2021)";
|
||||
private String version = "7.0 (Februar 2023)";
|
||||
private String pfad; // Pfad der aktuell angezeigten Datei
|
||||
|
||||
@FXML
|
||||
private TabPane tpRekursionen;
|
||||
|
|
@ -74,8 +83,10 @@ public class Controller {
|
|||
private FileChooser dateidialog;
|
||||
private Graph graph;
|
||||
private GraphOptions options;
|
||||
private Stage stage;
|
||||
|
||||
public void initialize() {
|
||||
|
||||
dateidialog = new FileChooser();
|
||||
dateidialog.setInitialDirectory(new File("beispielgraphen"));
|
||||
|
||||
|
|
@ -85,6 +96,60 @@ public class Controller {
|
|||
tpRekursionen.getSelectionModel().selectedItemProperty().
|
||||
addListener((value, tabOld, tabNew) -> changeTab(tabOld, tabNew));
|
||||
|
||||
BufferedReader in =null;
|
||||
try{
|
||||
in = new BufferedReader(new FileReader("config.csv"));
|
||||
String fullScreen = in.readLine();
|
||||
String posSize = in.readLine();
|
||||
String[] ps = posSize.split(",");
|
||||
Rectangle2D ss = Screen.getPrimary().getBounds();
|
||||
|
||||
stage.setX(Double.parseDouble(ps[0]));
|
||||
stage.setY(Double.parseDouble(ps[1]));
|
||||
stage.setWidth(Math.min(Double.parseDouble(ps[2]), ss.getWidth()-Double.parseDouble(ps[0])));
|
||||
stage.setHeight(Math.min(Double.parseDouble(ps[3]), ss.getHeight()-Double.parseDouble(ps[1])));
|
||||
String[] fs = fullScreen.split(",");
|
||||
if(fs[0].equals("true")) stage.setFullScreen(true);
|
||||
if(fs[1].equals("true")) stage.setMaximized(true);
|
||||
pfad = in.readLine();
|
||||
File f = new File(pfad);
|
||||
f.getCanonicalPath();
|
||||
if(!pfad.isBlank() && f.exists()){
|
||||
graphLaden(pfad);
|
||||
dateidialog.setInitialDirectory((f.getAbsoluteFile()).getParentFile());
|
||||
} else {
|
||||
pfad = "";
|
||||
}
|
||||
}
|
||||
catch(Exception e) {
|
||||
pfad = "";
|
||||
dateidialog.setInitialDirectory(new File("beispielgraphen"));
|
||||
}
|
||||
finally{
|
||||
try{if(in != null) in.close();} catch(IOException e) {}
|
||||
showTitle();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void saveAktConfig() {
|
||||
PrintWriter pWriter = null;
|
||||
String s = "config.csv";
|
||||
try {
|
||||
pWriter = new PrintWriter(new FileWriter(s));
|
||||
pWriter.println(stage.isFullScreen()+","+stage.isMaximized());
|
||||
stage.setFullScreen(false);
|
||||
stage.setMaximized(false);
|
||||
pWriter.println(stage.getX()+","+stage.getY()+","+stage.getWidth()+","+ stage.getHeight());
|
||||
pWriter.println(pfad);
|
||||
} catch (IOException ioe) {
|
||||
ioe.printStackTrace();
|
||||
} finally {
|
||||
if (pWriter != null) {
|
||||
pWriter.flush();
|
||||
pWriter.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void changeTab(Tab tabOld, Tab tabNew) {
|
||||
|
|
@ -113,20 +178,26 @@ public class Controller {
|
|||
|
||||
}
|
||||
catch(Exception e) {
|
||||
System.out.println(e);
|
||||
// System.out.println(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void setStage(Stage s){
|
||||
stage = s;
|
||||
}
|
||||
|
||||
@FXML
|
||||
void mNeuerGraph(ActionEvent event) {
|
||||
while(tpRekursionen.getTabs().size()>1) tpRekursionen.getTabs().remove(1);
|
||||
|
||||
TabMitController tc = (TabMitController) (tpRekursionen.getTabs().get(0));
|
||||
options = new GraphOptions();
|
||||
|
||||
graph = new Graph();
|
||||
options = new GraphOptions(graph);
|
||||
tc.setGraph(graph, options);
|
||||
pfad = "";
|
||||
|
||||
showTitle();
|
||||
menuChangeAnsicht();
|
||||
}
|
||||
|
||||
|
|
@ -154,7 +225,7 @@ public class Controller {
|
|||
tpRekursionen.getSelectionModel().select(newtab);
|
||||
}
|
||||
catch(Exception e) {
|
||||
System.out.println(e);
|
||||
//System.out.println(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -173,7 +244,7 @@ public class Controller {
|
|||
tpRekursionen.getSelectionModel().select(newtab);
|
||||
}
|
||||
catch(Exception e) {
|
||||
System.out.println(e);
|
||||
// System.out.println(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -233,11 +304,12 @@ public class Controller {
|
|||
|
||||
@FXML
|
||||
public void mBeenden(ActionEvent event) {
|
||||
saveAktConfig();
|
||||
schliesseTabs();
|
||||
((Stage)tpRekursionen.getScene().getWindow()).close();
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
|
||||
void menuChangeAnsicht() {
|
||||
TabMitController tc = (TabMitController) (tpRekursionen.getSelectionModel().getSelectedItem());
|
||||
GraphOptions options = tc.getGraphOptions();
|
||||
|
|
@ -322,43 +394,74 @@ public class Controller {
|
|||
|
||||
@FXML
|
||||
void mOeffnen(ActionEvent event) {
|
||||
dateidialog.getExtensionFilters().clear();
|
||||
dateidialog.getExtensionFilters().add(new ExtensionFilter("Graph-Datei (*.csv)", "*.csv"));
|
||||
|
||||
File file = dateidialog.showOpenDialog(null);
|
||||
if (file != null) {
|
||||
graphLaden(file.getAbsolutePath());
|
||||
dateidialog.setInitialDirectory(file.getAbsoluteFile().getParentFile());
|
||||
}
|
||||
}
|
||||
|
||||
void graphLaden(String dateiname) {
|
||||
void graphLaden(String p) {
|
||||
|
||||
while(tpRekursionen.getTabs().size()>2) tpRekursionen.getTabs().remove(1);
|
||||
|
||||
TabMitController tc = (TabMitController) (tpRekursionen.getTabs().get(0));
|
||||
options = new GraphOptions();
|
||||
|
||||
Table csvParser = new Table(dateiname,"",',','"');
|
||||
options.ladeGraph(csvParser);
|
||||
graph = new Graph();
|
||||
graph.ladeGraph(csvParser);
|
||||
File f = new File(p);
|
||||
if(f.exists() ){
|
||||
pfad = p;
|
||||
|
||||
Table csvParser = new Table(pfad,"",',','"');
|
||||
|
||||
graph = new Graph();
|
||||
graph.ladeGraph(csvParser);
|
||||
|
||||
options = new GraphOptions(graph);
|
||||
options.ladeGraph(csvParser);
|
||||
|
||||
tc.setGraph(graph, options);
|
||||
if(tpRekursionen.getTabs().size()>1){
|
||||
tc = (TabMitController) (tpRekursionen.getTabs().get(1));
|
||||
tc.setGraph(graph, options);
|
||||
|
||||
if(tpRekursionen.getTabs().size()>1){
|
||||
tc = (TabMitController) (tpRekursionen.getTabs().get(1));
|
||||
tc.setGraph(graph, options);
|
||||
}
|
||||
}
|
||||
|
||||
menuChangeAnsicht();
|
||||
showTitle();
|
||||
|
||||
}
|
||||
|
||||
public void showTitle() {
|
||||
|
||||
if(stage!=null) {
|
||||
if(pfad == null || pfad.equals("")) {
|
||||
stage.setTitle("GraphTester by Thomas Schaller - Version "+version);
|
||||
} else {
|
||||
String[] arr = pfad.split("[/\\\\]");
|
||||
String dateiname = arr[arr.length-1];
|
||||
stage.setTitle("GraphTester by Thomas Schaller - Version "+version+" - "+dateiname);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@FXML
|
||||
void mSchliessen(ActionEvent event) {
|
||||
mNeuerGraph(event);
|
||||
mNeuerGraph(event);
|
||||
}
|
||||
|
||||
@FXML
|
||||
void mSpeichern(ActionEvent event) {
|
||||
dateidialog.getExtensionFilters().clear();
|
||||
dateidialog.getExtensionFilters().add(new ExtensionFilter("Graph-Datei (*.csv)", "*.csv"));
|
||||
dateidialog.getExtensionFilters().clear();
|
||||
dateidialog.getExtensionFilters().add(new ExtensionFilter("Graph-Datei (*.csv)", "*.csv"));
|
||||
if(!pfad.isBlank())
|
||||
dateidialog.setInitialFileName(new File(pfad).getName());
|
||||
else
|
||||
dateidialog.setInitialFileName("");
|
||||
|
||||
File file = dateidialog.showSaveDialog(null);
|
||||
if (file != null) {
|
||||
try{
|
||||
|
|
@ -371,7 +474,9 @@ public class Controller {
|
|||
String name = dateiName.substring(dateiName.lastIndexOf("\\")+1);
|
||||
if(name.contains(".")) dateiName = dateiName.substring(0, dateiName.lastIndexOf("."));
|
||||
Files.write(Paths.get(file.getAbsolutePath()), text.getBytes());
|
||||
|
||||
pfad = file.getAbsolutePath();
|
||||
dateidialog.setInitialDirectory(file.getAbsoluteFile().getParentFile());
|
||||
showTitle();
|
||||
} catch(Exception e) {
|
||||
|
||||
}
|
||||
|
|
@ -381,21 +486,22 @@ public class Controller {
|
|||
|
||||
@FXML
|
||||
void mBildExportieren(ActionEvent event) {
|
||||
dateidialog.getExtensionFilters().clear();
|
||||
dateidialog.getExtensionFilters().add(new ExtensionFilter("Bild des Graphen", "*.png","*.gif"));
|
||||
File file = dateidialog.showSaveDialog(null);
|
||||
dateidialog.getExtensionFilters().clear();
|
||||
dateidialog.getExtensionFilters().add(new ExtensionFilter("Bild des Graphen", "*.png","*.gif"));
|
||||
File file = dateidialog.showSaveDialog(null);
|
||||
if (file != null) {
|
||||
try{
|
||||
TabMitController tc = (TabMitController) (tpRekursionen.getSelectionModel().getSelectedItem());
|
||||
Picture p = tc.getViewer().updateImage();
|
||||
String dateiName = file.getAbsolutePath();
|
||||
p.save(dateiName);
|
||||
p.save(dateiName);
|
||||
|
||||
} catch(Exception e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@FXML
|
||||
void mUeber(ActionEvent event) {
|
||||
Alert alert = new Alert(AlertType.INFORMATION);
|
||||
|
|
|
|||
|
|
@ -25,13 +25,13 @@ import java.util.Optional;
|
|||
* zur Editierung eines Graphs dar.
|
||||
*
|
||||
* @author Thomas Schaller
|
||||
* @version v6.7 (9.12.2020)
|
||||
* @version 03.03.2023 (v7.1)
|
||||
* v7.1: Aktualisierung der Anzeige bei Wechsel gewichtet/ungewichtet angepasst
|
||||
* v6.9: Context-Menü schließt, wenn an andere Stelle geklickt wird
|
||||
*/
|
||||
|
||||
|
||||
public class EditTabMitController extends TabMitController {
|
||||
|
||||
|
||||
public EditTabMitController(Graph graph, GraphOptions options) {
|
||||
this.graph = graph;
|
||||
this.options = options;
|
||||
|
|
@ -127,6 +127,13 @@ public class EditTabMitController extends TabMitController {
|
|||
void setGewichtet(boolean gewichtet) {
|
||||
graph.setGewichtet(gewichtet);
|
||||
options.showEdgeWeights = gewichtet;
|
||||
if(graph.isGewichtet()) {
|
||||
options.kanteKurztext = new String[]{"Gewicht"};
|
||||
options.kanteLangtext = new String[]{"Gewicht","Markiert","Gelöscht"};
|
||||
} else {
|
||||
options.kanteKurztext = new String[]{};
|
||||
options.kanteLangtext = new String[]{"Markiert","Gelöscht"};
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
||||
|
|
@ -179,7 +186,6 @@ public class EditTabMitController extends TabMitController {
|
|||
|
||||
@FXML
|
||||
void graphClicked(MouseEvent event) { // MousePressed-Event
|
||||
|
||||
viewer.mouseClicked(event);
|
||||
viewer.mouseDown(event);
|
||||
if((viewer.getSelectedKnoten() != null || viewer.getSelectedKante() != null) && event.isSecondaryButtonDown()) { // Contextmenu
|
||||
|
|
@ -200,11 +206,13 @@ public class EditTabMitController extends TabMitController {
|
|||
if (viewer.getSelectedKnoten() != null)
|
||||
contextMenu.getItems().add( item3 );
|
||||
|
||||
contextMenu.show(viewer, event.getScreenX(), event.getScreenY());
|
||||
getViewer().setContextMenu(contextMenu);
|
||||
//contextMenu.show(viewer, event.getScreenX(), event.getScreenY());
|
||||
}
|
||||
}
|
||||
|
||||
public void mLoesche() {
|
||||
viewer.setContextMenu(null);
|
||||
if(viewer.getSelectedKnoten() != null) {
|
||||
graph.entferneKnoten(viewer.getSelectedKnoten());
|
||||
update();
|
||||
|
|
@ -216,6 +224,8 @@ public class EditTabMitController extends TabMitController {
|
|||
}
|
||||
|
||||
public void mWertAendern() {
|
||||
viewer.setContextMenu(null);
|
||||
|
||||
Knoten k = viewer.getSelectedKnoten();
|
||||
Kante ka = viewer.getSelectedKante();
|
||||
if(k != null || ka !=null) {
|
||||
|
|
@ -242,6 +252,8 @@ public class EditTabMitController extends TabMitController {
|
|||
}
|
||||
|
||||
public void mInfotextAendern() {
|
||||
viewer.setContextMenu(null);
|
||||
|
||||
Knoten k = viewer.getSelectedKnoten();
|
||||
if(k != null ) {
|
||||
TextInputDialog dialog = new TextInputDialog(k.getInfotext());
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@ import javafx.scene.text.*;
|
|||
import javafx.geometry.Pos;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.stage.*; // Dateiöffnen / Speichern-Dialog
|
||||
import javafx.application.Platform;
|
||||
import javafx.scene.input.Clipboard;
|
||||
import javafx.scene.input.ClipboardContent;
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
|
|
@ -23,11 +26,11 @@ import java.nio.file.*;
|
|||
import java.util.Collections;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.Iterator;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.regex.Pattern;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
import javafx.collections.ObservableList;
|
||||
|
||||
|
|
@ -37,9 +40,13 @@ import javafx.collections.ObservableList;
|
|||
* durchgeführt werden.
|
||||
*
|
||||
* @author Thomas Schaller
|
||||
* @version v6.7 (9.12.2020)
|
||||
* @version 03.03.2023 (v7.0)
|
||||
* v7.1: Fehler bei Aktualisierung des Hilfefensters behoben, Splitpane statt HBox
|
||||
* v7.0: Mechanismus geändert, so dass die init-Methode des Algorithmus beim Wechesel eines Algorithmus
|
||||
* aufgerufen wird, um die für diesen Algorithmus passenden Anzeigeeinstellungen zu setzen.
|
||||
* v6.9: Hilfefenster ist in Simulationsfenster integriert
|
||||
*/
|
||||
public class SimulationTabMitController extends TabMitController {
|
||||
public class SimulationTabMitController extends TabMitController implements Hilfe {
|
||||
|
||||
@FXML
|
||||
private ComboBox<String> cbAlgorithmen;
|
||||
|
|
@ -61,22 +68,23 @@ public class SimulationTabMitController extends TabMitController {
|
|||
|
||||
private GraphAlgo aktAlgo = null;
|
||||
private ArrayList<String> algoNamen;
|
||||
private Hilfefenster hilfe;
|
||||
private Hilfe hilfe;
|
||||
|
||||
public SimulationTabMitController(Graph graph, GraphOptions options) {
|
||||
this.graph = graph;
|
||||
this.options = options;
|
||||
this.setOnClosed((ev)->afterClosing());
|
||||
|
||||
}
|
||||
|
||||
public void initialize() {
|
||||
this.algoNamen = new ArrayList<String>();
|
||||
try {
|
||||
File verzeichnis = new File("algorithmen");
|
||||
if(verzeichnis != null) {
|
||||
String[] entries = verzeichnis.list();
|
||||
for (String name : entries) {
|
||||
if (name.startsWith("GraphAlgo_") && name.endsWith(".class")){
|
||||
|
||||
File verzeichnis = new File("algorithmen");
|
||||
if(verzeichnis != null && verzeichnis.isDirectory()) {
|
||||
String[] entries = verzeichnis.list();
|
||||
for (String name : entries) {
|
||||
if (name.startsWith("GraphAlgo_") && name.endsWith(".class")){
|
||||
try{
|
||||
Class c = Class.forName("algorithmen."+name.split(Pattern.quote("."))[0]);
|
||||
GraphAlgo a = ((GraphAlgo)(c).getDeclaredConstructor().newInstance());
|
||||
int i = 0;
|
||||
|
|
@ -87,13 +95,23 @@ public class SimulationTabMitController extends TabMitController {
|
|||
|
||||
algoNamen.add(i, "algorithmen."+name.split(Pattern.quote("."))[0]);
|
||||
}
|
||||
} // end of for
|
||||
}
|
||||
verzeichnis = new File( "eigeneAlgorithmen" );
|
||||
if(verzeichnis != null) {
|
||||
String[] entries = verzeichnis.list();
|
||||
for (String name : entries) {
|
||||
if (name.startsWith("GraphAlgo_") && name.endsWith(".class")){
|
||||
catch(ExceptionInInitializerError e) {}
|
||||
catch(LinkageError e){}
|
||||
catch(ClassNotFoundException e) {}
|
||||
catch(NoSuchMethodException e) {}
|
||||
catch(InstantiationException e) {}
|
||||
catch(IllegalAccessException e) {}
|
||||
catch(InvocationTargetException e) {}
|
||||
|
||||
}
|
||||
} // end of for
|
||||
}
|
||||
verzeichnis = new File( "eigeneAlgorithmen" );
|
||||
if(verzeichnis != null && verzeichnis.isDirectory()) {
|
||||
String[] entries = verzeichnis.list();
|
||||
for (String name : entries) {
|
||||
if (name.startsWith("GraphAlgo_") && name.endsWith(".class")){
|
||||
try{
|
||||
Class c = Class.forName("eigeneAlgorithmen."+name.split(Pattern.quote("."))[0]);
|
||||
GraphAlgo a = ((GraphAlgo)(c).getDeclaredConstructor().newInstance());
|
||||
int i = 0;
|
||||
|
|
@ -104,13 +122,22 @@ public class SimulationTabMitController extends TabMitController {
|
|||
|
||||
algoNamen.add(i, "eigeneAlgorithmen."+name.split(Pattern.quote("."))[0]);
|
||||
}
|
||||
} // end of for
|
||||
}
|
||||
} catch(Exception e)
|
||||
{
|
||||
System.out.println("Exception " + e);
|
||||
catch(ExceptionInInitializerError e) {}
|
||||
catch(LinkageError e){}
|
||||
catch(ClassNotFoundException e) {}
|
||||
catch(NoSuchMethodException e) {}
|
||||
catch(InstantiationException e) {}
|
||||
catch(IllegalAccessException e) {}
|
||||
catch(InvocationTargetException e) {}
|
||||
|
||||
}
|
||||
} // end of for
|
||||
}
|
||||
|
||||
cbAlgorithmen.getSelectionModel().selectedItemProperty().addListener((options, oldValue, newValue) -> {
|
||||
changeAlgorithm();
|
||||
});
|
||||
|
||||
viewer.setGraph(graph,options);
|
||||
this.hilfe = null;
|
||||
this.aktAlgo = null;
|
||||
|
|
@ -120,44 +147,39 @@ public class SimulationTabMitController extends TabMitController {
|
|||
bStart.managedProperty().bind(bStart.visibleProperty());
|
||||
bBreak.managedProperty().bind(bBreak.visibleProperty());
|
||||
bBreak.setVisible(false);
|
||||
}
|
||||
|
||||
private void afterClosing() {
|
||||
if (hilfe != null) hilfe.close();
|
||||
}
|
||||
//------------- Hilfefunktion
|
||||
loescheAlles();
|
||||
zustaende = new ArrayList<List<String>>();
|
||||
aktuell = null;
|
||||
reviewAllowed = false;
|
||||
tvAblauf.getSelectionModel().selectedIndexProperty().addListener((obs,oldValue, newValue)->showState());
|
||||
|
||||
private void hilfefensterErzeugen() {
|
||||
try { // try-catch ist notwendig, um Fehler durch fehlende Dateien abzufangen.
|
||||
if(hilfe != null) hilfe.close();
|
||||
|
||||
hilfe = new Hilfefenster();
|
||||
FXMLLoader loader = new FXMLLoader(getClass().getResource("/view/hilfefenster.fxml"));
|
||||
loader.setController(hilfe);
|
||||
Scene scene = new Scene((VBox) loader.load());
|
||||
Image icon = new Image("/view/icon.png");
|
||||
hilfe.getIcons().add(icon);
|
||||
hilfe.setTitle("Hilfefenster");
|
||||
hilfe.setScene(scene);
|
||||
hilfe.setX(0);
|
||||
hilfe.setY(0);
|
||||
}
|
||||
catch(Exception e) {
|
||||
System.out.println(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void showHilfe(boolean b) {
|
||||
if(b) {
|
||||
hilfefensterErzeugen();
|
||||
hilfe.show();
|
||||
if(aktAlgo != null && aktAlgo.isAlive()) {
|
||||
lAblauf.setVisible(true);
|
||||
tvAblauf.setVisible(true);
|
||||
bClipboard.setVisible(true);
|
||||
|
||||
hilfe = this;
|
||||
if(aktAlgo != null ) {
|
||||
aktAlgo.setGUIElemente(viewer,hilfe);
|
||||
hilfe.append("Unvollständiger Ablauf");
|
||||
if(aktAlgo.isAlive())
|
||||
hilfe.append("Unvollständiger Ablauf");
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (hilfe != null) hilfe.close();
|
||||
lAblauf.setVisible(false);
|
||||
tvAblauf.setVisible(false);
|
||||
bClipboard.setVisible(false);
|
||||
if(aktAlgo != null && aktAlgo.isAlive()) aktAlgo.setGUIElemente(viewer, null);
|
||||
hilfe = null;
|
||||
loescheAlles();
|
||||
zustaende = new ArrayList<List<String>>();
|
||||
aktuell = null;
|
||||
reviewAllowed = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -166,48 +188,56 @@ public class SimulationTabMitController extends TabMitController {
|
|||
mReset(null);
|
||||
}
|
||||
|
||||
@FXML
|
||||
void mReset(ActionEvent event) {
|
||||
public void changeAlgorithm() {
|
||||
if(aktAlgo != null && aktAlgo.isAlive()) aktAlgo.stop();
|
||||
graph.initialisiereAlleKnoten();
|
||||
graph.initialisiereAlleKanten();
|
||||
update();
|
||||
//gp.setInfoText(gp.getGraph().toString());
|
||||
|
||||
bStep.setDisable(false);
|
||||
bStart.setDisable(false);
|
||||
bStart.setVisible(true);
|
||||
bBreak.setVisible(false);
|
||||
if (hilfe != null) hilfe.loescheAlles();
|
||||
this.aktAlgo = null;
|
||||
|
||||
if(cbAlgorithmen.getSelectionModel().getSelectedIndex() >= 0) {
|
||||
|
||||
try{
|
||||
ClassLoader parentClassLoader = MyClassLoader.class.getClassLoader();
|
||||
MyClassLoader classLoader = new MyClassLoader(parentClassLoader);
|
||||
Class c = classLoader.loadClass(algoNamen.get(cbAlgorithmen.getSelectionModel().getSelectedIndex()));
|
||||
|
||||
aktAlgo = ((GraphAlgo)(c).getDeclaredConstructor().newInstance());
|
||||
aktAlgo.setStartKnoten(viewer.getSelectedKnoten());
|
||||
aktAlgo.setGUIElemente(viewer, hilfe);
|
||||
aktAlgo.setSpeed(910-(int) (sSpeed.getValue()));
|
||||
aktAlgo.init();
|
||||
} catch( Exception e) {
|
||||
System.out.println(e);
|
||||
}
|
||||
}
|
||||
|
||||
update();
|
||||
|
||||
}
|
||||
|
||||
@FXML
|
||||
void mReset(ActionEvent event) {
|
||||
|
||||
changeAlgorithm();
|
||||
}
|
||||
|
||||
@FXML
|
||||
void mStep(ActionEvent event) {
|
||||
|
||||
if (aktAlgo == null ) {
|
||||
if(cbAlgorithmen.getSelectionModel().getSelectedIndex() >= 0) {
|
||||
try{
|
||||
ClassLoader parentClassLoader = MyClassLoader.class.getClassLoader();
|
||||
MyClassLoader classLoader = new MyClassLoader(parentClassLoader);
|
||||
Class c = classLoader.loadClass(algoNamen.get(cbAlgorithmen.getSelectionModel().getSelectedIndex()));
|
||||
|
||||
aktAlgo = ((GraphAlgo)(c).getDeclaredConstructor().newInstance());
|
||||
aktAlgo.setStartKnoten(viewer.getSelectedKnoten());
|
||||
aktAlgo.setGUIElemente(viewer, hilfe);
|
||||
aktAlgo.setSpeed(910-(int) (sSpeed.getValue()));
|
||||
} catch( Exception e) {
|
||||
System.out.println(e);
|
||||
}
|
||||
aktAlgo.start();
|
||||
}
|
||||
if (aktAlgo == null) return;
|
||||
if (aktAlgo.getState() == Thread.State.NEW ) {
|
||||
aktAlgo.setStartKnoten(viewer.getSelectedKnoten());
|
||||
aktAlgo.start();
|
||||
} else {
|
||||
if(aktAlgo.isAlive()) {
|
||||
aktAlgo.setSpeed(910-(int) (sSpeed.getValue()));
|
||||
aktAlgo.setWaitforclick(false);
|
||||
//gp.setInfoText(aktAlgo.getInfo());
|
||||
|
||||
} else {
|
||||
//gp.setInfoText("Algorithmus ist beendet. "+aktAlgo.getInfo());
|
||||
bStep.setDisable(true);
|
||||
bStart.setDisable(true);
|
||||
bBreak.setDisable(true);
|
||||
|
|
@ -218,7 +248,6 @@ public class SimulationTabMitController extends TabMitController {
|
|||
} catch(Exception e) {}
|
||||
|
||||
if (!aktAlgo.isAlive()) {
|
||||
//gp.setInfoText("Algorithmus ist beendet"+aktAlgo.getInfo());
|
||||
bStep.setDisable(true);
|
||||
bStart.setDisable(true);
|
||||
bBreak.setDisable(true);
|
||||
|
|
@ -227,41 +256,19 @@ public class SimulationTabMitController extends TabMitController {
|
|||
|
||||
@FXML
|
||||
void mStart(ActionEvent event) {
|
||||
|
||||
if (aktAlgo == null ) {
|
||||
if(cbAlgorithmen.getSelectionModel().getSelectedIndex() >= 0) {
|
||||
try{
|
||||
ClassLoader parentClassLoader = MyClassLoader.class.getClassLoader();
|
||||
MyClassLoader classLoader = new MyClassLoader(parentClassLoader);
|
||||
Class c = classLoader.loadClass(algoNamen.get(cbAlgorithmen.getSelectionModel().getSelectedIndex()));
|
||||
|
||||
aktAlgo = ((GraphAlgo)(c).getDeclaredConstructor().newInstance());
|
||||
|
||||
aktAlgo.setStartKnoten(viewer.getSelectedKnoten());
|
||||
aktAlgo.setGUIElemente(viewer,hilfe);
|
||||
aktAlgo.setSpeed(910-(int) (sSpeed.getValue()));
|
||||
|
||||
} catch( Exception e) {
|
||||
System.out.println(e);
|
||||
}
|
||||
|
||||
aktAlgo.setStepping(false);
|
||||
aktAlgo.start();
|
||||
}
|
||||
if (aktAlgo == null) return;
|
||||
if (aktAlgo.getState() == Thread.State.NEW ) {
|
||||
aktAlgo.setStartKnoten(viewer.getSelectedKnoten());
|
||||
aktAlgo.setStepping(false);
|
||||
aktAlgo.start();
|
||||
} else {
|
||||
if(aktAlgo.isAlive()) {
|
||||
aktAlgo.setSpeed(910-(int) (sSpeed.getValue()));
|
||||
aktAlgo.setStepping(false);
|
||||
aktAlgo.setWaitforclick(false);
|
||||
//gp.setInfoText(aktAlgo.getInfo());
|
||||
|
||||
} else {
|
||||
//gp.setInfoText("Algorithmus ist beendet. "+aktAlgo.getInfo());
|
||||
|
||||
} // end of if-else
|
||||
}
|
||||
} // end of if-else
|
||||
|
||||
// gp.setInfoText(aktAlgo.getInfo());
|
||||
bStep.setDisable(true);
|
||||
bStart.setVisible(false);
|
||||
bBreak.setVisible(true);
|
||||
|
|
@ -277,4 +284,151 @@ public class SimulationTabMitController extends TabMitController {
|
|||
bStep.setDisable(false);
|
||||
}
|
||||
}
|
||||
|
||||
// --------- Hilfefenster --------------------------------------------
|
||||
@FXML
|
||||
private TreeView<String> tvAblauf;
|
||||
|
||||
@FXML
|
||||
private Label lAblauf;
|
||||
|
||||
@FXML
|
||||
private Button bClipboard;
|
||||
|
||||
private List<TreeItem<String>> stufen;
|
||||
private List<List<String>> zustaende;
|
||||
private TreeItem<String> last;
|
||||
private GraphPlotter gp;
|
||||
private List<String> aktuell;
|
||||
private boolean reviewAllowed;
|
||||
|
||||
public void setGraphPlotter(GraphPlotter gp) {
|
||||
this.gp = gp;
|
||||
}
|
||||
|
||||
public void loescheAlles() {
|
||||
Platform.runLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
stufen = new ArrayList<TreeItem<String>>();
|
||||
zustaende = new ArrayList<List<String>>();
|
||||
TreeItem<String> root = new TreeItem<String>("Algorithmus");
|
||||
root.setExpanded(true);
|
||||
last = root;
|
||||
tvAblauf.setRoot(root);
|
||||
tvAblauf.setShowRoot(false);
|
||||
stufen.add(root);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void append(String text) {
|
||||
List<String> status = gp.getGraph().getStatus();
|
||||
Platform.runLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
last = new TreeItem<String>(text);
|
||||
stufen.get(stufen.size()-1).getChildren().add(last);
|
||||
zustaende.add(status);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void indentMore() {
|
||||
Platform.runLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if(stufen.size() == 1) { // Hauptknoten
|
||||
TreeItem parent = stufen.get(0);
|
||||
List<TreeItem> children = parent.getChildren();
|
||||
for(int i=children.size()-1; i >= 0; i--) {
|
||||
TreeItem t = children.get(i);
|
||||
if(t.isExpanded()) {
|
||||
t.setExpanded(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
stufen.add(last);
|
||||
last.setExpanded(true);
|
||||
last.expandedProperty().addListener((b, o, n) -> showState());
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void indentLess() {
|
||||
Platform.runLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if(stufen.size() > 1) stufen.remove(stufen.size()-1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void setReviewAllowed(boolean a) {
|
||||
this.reviewAllowed = a;
|
||||
if(!reviewAllowed) tvAblauf.getSelectionModel().clearSelection();
|
||||
}
|
||||
|
||||
public void showState() {
|
||||
Platform.runLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if(reviewAllowed && tvAblauf.getSelectionModel().getSelectedIndex()>=0) {
|
||||
TreeItem s = tvAblauf.getSelectionModel().getSelectedItem();
|
||||
if(!s.isExpanded()) { // suche das letzte Kind
|
||||
while(s.getChildren().size()>0){
|
||||
List<TreeItem> c = s.getChildren();
|
||||
s = c.get(c.size()-1);
|
||||
}
|
||||
}
|
||||
gp.getGraph().setStatus(zustaende.get(calculateIndex(tvAblauf.getRoot(), s ,0)-1));
|
||||
gp.updateImage();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private int calculateIndex(TreeItem t, TreeItem search, int nr) {
|
||||
if(t == search) return nr;
|
||||
nr++;
|
||||
List<TreeItem> children = t.getChildren();
|
||||
for(TreeItem c : children) {
|
||||
int i = calculateIndex(c, search, nr);
|
||||
if(i>0) return i;
|
||||
nr = -i;
|
||||
}
|
||||
return -nr;
|
||||
}
|
||||
|
||||
@FXML
|
||||
void bCopyClicked(ActionEvent event) {
|
||||
final Clipboard clipboard = Clipboard.getSystemClipboard();
|
||||
final ClipboardContent content = new ClipboardContent();
|
||||
String s = "";
|
||||
for(Object c : tvAblauf.getRoot().getChildren()) {
|
||||
if(c instanceof TreeItem) {
|
||||
s += generateClipboardContent((TreeItem) c, "");
|
||||
}
|
||||
}
|
||||
|
||||
content.putString(s);
|
||||
|
||||
clipboard.setContent(content);
|
||||
}
|
||||
|
||||
private String generateClipboardContent(TreeItem t, String tab) {
|
||||
String s = tab+t.getValue();
|
||||
for(Object c : t.getChildren()) {
|
||||
if(c instanceof TreeItem) {
|
||||
s += generateClipboardContent((TreeItem) c, tab+" ");
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,11 +7,13 @@ import javafx.fxml.*;
|
|||
import javafx.scene.control.*;
|
||||
import javafx.event.*;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.input.ContextMenuEvent;
|
||||
import javafx.scene.layout.*;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.text.*;
|
||||
import javafx.geometry.Pos;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.scene.control.Alert.AlertType;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -25,7 +27,8 @@ import javafx.collections.ObservableList;
|
|||
* oder eine Kante fokussiert.
|
||||
*
|
||||
* @author Thomas Schaller
|
||||
* @version v6.7 (9.12.2020)
|
||||
* @version 24.06.2021 (v6.9)
|
||||
* v6.9: Context-Menü für die ToDo-Liste: Knoten löschen
|
||||
*/
|
||||
|
||||
public class UnterTabMitController extends TabMitController {
|
||||
|
|
@ -33,7 +36,6 @@ public class UnterTabMitController extends TabMitController {
|
|||
@FXML
|
||||
private VBox infoBox;
|
||||
|
||||
|
||||
@FXML
|
||||
private Button wertButton;
|
||||
|
||||
|
|
@ -58,7 +60,6 @@ public class UnterTabMitController extends TabMitController {
|
|||
@FXML
|
||||
Button bStatus;
|
||||
|
||||
|
||||
@FXML
|
||||
Button bGehezu;
|
||||
|
||||
|
|
@ -94,12 +95,10 @@ public class UnterTabMitController extends TabMitController {
|
|||
|
||||
buildAuswahl();
|
||||
|
||||
|
||||
this.bAnfang.managedProperty().bind(bAnfang.visibleProperty());
|
||||
this.bEnde.managedProperty().bind(bEnde.visibleProperty());
|
||||
this.bSortieren.managedProperty().bind(bSortieren.visibleProperty());
|
||||
|
||||
|
||||
viewer.setGraph(graph,options);
|
||||
viewer.setHvalue(0.5);
|
||||
viewer.setVvalue(0.5);
|
||||
|
|
@ -141,8 +140,8 @@ public class UnterTabMitController extends TabMitController {
|
|||
|
||||
public void setGraph(Graph graph, GraphOptions options) {
|
||||
if(graph.getAnzahlKnoten()==0) {
|
||||
getTabPane().getTabs().remove(this);
|
||||
return;
|
||||
getTabPane().getTabs().remove(this);
|
||||
return;
|
||||
}
|
||||
options.fokusArt = this.options.fokusArt;
|
||||
options.auswahl = this.options.auswahl;
|
||||
|
|
@ -157,9 +156,7 @@ public class UnterTabMitController extends TabMitController {
|
|||
|
||||
}
|
||||
|
||||
|
||||
public void buildAuswahl() {
|
||||
|
||||
auswahl = new ArrayList<GraphElement>();
|
||||
if(options.auswahl == 0) { // Alle Knoten/Kanten gewählt
|
||||
if(options.fokusArt == 0) // Knoten
|
||||
|
|
@ -192,9 +189,9 @@ public class UnterTabMitController extends TabMitController {
|
|||
Knoten k = (Knoten) ge;
|
||||
String beschreibung="";
|
||||
if(options.showVertexInfo && !k.getInfotext().isEmpty())
|
||||
beschreibung = k.getInfotext();
|
||||
beschreibung = k.getInfotext();
|
||||
else
|
||||
beschreibung = "Knoten"+ graph.getNummer(k);
|
||||
beschreibung = "Knoten"+ graph.getNummer(k);
|
||||
|
||||
if(options.showVertexValue) {
|
||||
if(k.getDoubleWert() == k.getIntWert())
|
||||
|
|
@ -318,7 +315,7 @@ public class UnterTabMitController extends TabMitController {
|
|||
public void updateInfofeld() {
|
||||
GraphElement f = viewer.getRestrictTo();
|
||||
if( f instanceof Knoten) {
|
||||
this.setText(viewer.getGraph().getKnoteninfo((Knoten) f, false));
|
||||
this.setText(viewer.getGraph().getKnoteninfo((Knoten) f, false));
|
||||
}
|
||||
Knoten k = viewer.getSelectedKnoten();
|
||||
Kante ka = viewer.getSelectedKante();
|
||||
|
|
@ -441,6 +438,25 @@ public class UnterTabMitController extends TabMitController {
|
|||
}
|
||||
}
|
||||
|
||||
@FXML
|
||||
void toDoContextMenu(ContextMenuEvent event) {
|
||||
if(lvAuswahl.getSelectionModel().getSelectedIndex() >= 0) {
|
||||
|
||||
Alert alert =
|
||||
new Alert(AlertType.NONE,
|
||||
"Soll der Knoten aus der ToDo-Liste gelöscht werden?",
|
||||
ButtonType.OK,
|
||||
ButtonType.CANCEL);
|
||||
alert.setTitle("ToDo-Liste");
|
||||
Optional<ButtonType> result = alert.showAndWait();
|
||||
|
||||
if (result.get() == ButtonType.OK) {
|
||||
auswahl.remove(lvAuswahl.getSelectionModel().getSelectedIndex());
|
||||
fillLvAuswahl();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@FXML
|
||||
void bNaechster(ActionEvent event) {
|
||||
|
||||
|
|
@ -453,18 +469,18 @@ public class UnterTabMitController extends TabMitController {
|
|||
|
||||
// @FXML
|
||||
// void bListeAnpassen(ActionEvent event) {
|
||||
// buildAuswahl();
|
||||
// fillLvAuswahl();
|
||||
// buildAuswahl();
|
||||
// fillLvAuswahl();
|
||||
|
||||
// }
|
||||
|
||||
// @FXML
|
||||
// void bNeuerTab(ActionEvent event) {
|
||||
// GraphOptions neu = options.copy();
|
||||
// neu.parent = viewer.getRestrictTo();
|
||||
// if(neu.parent == null) neu.parent = viewer.getSelectedKnoten();
|
||||
// neu.bildAnzeigen = false;
|
||||
// tabOeffnen(neu);
|
||||
// GraphOptions neu = options.copy();
|
||||
// neu.parent = viewer.getRestrictTo();
|
||||
// if(neu.parent == null) neu.parent = viewer.getSelectedKnoten();
|
||||
// neu.bildAnzeigen = false;
|
||||
// tabOeffnen(neu);
|
||||
// }
|
||||
|
||||
@FXML
|
||||
|
|
|
|||
|
|
@ -3,34 +3,31 @@ dependency1.from=TabMitController
|
|||
dependency1.to=UnterTabMitController
|
||||
dependency1.type=UsesDependency
|
||||
dependency2.from=SimulationTabMitController
|
||||
dependency2.to=Hilfefenster
|
||||
dependency2.to=MyClassLoader
|
||||
dependency2.type=UsesDependency
|
||||
dependency3.from=SimulationTabMitController
|
||||
dependency3.to=MyClassLoader
|
||||
dependency3.from=Controller
|
||||
dependency3.to=TabMitController
|
||||
dependency3.type=UsesDependency
|
||||
dependency4.from=Controller
|
||||
dependency4.to=TabMitController
|
||||
dependency4.to=HauptTabMitController
|
||||
dependency4.type=UsesDependency
|
||||
dependency5.from=Controller
|
||||
dependency5.to=HauptTabMitController
|
||||
dependency5.to=SimulationTabMitController
|
||||
dependency5.type=UsesDependency
|
||||
dependency6.from=Controller
|
||||
dependency6.to=SimulationTabMitController
|
||||
dependency6.to=EditTabMitController
|
||||
dependency6.type=UsesDependency
|
||||
dependency7.from=Controller
|
||||
dependency7.to=EditTabMitController
|
||||
dependency7.type=UsesDependency
|
||||
objectbench.height=93
|
||||
objectbench.width=776
|
||||
objectbench.height=172
|
||||
objectbench.width=451
|
||||
package.divider.horizontal=0.599476439790576
|
||||
package.divider.vertical=0.8003992015968064
|
||||
package.editor.height=394
|
||||
package.editor.width=645
|
||||
package.editor.x=1056
|
||||
package.editor.y=332
|
||||
package.divider.vertical=0.642
|
||||
package.editor.height=314
|
||||
package.editor.width=636
|
||||
package.editor.x=1113
|
||||
package.editor.y=290
|
||||
package.frame.height=600
|
||||
package.frame.width=800
|
||||
package.numDependencies=7
|
||||
package.numDependencies=6
|
||||
package.numTargets=8
|
||||
package.showExtends=true
|
||||
package.showUses=true
|
||||
|
|
@ -40,26 +37,26 @@ readme.width=49
|
|||
readme.x=10
|
||||
readme.y=10
|
||||
target1.height=50
|
||||
target1.name=Hilfefenster
|
||||
target1.name=EditTabMitController
|
||||
target1.showInterface=false
|
||||
target1.type=ClassTarget
|
||||
target1.width=100
|
||||
target1.x=500
|
||||
target1.y=60
|
||||
target1.width=180
|
||||
target1.x=10
|
||||
target1.y=80
|
||||
target2.height=50
|
||||
target2.name=HauptTabMitController
|
||||
target2.showInterface=false
|
||||
target2.type=ClassTarget
|
||||
target2.width=170
|
||||
target2.width=200
|
||||
target2.x=10
|
||||
target2.y=140
|
||||
target3.height=50
|
||||
target3.name=EditTabMitController
|
||||
target3.height=70
|
||||
target3.name=Hilfefenster
|
||||
target3.showInterface=false
|
||||
target3.type=ClassTarget
|
||||
target3.width=160
|
||||
target3.width=120
|
||||
target3.x=10
|
||||
target3.y=80
|
||||
target3.y=210
|
||||
target4.height=50
|
||||
target4.name=TabMitController
|
||||
target4.showInterface=false
|
||||
|
|
@ -72,7 +69,7 @@ target5.name=SimulationTabMitController
|
|||
target5.showInterface=false
|
||||
target5.type=ClassTarget
|
||||
target5.width=200
|
||||
target5.x=10
|
||||
target5.x=210
|
||||
target5.y=210
|
||||
target6.height=50
|
||||
target6.name=Controller
|
||||
|
|
@ -93,5 +90,5 @@ target8.name=UnterTabMitController
|
|||
target8.showInterface=false
|
||||
target8.type=ClassTarget
|
||||
target8.width=170
|
||||
target8.x=10
|
||||
target8.x=220
|
||||
target8.y=270
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (11.0.2) on Fri Feb 12 09:02:01 CET 2021 -->
|
||||
<!-- Generated by javadoc (11.0.14.1) on Thu Apr 20 12:17:13 CEST 2023 -->
|
||||
<title>All Classes</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="dc.created" content="2021-02-12">
|
||||
<meta name="dc.created" content="2023-04-20">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
<h1 class="bar">All Classes</h1>
|
||||
<main role="main" class="indexContainer">
|
||||
<ul>
|
||||
<li><a href="graph/GraphPlotter.html" title="class in graph">GraphPlotter</a></li>
|
||||
<li><a href="graph/GraphElement.html" title="class in graph">GraphElement</a></li>
|
||||
</ul>
|
||||
</main>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (11.0.2) on Fri Feb 12 09:02:01 CET 2021 -->
|
||||
<!-- Generated by javadoc (11.0.14.1) on Thu Apr 20 12:17:13 CEST 2023 -->
|
||||
<title>Constant Field Values</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="dc.created" content="2021-02-12">
|
||||
<meta name="dc.created" content="2023-04-20">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
|
|
|
|||
1707
doc/graph/Graph.html
1707
doc/graph/Graph.html
File diff suppressed because it is too large
Load diff
|
|
@ -2,116 +2,33 @@
|
|||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (11.0.2) on Sat Jan 30 12:26:45 CET 2021 -->
|
||||
<title>GraphElement (1_graphentester)</title>
|
||||
<!-- Generated by javadoc (11.0.14.1) on Thu Apr 20 12:17:13 CEST 2023 -->
|
||||
<title>GraphElement</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="dc.created" content="2021-01-30">
|
||||
<meta name="dc.created" content="2023-04-20">
|
||||
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="../jquery/jquery-ui.css" title="Style">
|
||||
<script type="text/javascript" src="../script.js"></script>
|
||||
<script type="text/javascript" src="../jquery/jszip/dist/jszip.min.js"></script>
|
||||
<script type="text/javascript" src="../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
|
||||
<!--[if IE]>
|
||||
<script type="text/javascript" src="../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
|
||||
<![endif]-->
|
||||
<script type="text/javascript" src="../jquery/jquery-3.3.1.js"></script>
|
||||
<script type="text/javascript" src="../jquery/jquery-migrate-3.0.1.js"></script>
|
||||
<script type="text/javascript" src="../jquery/jquery-ui.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="GraphElement (1_graphentester)";
|
||||
parent.document.title="GraphElement";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
var data = {"i0":6,"i1":6,"i2":6};
|
||||
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
|
||||
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":6,"i5":6,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10};
|
||||
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "altColor";
|
||||
var rowColor = "rowColor";
|
||||
var tableTab = "tableTab";
|
||||
var activeTableTab = "activeTableTab";
|
||||
var pathtoroot = "../";
|
||||
var useModuleDirectories = true;
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<header role="banner">
|
||||
<nav role="navigation">
|
||||
<div class="fixedNav">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a id="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<a id="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../index-all.html">Index</a></li>
|
||||
<li><a href="../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../allclasses.html">All Classes</a></li>
|
||||
</ul>
|
||||
<ul class="navListSearch">
|
||||
<li><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
</div>
|
||||
<div class="navPadding"> </div>
|
||||
<script type="text/javascript"><!--
|
||||
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
//-->
|
||||
</script>
|
||||
</nav>
|
||||
</header>
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
|
|
@ -120,7 +37,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
|||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">java.lang.Object</a></li>
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>graph.GraphElement</li>
|
||||
|
|
@ -132,21 +49,19 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
|||
<li class="blockList">
|
||||
<dl>
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Comparable</a><<a href="GraphElement.html" title="class in graph">GraphElement</a>></code></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>Direct Known Subclasses:</dt>
|
||||
<dd><code><a href="Kante.html" title="class in graph">Kante</a></code>, <code><a href="Knoten.html" title="class in graph">Knoten</a></code></dd>
|
||||
<dd><code>java.lang.Comparable<<a href="GraphElement.html" title="class in graph">GraphElement</a>></code></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<pre>public abstract class <span class="typeNameLabel">GraphElement</span>
|
||||
extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>
|
||||
implements <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Comparable</a><<a href="GraphElement.html" title="class in graph">GraphElement</a>></pre>
|
||||
extends java.lang.Object
|
||||
implements java.lang.Comparable<<a href="GraphElement.html" title="class in graph">GraphElement</a>></pre>
|
||||
<div class="block">Die Klasse GraphElement ist eine Oberklasse von Knoten und Kanten.
|
||||
Sie ist nur für die interne Verarbeitung wichtig.</div>
|
||||
<dl>
|
||||
<dt><span class="simpleTagLabel">Version:</span></dt>
|
||||
<dd>v1.1</dd>
|
||||
<dd>28.02.2023 (v7.0)
|
||||
v7.0: Die am Element gespeicherten Informationen werden in einer Hashmap gespeichert. Daher können beliebige weitere Informationen abgelegt werden.
|
||||
Es wird auch gespeichert, als welcher Typ die Information übergeben wurde.</dd>
|
||||
<dt><span class="simpleTagLabel">Author:</span></dt>
|
||||
<dd>Thomas Schaller</dd>
|
||||
</dl>
|
||||
|
|
@ -156,6 +71,44 @@ implements <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base
|
|||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
<section role="region">
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a id="field.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Field Summary</h3>
|
||||
<table class="memberSummary">
|
||||
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||
<th class="colSecond" scope="col">Field</th>
|
||||
<th class="colLast" scope="col">Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>protected java.util.HashMap<java.lang.String,​java.lang.String></code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#daten">daten</a></span></code></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>protected graph.Graph</code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#g">g</a></span></code></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>protected java.lang.String</code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sortierKriterium">sortierKriterium</a></span></code></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>protected java.util.HashMap<java.lang.String,​java.lang.String></code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#typen">typen</a></span></code></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<section role="region">
|
||||
<ul class="blockList">
|
||||
|
|
@ -185,34 +138,133 @@ implements <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base
|
|||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<table class="memberSummary">
|
||||
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption>
|
||||
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||
<th class="colSecond" scope="col">Method</th>
|
||||
<th class="colLast" scope="col">Description</th>
|
||||
</tr>
|
||||
<tr id="i0" class="altColor">
|
||||
<td class="colFirst"><code>abstract int</code></td>
|
||||
<td class="colFirst"><code>int</code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#compareTo(graph.GraphElement)">compareTo</a></span>​(<a href="GraphElement.html" title="class in graph">GraphElement</a> e)</code></th>
|
||||
<td class="colLast"> </td>
|
||||
<td class="colLast">
|
||||
<div class="block">Vergleicht den Knoten/Kante mit einem anderen Knoten/Kante bezüglich seines Sortierkriteriums
|
||||
Das Sortierkriterium ist normalerweise der "Wert", kann aber mit setSortierkriterium gesetzt werden.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i1" class="rowColor">
|
||||
<td class="colFirst"><code>abstract <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getStatus()">getStatus</a></span>()</code></th>
|
||||
<td class="colLast"> </td>
|
||||
<td class="colFirst"><code>boolean</code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBoolean(java.lang.String)">getBoolean</a></span>​(java.lang.String name)</code></th>
|
||||
<td class="colLast">
|
||||
<div class="block">Gibt zusätzliche Daten als int zurück</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i2" class="altColor">
|
||||
<td class="colFirst"><code>abstract void</code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setStatus(java.lang.String)">setStatus</a></span>​(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> status)</code></th>
|
||||
<td class="colLast"> </td>
|
||||
<td class="colFirst"><code>double</code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDouble(java.lang.String)">getDouble</a></span>​(java.lang.String name)</code></th>
|
||||
<td class="colLast">
|
||||
<div class="block">Gibt zusätzliche Daten als int zurück</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i3" class="rowColor">
|
||||
<td class="colFirst"><code>int</code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getInt(java.lang.String)">getInt</a></span>​(java.lang.String name)</code></th>
|
||||
<td class="colLast">
|
||||
<div class="block">Gibt zusätzliche Daten als int zurück</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i4" class="altColor">
|
||||
<td class="colFirst"><code>abstract java.util.List<java.lang.String></code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getKurztext(java.lang.String%5B%5D)">getKurztext</a></span>​(java.lang.String[] namen)</code></th>
|
||||
<td class="colLast">
|
||||
<div class="block">Gibt die Beschreibung des Knoten / der Kante als Kurztext für die Anzeige im
|
||||
Kreis bzw.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i5" class="rowColor">
|
||||
<td class="colFirst"><code>abstract java.util.List<java.lang.String></code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLangtext(java.lang.String%5B%5D)">getLangtext</a></span>​(java.lang.String[] namen)</code></th>
|
||||
<td class="colLast">
|
||||
<div class="block">Gibt die Beschreibung des Knoten / der Kante als Langtext für die Anzeige im
|
||||
Tooltip-Fenster zurück.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i6" class="altColor">
|
||||
<td class="colFirst"><code>java.lang.String</code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getStatus()">getStatus</a></span>()</code></th>
|
||||
<td class="colLast">
|
||||
<div class="block">Liefert den Status einer Kante als String.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i7" class="rowColor">
|
||||
<td class="colFirst"><code>java.lang.String</code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getString(java.lang.String)">getString</a></span>​(java.lang.String name)</code></th>
|
||||
<td class="colLast">
|
||||
<div class="block">Gibt zusätzliche Daten als String zurück</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i8" class="altColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#set(java.lang.String,boolean)">set</a></span>​(java.lang.String name,
|
||||
boolean wert)</code></th>
|
||||
<td class="colLast">
|
||||
<div class="block">Speichert zusätzliche Daten am Knoten oder der Kante</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i9" class="rowColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#set(java.lang.String,double)">set</a></span>​(java.lang.String name,
|
||||
double wert)</code></th>
|
||||
<td class="colLast">
|
||||
<div class="block">Speichert zusätzliche Daten am Knoten oder der Kante
|
||||
Double.POSITIVE_INFINITY bzw.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i10" class="altColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#set(java.lang.String,int)">set</a></span>​(java.lang.String name,
|
||||
int wert)</code></th>
|
||||
<td class="colLast">
|
||||
<div class="block">Speichert zusätzliche Daten am Knoten oder der Kante
|
||||
Integer.MAX_VALUE bzw.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i11" class="rowColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#set(java.lang.String,java.lang.String)">set</a></span>​(java.lang.String name,
|
||||
java.lang.String wert)</code></th>
|
||||
<td class="colLast">
|
||||
<div class="block">Speichert zusätzliche Daten am Knoten oder der Kante</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i12" class="altColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setGraph(graph.Graph)">setGraph</a></span>​(graph.Graph g)</code></th>
|
||||
<td class="colLast">
|
||||
<div class="block">Speichert den Graphen, in den Knoten/Kante eingefügt wurde.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i13" class="rowColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSortierkriterium(java.lang.String)">setSortierkriterium</a></span>​(java.lang.String name)</code></th>
|
||||
<td class="colLast">
|
||||
<div class="block">Setzt das Sortierkriterium des Knoten/der Kante.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i14" class="altColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setStatus(java.lang.String)">setStatus</a></span>​(java.lang.String status)</code></th>
|
||||
<td class="colLast">
|
||||
<div class="block">Setzt den Status einer Kante, der in einem String gespeichert ist.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3>
|
||||
<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li>
|
||||
<h3>Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -223,6 +275,52 @@ implements <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base
|
|||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ============ FIELD DETAIL =========== -->
|
||||
<section role="region">
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a id="field.detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Field Detail</h3>
|
||||
<a id="daten">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>daten</h4>
|
||||
<pre>protected java.util.HashMap<java.lang.String,​java.lang.String> daten</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a id="typen">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>typen</h4>
|
||||
<pre>protected java.util.HashMap<java.lang.String,​java.lang.String> typen</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a id="g">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>g</h4>
|
||||
<pre>protected graph.Graph g</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a id="sortierKriterium">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>sortierKriterium</h4>
|
||||
<pre>protected java.lang.String sortierKriterium</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<section role="region">
|
||||
<ul class="blockList">
|
||||
|
|
@ -249,16 +347,20 @@ implements <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base
|
|||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Detail</h3>
|
||||
<a id="compareTo(graph.GraphElement)">
|
||||
<a id="setStatus(java.lang.String)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>compareTo</h4>
|
||||
<pre class="methodSignature">public abstract int compareTo​(<a href="GraphElement.html" title="class in graph">GraphElement</a> e)</pre>
|
||||
<h4>setStatus</h4>
|
||||
<pre class="methodSignature">public void setStatus​(java.lang.String status)</pre>
|
||||
<div class="block">Setzt den Status einer Kante, der in einem String gespeichert ist.
|
||||
Form: markiert,geloescht,farbe
|
||||
Dabei sind markiert und geloescht boolsche Werte (0 = false, 1 = true) und
|
||||
die farbe eine Zahl</div>
|
||||
<dl>
|
||||
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
||||
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html?is-external=true#compareTo(T)" title="class or interface in java.lang" class="externalLink">compareTo</a></code> in interface <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Comparable</a><<a href="GraphElement.html" title="class in graph">GraphElement</a>></code></dd>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>status</code> - Statusstring</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -268,16 +370,225 @@ implements <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base
|
|||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getStatus</h4>
|
||||
<pre class="methodSignature">public abstract <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> getStatus()</pre>
|
||||
<pre class="methodSignature">public java.lang.String getStatus()</pre>
|
||||
<div class="block">Liefert den Status einer Kante als String.
|
||||
Form: markiert,geloescht,farbe
|
||||
Dabei sind markiert und geloescht boolsche Werte (0 = false, 1 = true) und
|
||||
die farbe eine Zahl</div>
|
||||
<dl>
|
||||
<dt><span class="returnLabel">Returns:</span></dt>
|
||||
<dd>Statusstring</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a id="setStatus(java.lang.String)">
|
||||
<a id="setSortierkriterium(java.lang.String)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>setSortierkriterium</h4>
|
||||
<pre class="methodSignature">public void setSortierkriterium​(java.lang.String name)</pre>
|
||||
<div class="block">Setzt das Sortierkriterium des Knoten/der Kante.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>name</code> - Bezeichnung des Wertes nach dem sortiert werden soll</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a id="getKurztext(java.lang.String[])">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getKurztext</h4>
|
||||
<pre class="methodSignature">public abstract java.util.List<java.lang.String> getKurztext​(java.lang.String[] namen)</pre>
|
||||
<div class="block">Gibt die Beschreibung des Knoten / der Kante als Kurztext für die Anzeige im
|
||||
Kreis bzw. Kasten zurück. Dabei wird jeder Eintrag der Liste als eigene Zeile
|
||||
dargestellt. Es werden nur die Werte angezeigt. Es sind max. 2 Zeilen zulässig.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>namen</code> - Namen der Werte, die im Kurztext angezeigt werden sollen.</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a id="getLangtext(java.lang.String[])">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getLangtext</h4>
|
||||
<pre class="methodSignature">public abstract java.util.List<java.lang.String> getLangtext​(java.lang.String[] namen)</pre>
|
||||
<div class="block">Gibt die Beschreibung des Knoten / der Kante als Langtext für die Anzeige im
|
||||
Tooltip-Fenster zurück. Dabei wird jeder Eintrag der Liste als eigene Zeile
|
||||
dargestellt. Es wird jeweils die Bezeichnung und der Wert ausgegeben.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>namen</code> - Namen der Werte, die im Tooltip angezeigt werden sollen.</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a id="setGraph(graph.Graph)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>setGraph</h4>
|
||||
<pre class="methodSignature">public void setGraph​(graph.Graph g)</pre>
|
||||
<div class="block">Speichert den Graphen, in den Knoten/Kante eingefügt wurde. Damit kann er selbst seine Nummer
|
||||
ermitteln.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>g</code> - Graph</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a id="set(java.lang.String,java.lang.String)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>set</h4>
|
||||
<pre class="methodSignature">public void set​(java.lang.String name,
|
||||
java.lang.String wert)</pre>
|
||||
<div class="block">Speichert zusätzliche Daten am Knoten oder der Kante</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>name</code> - Bezeichnung der Art der Daten</dd>
|
||||
<dd><code>wert</code> - Wert der zu speichernden Daten</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a id="set(java.lang.String,double)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>set</h4>
|
||||
<pre class="methodSignature">public void set​(java.lang.String name,
|
||||
double wert)</pre>
|
||||
<div class="block">Speichert zusätzliche Daten am Knoten oder der Kante
|
||||
Double.POSITIVE_INFINITY bzw. NEGATIVE_INFINITY wird als +/- unendlich dargestellt</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>name</code> - Bezeichnung der Art der Daten</dd>
|
||||
<dd><code>wert</code> - Wert der zu speichernden Daten</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a id="set(java.lang.String,int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>set</h4>
|
||||
<pre class="methodSignature">public void set​(java.lang.String name,
|
||||
int wert)</pre>
|
||||
<div class="block">Speichert zusätzliche Daten am Knoten oder der Kante
|
||||
Integer.MAX_VALUE bzw. MIN_VALUE werden als +/- unendlich dargestellt.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>name</code> - Bezeichnung der Art der Daten</dd>
|
||||
<dd><code>wert</code> - Wert der zu speichernden Daten</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a id="set(java.lang.String,boolean)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>set</h4>
|
||||
<pre class="methodSignature">public void set​(java.lang.String name,
|
||||
boolean wert)</pre>
|
||||
<div class="block">Speichert zusätzliche Daten am Knoten oder der Kante</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>name</code> - Bezeichnung der Art der Daten</dd>
|
||||
<dd><code>wert</code> - Wert der zu speichernden Daten</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a id="getString(java.lang.String)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getString</h4>
|
||||
<pre class="methodSignature">public java.lang.String getString​(java.lang.String name)</pre>
|
||||
<div class="block">Gibt zusätzliche Daten als String zurück</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>name</code> - Bezeichnung der zusätzlichen Daten</dd>
|
||||
<dt><span class="returnLabel">Returns:</span></dt>
|
||||
<dd>Wert von "name" oder "", wenn name nicht gespeichert ist</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a id="getInt(java.lang.String)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getInt</h4>
|
||||
<pre class="methodSignature">public int getInt​(java.lang.String name)</pre>
|
||||
<div class="block">Gibt zusätzliche Daten als int zurück</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>name</code> - Bezeichnung der zusätzlichen Daten</dd>
|
||||
<dt><span class="returnLabel">Returns:</span></dt>
|
||||
<dd>Wert von "name" oder 0, wenn name nicht gespeichert ist oder keine Zahl ist</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a id="getDouble(java.lang.String)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getDouble</h4>
|
||||
<pre class="methodSignature">public double getDouble​(java.lang.String name)</pre>
|
||||
<div class="block">Gibt zusätzliche Daten als int zurück</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>name</code> - Bezeichnung der zusätzlichen Daten</dd>
|
||||
<dt><span class="returnLabel">Returns:</span></dt>
|
||||
<dd>Wert von "name" oder 0, wenn name nicht gespeichert ist oder keine Zahl ist</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a id="getBoolean(java.lang.String)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getBoolean</h4>
|
||||
<pre class="methodSignature">public boolean getBoolean​(java.lang.String name)</pre>
|
||||
<div class="block">Gibt zusätzliche Daten als int zurück</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>name</code> - Bezeichnung der zusätzlichen Daten</dd>
|
||||
<dt><span class="returnLabel">Returns:</span></dt>
|
||||
<dd>Wert von "name" oder false, wenn name nicht gespeichert ist oder kein Boolean ist</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a id="compareTo(graph.GraphElement)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>setStatus</h4>
|
||||
<pre class="methodSignature">public abstract void setStatus​(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> status)</pre>
|
||||
<h4>compareTo</h4>
|
||||
<pre class="methodSignature">public int compareTo​(<a href="GraphElement.html" title="class in graph">GraphElement</a> e)</pre>
|
||||
<div class="block">Vergleicht den Knoten/Kante mit einem anderen Knoten/Kante bezüglich seines Sortierkriteriums
|
||||
Das Sortierkriterium ist normalerweise der "Wert", kann aber mit setSortierkriterium gesetzt werden.</div>
|
||||
<dl>
|
||||
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
||||
<dd><code>compareTo</code> in interface <code>java.lang.Comparable<<a href="GraphElement.html" title="class in graph">GraphElement</a>></code></dd>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>e</code> - anderer Knoten</dd>
|
||||
<dt><span class="returnLabel">Returns:</span></dt>
|
||||
<dd>kleiner 0 der andere Knoten hat einen größeren Wert, größer 0 der andere Knoten hat einen kleineren Wert, gleich 0 beide sind gleich</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
@ -289,64 +600,5 @@ implements <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base
|
|||
</div>
|
||||
</main>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a id="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<a id="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../index.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../index-all.html">Index</a></li>
|
||||
<li><a href="../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../allclasses.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</nav>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,48 +1,53 @@
|
|||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (17) on Sun Nov 13 19:45:55 CET 2022 -->
|
||||
<!-- Generated by javadoc (11.0.14.1) on Thu Apr 20 12:17:13 CEST 2023 -->
|
||||
<title>graph</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="dc.created" content="2022-11-13">
|
||||
<meta name="description" content="declaration: package: graph">
|
||||
<meta name="generator" content="javadoc/PackageWriterImpl">
|
||||
<meta name="dc.created" content="2023-04-20">
|
||||
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../script.js"></script>
|
||||
</head>
|
||||
<body class="package-declaration-page">
|
||||
<script type="text/javascript"></script>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="graph";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 title="Package graph" class="title">Package graph</h1>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="package-signature">package <span class="element-name">graph</span></div>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
<li>
|
||||
<div id="class-summary">
|
||||
<div class="caption"><span>Classes</span></div>
|
||||
<div class="summary-table two-column-summary">
|
||||
<div class="table-header col-first">Class</div>
|
||||
<div class="table-header col-last">Description</div>
|
||||
<div class="col-first even-row-color class-summary class-summary-tab2"><a href="Graph.html" title="class in graph">Graph</a></div>
|
||||
<div class="col-last even-row-color class-summary class-summary-tab2">
|
||||
<div class="block">Dies ist das Herz vom "GraphTester" - der Graph selber, gepeichert als Adjazenzliste.</div>
|
||||
</div>
|
||||
</div>
|
||||
<h1 title="Package" class="title">Package graph</h1>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<table class="typeSummary">
|
||||
<caption><span>Class Summary</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Class</th>
|
||||
<th class="colLast" scope="col">Description</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr class="altColor">
|
||||
<th class="colFirst" scope="row"><a href="GraphElement.html" title="class in graph">GraphElement</a></th>
|
||||
<td class="colLast">
|
||||
<div class="block">Die Klasse GraphElement ist eine Oberklasse von Knoten und Kanten.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,21 +1,18 @@
|
|||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (17) on Sun Nov 13 19:45:55 CET 2022 -->
|
||||
<!-- Generated by javadoc (11.0.14.1) on Thu Apr 20 12:17:13 CEST 2023 -->
|
||||
<title>Generated Documentation (Untitled)</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="dc.created" content="2022-11-13">
|
||||
<meta name="description" content="index redirect">
|
||||
<meta name="generator" content="javadoc/IndexRedirectWriter">
|
||||
<link rel="canonical" href="graph/package-summary.html">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript">window.location.replace('graph/package-summary.html')</script>
|
||||
<noscript>
|
||||
<meta http-equiv="Refresh" content="0;graph/package-summary.html">
|
||||
</noscript>
|
||||
<link rel="canonical" href="graph/package-summary.html">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body class="index-redirect-page">
|
||||
<body>
|
||||
<main role="main">
|
||||
<noscript>
|
||||
<p>JavaScript is disabled on your browser.</p>
|
||||
|
|
|
|||
|
|
@ -1,37 +1 @@
|
|||
ADDITIONAL INFORMATION ABOUT LICENSING
|
||||
|
||||
Certain files distributed by Oracle America, Inc. and/or its affiliates are
|
||||
subject to the following clarification and special exception to the GPLv2,
|
||||
based on the GNU Project exception for its Classpath libraries, known as the
|
||||
GNU Classpath Exception.
|
||||
|
||||
Note that Oracle includes multiple, independent programs in this software
|
||||
package. Some of those programs are provided under licenses deemed
|
||||
incompatible with the GPLv2 by the Free Software Foundation and others.
|
||||
For example, the package includes programs licensed under the Apache
|
||||
License, Version 2.0 and may include FreeType. Such programs are licensed
|
||||
to you under their original licenses.
|
||||
|
||||
Oracle facilitates your further distribution of this package by adding the
|
||||
Classpath Exception to the necessary parts of its GPLv2 code, which permits
|
||||
you to use that code in combination with other independent modules not
|
||||
licensed under the GPLv2. However, note that this would not permit you to
|
||||
commingle code under an incompatible license with Oracle's GPLv2 licensed
|
||||
code by, for example, cutting and pasting such code into a file also
|
||||
containing Oracle's GPLv2 licensed code and then distributing the result.
|
||||
|
||||
Additionally, if you were to remove the Classpath Exception from any of the
|
||||
files to which it applies and distribute the result, you would likely be
|
||||
required to license some or all of the other code in that distribution under
|
||||
the GPLv2 as well, and since the GPLv2 is incompatible with the license terms
|
||||
of some items included in the distribution by Oracle, removing the Classpath
|
||||
Exception could therefore effectively compromise your ability to further
|
||||
distribute the package.
|
||||
|
||||
Failing to distribute notices associated with some files may also create
|
||||
unexpected legal consequences.
|
||||
|
||||
Proceed with caution and we recommend that you obtain the advice of a lawyer
|
||||
skilled in open source matters before removing the Classpath Exception or
|
||||
making modifications to this package which may subsequently be redistributed
|
||||
and/or involve the use of third party software.
|
||||
Please see ..\java.base\ADDITIONAL_LICENSE_INFO
|
||||
|
|
|
|||
|
|
@ -1,27 +1 @@
|
|||
|
||||
OPENJDK ASSEMBLY EXCEPTION
|
||||
|
||||
The OpenJDK source code made available by Oracle America, Inc. (Oracle) at
|
||||
openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU
|
||||
General Public License <http://www.gnu.org/copyleft/gpl.html> version 2
|
||||
only ("GPL2"), with the following clarification and special exception.
|
||||
|
||||
Linking this OpenJDK Code statically or dynamically with other code
|
||||
is making a combined work based on this library. Thus, the terms
|
||||
and conditions of GPL2 cover the whole combination.
|
||||
|
||||
As a special exception, Oracle gives you permission to link this
|
||||
OpenJDK Code with certain code licensed by Oracle as indicated at
|
||||
http://openjdk.java.net/legal/exception-modules-2007-05-08.html
|
||||
("Designated Exception Modules") to produce an executable,
|
||||
regardless of the license terms of the Designated Exception Modules,
|
||||
and to copy and distribute the resulting executable under GPL2,
|
||||
provided that the Designated Exception Modules continue to be
|
||||
governed by the licenses under which they were offered by Oracle.
|
||||
|
||||
As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code
|
||||
to build an executable that includes those portions of necessary code that
|
||||
Oracle could not provide under GPL2 (or that Oracle has provided under GPL2
|
||||
with the Classpath exception). If you modify or add to the OpenJDK code,
|
||||
that new GPL2 code may still be combined with Designated Exception Modules
|
||||
if the new code is made subject to this exception by its copyright holder.
|
||||
Please see ..\java.base\ASSEMBLY_EXCEPTION
|
||||
|
|
|
|||
|
|
@ -1,347 +1 @@
|
|||
The GNU General Public License (GPL)
|
||||
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license
|
||||
document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your freedom to share
|
||||
and change it. By contrast, the GNU General Public License is intended to
|
||||
guarantee your freedom to share and change free software--to make sure the
|
||||
software is free for all its users. This General Public License applies to
|
||||
most of the Free Software Foundation's software and to any other program whose
|
||||
authors commit to using it. (Some other Free Software Foundation software is
|
||||
covered by the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our
|
||||
General Public Licenses are designed to make sure that you have the freedom to
|
||||
distribute copies of free software (and charge for this service if you wish),
|
||||
that you receive source code or can get it if you want it, that you can change
|
||||
the software or use pieces of it in new free programs; and that you know you
|
||||
can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid anyone to deny
|
||||
you these rights or to ask you to surrender the rights. These restrictions
|
||||
translate to certain responsibilities for you if you distribute copies of the
|
||||
software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or for
|
||||
a fee, you must give the recipients all the rights that you have. You must
|
||||
make sure that they, too, receive or can get the source code. And you must
|
||||
show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and (2)
|
||||
offer you this license which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain that
|
||||
everyone understands that there is no warranty for this free software. If the
|
||||
software is modified by someone else and passed on, we want its recipients to
|
||||
know that what they have is not the original, so that any problems introduced
|
||||
by others will not reflect on the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software patents. We
|
||||
wish to avoid the danger that redistributors of a free program will
|
||||
individually obtain patent licenses, in effect making the program proprietary.
|
||||
To prevent this, we have made it clear that any patent must be licensed for
|
||||
everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification
|
||||
follow.
|
||||
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains a notice
|
||||
placed by the copyright holder saying it may be distributed under the terms of
|
||||
this General Public License. The "Program", below, refers to any such program
|
||||
or work, and a "work based on the Program" means either the Program or any
|
||||
derivative work under copyright law: that is to say, a work containing the
|
||||
Program or a portion of it, either verbatim or with modifications and/or
|
||||
translated into another language. (Hereinafter, translation is included
|
||||
without limitation in the term "modification".) Each licensee is addressed as
|
||||
"you".
|
||||
|
||||
Activities other than copying, distribution and modification are not covered by
|
||||
this License; they are outside its scope. The act of running the Program is
|
||||
not restricted, and the output from the Program is covered only if its contents
|
||||
constitute a work based on the Program (independent of having been made by
|
||||
running the Program). Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's source code as
|
||||
you receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice and
|
||||
disclaimer of warranty; keep intact all the notices that refer to this License
|
||||
and to the absence of any warranty; and give any other recipients of the
|
||||
Program a copy of this License along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and you may
|
||||
at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion of it, thus
|
||||
forming a work based on the Program, and copy and distribute such modifications
|
||||
or work under the terms of Section 1 above, provided that you also meet all of
|
||||
these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices stating
|
||||
that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in whole or
|
||||
in part contains or is derived from the Program or any part thereof, to be
|
||||
licensed as a whole at no charge to all third parties under the terms of
|
||||
this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively when run,
|
||||
you must cause it, when started running for such interactive use in the
|
||||
most ordinary way, to print or display an announcement including an
|
||||
appropriate copyright notice and a notice that there is no warranty (or
|
||||
else, saying that you provide a warranty) and that users may redistribute
|
||||
the program under these conditions, and telling the user how to view a copy
|
||||
of this License. (Exception: if the Program itself is interactive but does
|
||||
not normally print such an announcement, your work based on the Program is
|
||||
not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If identifiable
|
||||
sections of that work are not derived from the Program, and can be reasonably
|
||||
considered independent and separate works in themselves, then this License, and
|
||||
its terms, do not apply to those sections when you distribute them as separate
|
||||
works. But when you distribute the same sections as part of a whole which is a
|
||||
work based on the Program, the distribution of the whole must be on the terms
|
||||
of this License, whose permissions for other licensees extend to the entire
|
||||
whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest your
|
||||
rights to work written entirely by you; rather, the intent is to exercise the
|
||||
right to control the distribution of derivative or collective works based on
|
||||
the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program with the
|
||||
Program (or with a work based on the Program) on a volume of a storage or
|
||||
distribution medium does not bring the other work under the scope of this
|
||||
License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it, under
|
||||
Section 2) in object code or executable form under the terms of Sections 1 and
|
||||
2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable source
|
||||
code, which must be distributed under the terms of Sections 1 and 2 above
|
||||
on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three years, to
|
||||
give any third party, for a charge no more than your cost of physically
|
||||
performing source distribution, a complete machine-readable copy of the
|
||||
corresponding source code, to be distributed under the terms of Sections 1
|
||||
and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer to
|
||||
distribute corresponding source code. (This alternative is allowed only
|
||||
for noncommercial distribution and only if you received the program in
|
||||
object code or executable form with such an offer, in accord with
|
||||
Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for making
|
||||
modifications to it. For an executable work, complete source code means all
|
||||
the source code for all modules it contains, plus any associated interface
|
||||
definition files, plus the scripts used to control compilation and installation
|
||||
of the executable. However, as a special exception, the source code
|
||||
distributed need not include anything that is normally distributed (in either
|
||||
source or binary form) with the major components (compiler, kernel, and so on)
|
||||
of the operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the source
|
||||
code from the same place counts as distribution of the source code, even though
|
||||
third parties are not compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program except as
|
||||
expressly provided under this License. Any attempt otherwise to copy, modify,
|
||||
sublicense or distribute the Program is void, and will automatically terminate
|
||||
your rights under this License. However, parties who have received copies, or
|
||||
rights, from you under this License will not have their licenses terminated so
|
||||
long as such parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not signed it.
|
||||
However, nothing else grants you permission to modify or distribute the Program
|
||||
or its derivative works. These actions are prohibited by law if you do not
|
||||
accept this License. Therefore, by modifying or distributing the Program (or
|
||||
any work based on the Program), you indicate your acceptance of this License to
|
||||
do so, and all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the Program),
|
||||
the recipient automatically receives a license from the original licensor to
|
||||
copy, distribute or modify the Program subject to these terms and conditions.
|
||||
You may not impose any further restrictions on the recipients' exercise of the
|
||||
rights granted herein. You are not responsible for enforcing compliance by
|
||||
third parties to this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues), conditions
|
||||
are imposed on you (whether by court order, agreement or otherwise) that
|
||||
contradict the conditions of this License, they do not excuse you from the
|
||||
conditions of this License. If you cannot distribute so as to satisfy
|
||||
simultaneously your obligations under this License and any other pertinent
|
||||
obligations, then as a consequence you may not distribute the Program at all.
|
||||
For example, if a patent license would not permit royalty-free redistribution
|
||||
of the Program by all those who receive copies directly or indirectly through
|
||||
you, then the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply and
|
||||
the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any patents or
|
||||
other property right claims or to contest validity of any such claims; this
|
||||
section has the sole purpose of protecting the integrity of the free software
|
||||
distribution system, which is implemented by public license practices. Many
|
||||
people have made generous contributions to the wide range of software
|
||||
distributed through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing to
|
||||
distribute software through any other system and a licensee cannot impose that
|
||||
choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to be a
|
||||
consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in certain
|
||||
countries either by patents or by copyrighted interfaces, the original
|
||||
copyright holder who places the Program under this License may add an explicit
|
||||
geographical distribution limitation excluding those countries, so that
|
||||
distribution is permitted only in or among countries not thus excluded. In
|
||||
such case, this License incorporates the limitation as if written in the body
|
||||
of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions of the
|
||||
General Public License from time to time. Such new versions will be similar in
|
||||
spirit to the present version, but may differ in detail to address new problems
|
||||
or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any later
|
||||
version", you have the option of following the terms and conditions either of
|
||||
that version or of any later version published by the Free Software Foundation.
|
||||
If the Program does not specify a version number of this License, you may
|
||||
choose any version ever published by the Free Software Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free programs
|
||||
whose distribution conditions are different, write to the author to ask for
|
||||
permission. For software which is copyrighted by the Free Software Foundation,
|
||||
write to the Free Software Foundation; we sometimes make exceptions for this.
|
||||
Our decision will be guided by the two goals of preserving the free status of
|
||||
all derivatives of our free software and of promoting the sharing and reuse of
|
||||
software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
|
||||
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
|
||||
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
|
||||
PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
|
||||
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE,
|
||||
YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
|
||||
ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
|
||||
PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
|
||||
INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
|
||||
BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
|
||||
OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest possible
|
||||
use to the public, the best way to achieve this is to make it free software
|
||||
which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to attach
|
||||
them to the start of each source file to most effectively convey the exclusion
|
||||
of warranty; and each file should have at least the "copyright" line and a
|
||||
pointer to where the full notice is found.
|
||||
|
||||
One line to give the program's name and a brief idea of what it does.
|
||||
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 2 of the License, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this when it
|
||||
starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
|
||||
with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free
|
||||
software, and you are welcome to redistribute it under certain conditions;
|
||||
type 'show c' for details.
|
||||
|
||||
The hypothetical commands 'show w' and 'show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may be
|
||||
called something other than 'show w' and 'show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary. Here
|
||||
is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
'Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
signature of Ty Coon, 1 April 1989
|
||||
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General Public
|
||||
License instead of this License.
|
||||
|
||||
|
||||
"CLASSPATH" EXCEPTION TO THE GPL
|
||||
|
||||
Certain source files distributed by Oracle America and/or its affiliates are
|
||||
subject to the following clarification and special exception to the GPL, but
|
||||
only where Oracle has expressly included in the particular source file's header
|
||||
the words "Oracle designates this particular file as subject to the "Classpath"
|
||||
exception as provided by Oracle in the LICENSE file that accompanied this code."
|
||||
|
||||
Linking this library statically or dynamically with other modules is making
|
||||
a combined work based on this library. Thus, the terms and conditions of
|
||||
the GNU General Public License cover the whole combination.
|
||||
|
||||
As a special exception, the copyright holders of this library give you
|
||||
permission to link this library with independent modules to produce an
|
||||
executable, regardless of the license terms of these independent modules,
|
||||
and to copy and distribute the resulting executable under terms of your
|
||||
choice, provided that you also meet, for each linked independent module,
|
||||
the terms and conditions of the license of that module. An independent
|
||||
module is a module which is not derived from or based on this library. If
|
||||
you modify this library, you may extend this exception to your version of
|
||||
the library, but you are not obligated to do so. If you do not wish to do
|
||||
so, delete this exception statement from your version.
|
||||
Please see ..\java.base\LICENSE
|
||||
|
|
|
|||
26
doc/legal/jszip.md
Normal file
26
doc/legal/jszip.md
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
## JSZip v3.2.1
|
||||
|
||||
### MIT License
|
||||
<pre>
|
||||
|
||||
Copyright (c) 2009-2016 Stuart Knightley, David Duponchel, Franz Buchinger, António Afonso
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
</pre>
|
||||
45
doc/legal/pako.md
Normal file
45
doc/legal/pako.md
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
## Pako v1.0
|
||||
|
||||
### Pako License
|
||||
<pre>
|
||||
Copyright (C) 2014-2017 by Vitaly Puzrin and Andrei Tuputcyn
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
(C) 1995-2013 Jean-loup Gailly and Mark Adler
|
||||
(C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
</pre>
|
||||
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
Class documentation
|
||||
<---- javadoc command: ---->
|
||||
/usr/share/bluej/jdk/bin/javadoc
|
||||
C:\Program Files\BlueJ\jdk\bin\javadoc.exe
|
||||
-author
|
||||
-version
|
||||
-nodeprecated
|
||||
|
|
@ -11,64 +11,26 @@ Class documentation
|
|||
-nohelp
|
||||
-nonavbar
|
||||
-source
|
||||
17
|
||||
11
|
||||
-classpath
|
||||
/usr/share/bluej/bluejcore.jar:/usr/share/bluej/junit-jupiter-migrationsupport-5.5.2.jar:/usr/share/bluej/junit-platform-suite-api-1.5.2.jar:/usr/share/bluej/junit-platform-launcher-1.5.2.jar:/usr/share/bluej/junit-jupiter-5.5.2.jar:/usr/share/bluej/junit-platform-console-1.5.2.jar:/usr/share/bluej/junit-quickcheck-core-0.9.jar:/usr/share/bluej/junit-platform-runner-1.5.2.jar:/usr/share/bluej/junit-platform-console-standalone-1.5.2.jar:/usr/share/bluej/junit-platform-engine-1.5.2.jar:/usr/share/bluej/junit-jupiter-api-5.5.2.jar:/usr/share/bluej/junit-vintage-engine-5.5.2.jar:/usr/share/bluej/junit-jupiter-engine-5.5.2.jar:/usr/share/bluej/junit-jupiter-params-5.5.2.jar:/usr/share/bluej/junit-platform-testkit-1.5.2.jar:/usr/share/bluej/junit-platform-commons-1.5.2.jar:/usr/share/bluej/junit-platform-reporting-1.5.2.jar:/usr/share/bluej/hamcrest-core-1.3.jar:/usr/share/bluej/hamcrest-library-1.3.jar:/usr/share/bluej/lang-stride.jar:/usr/share/bluej/javafx/lib/javafx.base.jar:/usr/share/bluej/javafx/lib/javafx.controls.jar:/usr/share/bluej/javafx/lib/javafx.fxml.jar:/usr/share/bluej/javafx/lib/javafx.graphics.jar:/usr/share/bluej/javafx/lib/javafx.media.jar:/usr/share/bluej/javafx/lib/javafx.properties.jar:/usr/share/bluej/javafx/lib/javafx.swing.jar:/usr/share/bluej/javafx/lib/javafx.web.jar:/home/sbel/gt/1_graphentester/+libs/jdom-1.1.3.jar:/home/sbel/gt/1_graphentester/+libs/commons-io-2.4.jar:/home/sbel/gt/1_graphentester/+libs/csv.jar:/home/sbel/gt/1_graphentester
|
||||
C:\Program Files\BlueJ\lib\bluejcore.jar;C:\Program Files\BlueJ\lib\junit-jupiter-5.5.2.jar;C:\Program Files\BlueJ\lib\junit-jupiter-api-5.5.2.jar;C:\Program Files\BlueJ\lib\junit-jupiter-engine-5.5.2.jar;C:\Program Files\BlueJ\lib\junit-jupiter-migrationsupport-5.5.2.jar;C:\Program Files\BlueJ\lib\junit-jupiter-params-5.5.2.jar;C:\Program Files\BlueJ\lib\junit-platform-commons-1.5.2.jar;C:\Program Files\BlueJ\lib\junit-platform-console-1.5.2.jar;C:\Program Files\BlueJ\lib\junit-platform-console-standalone-1.5.2.jar;C:\Program Files\BlueJ\lib\junit-platform-engine-1.5.2.jar;C:\Program Files\BlueJ\lib\junit-platform-launcher-1.5.2.jar;C:\Program Files\BlueJ\lib\junit-platform-reporting-1.5.2.jar;C:\Program Files\BlueJ\lib\junit-platform-runner-1.5.2.jar;C:\Program Files\BlueJ\lib\junit-platform-suite-api-1.5.2.jar;C:\Program Files\BlueJ\lib\junit-platform-testkit-1.5.2.jar;C:\Program Files\BlueJ\lib\junit-quickcheck-core-0.9.jar;C:\Program Files\BlueJ\lib\junit-vintage-engine-5.5.2.jar;C:\Program Files\BlueJ\lib\hamcrest-core-1.3.jar;C:\Program Files\BlueJ\lib\hamcrest-library-1.3.jar;C:\Program Files\BlueJ\lib\lang-stride.jar;C:\Program Files\BlueJ\lib\javafx\lib\javafx.base.jar;C:\Program Files\BlueJ\lib\javafx\lib\javafx.controls.jar;C:\Program Files\BlueJ\lib\javafx\lib\javafx.fxml.jar;C:\Program Files\BlueJ\lib\javafx\lib\javafx.graphics.jar;C:\Program Files\BlueJ\lib\javafx\lib\javafx.media.jar;C:\Program Files\BlueJ\lib\javafx\lib\javafx.properties.jar;C:\Program Files\BlueJ\lib\javafx\lib\javafx.swing.jar;C:\Program Files\BlueJ\lib\javafx\lib\javafx.web.jar;H:\GitTest\3_vorlagen_tauschordner\1_graphentester\+libs\commons-io-2.4.jar;H:\GitTest\3_vorlagen_tauschordner\1_graphentester\+libs\csv.jar;H:\GitTest\3_vorlagen_tauschordner\1_graphentester\+libs\jdom-1.1.3.jar;H:\GitTest\3_vorlagen_tauschordner\1_graphentester
|
||||
-d
|
||||
/home/sbel/gt/1_graphentester/doc
|
||||
H:\GitTest\3_vorlagen_tauschordner\1_graphentester\doc
|
||||
-encoding
|
||||
UTF-8
|
||||
-charset
|
||||
UTF-8
|
||||
/home/sbel/gt/1_graphentester/graph/Graph.java
|
||||
H:\GitTest\3_vorlagen_tauschordner\1_graphentester\graph\GraphElement.java
|
||||
<---- end of javadoc command ---->
|
||||
Loading source file /home/sbel/gt/1_graphentester/graph/Graph.java...
|
||||
Loading source file H:\GitTest\3_vorlagen_tauschordner\1_graphentester\graph\GraphElement.java...
|
||||
Constructing Javadoc information...
|
||||
Standard Doclet version 17.0.4+8
|
||||
Standard Doclet version 11.0.14.1
|
||||
Building tree for all the packages and classes...
|
||||
Generating /home/sbel/gt/1_graphentester/doc/graph/Graph.html...
|
||||
/home/sbel/gt/1_graphentester/graph/Graph.java:240: warning: invalid input: '&'
|
||||
* @param filter optionaler Filter, der auf die Liste angewendet wird. Er muss einen boolean-Wert zurückgeben: z.B. @literal{k->k.isMarkiert() && k.isBesucht()}
|
||||
^
|
||||
/home/sbel/gt/1_graphentester/graph/Graph.java:240: warning: invalid input: '&'
|
||||
* @param filter optionaler Filter, der auf die Liste angewendet wird. Er muss einen boolean-Wert zurückgeben: z.B. @literal{k->k.isMarkiert() && k.isBesucht()}
|
||||
^
|
||||
/home/sbel/gt/1_graphentester/graph/Graph.java:302: warning: invalid input: '&'
|
||||
* @param filter optionaler Filter, der auf die Liste angewendet wird. Er muss einen boolean-Wert zurückgeben: z.B. @literal{k->k.isMarkiert() && k.isBesucht()}
|
||||
^
|
||||
/home/sbel/gt/1_graphentester/graph/Graph.java:302: warning: invalid input: '&'
|
||||
* @param filter optionaler Filter, der auf die Liste angewendet wird. Er muss einen boolean-Wert zurückgeben: z.B. @literal{k->k.isMarkiert() && k.isBesucht()}
|
||||
^
|
||||
/home/sbel/gt/1_graphentester/graph/Graph.java:320: warning: invalid input: '&'
|
||||
* @param filter optionaler Filter, der auf die Liste angewendet wird. Er muss einen boolean-Wert zurückgeben: z.B. @literal{k->k.isMarkiert() && k.isBesucht()}
|
||||
^
|
||||
/home/sbel/gt/1_graphentester/graph/Graph.java:320: warning: invalid input: '&'
|
||||
* @param filter optionaler Filter, der auf die Liste angewendet wird. Er muss einen boolean-Wert zurückgeben: z.B. @literal{k->k.isMarkiert() && k.isBesucht()}
|
||||
^
|
||||
/home/sbel/gt/1_graphentester/graph/Graph.java:346: warning: invalid input: '&'
|
||||
* @param filter optionaler Filter, der auf die Liste angewendet wird. Er muss einen boolean-Wert zurückgeben: z.B. @literal{k->k.isMarkiert() && k.isBesucht()}
|
||||
^
|
||||
/home/sbel/gt/1_graphentester/graph/Graph.java:346: warning: invalid input: '&'
|
||||
* @param filter optionaler Filter, der auf die Liste angewendet wird. Er muss einen boolean-Wert zurückgeben: z.B. @literal{k->k.isMarkiert() && k.isBesucht()}
|
||||
^
|
||||
/home/sbel/gt/1_graphentester/graph/Graph.java:370: warning: invalid input: '&'
|
||||
* @param filter optionaler Filter, der auf die Liste angewendet wird. Er muss einen boolean-Wert zurückgeben: z.B. @literal{k->k.isMarkiert() && k.isBesucht()}
|
||||
^
|
||||
/home/sbel/gt/1_graphentester/graph/Graph.java:370: warning: invalid input: '&'
|
||||
* @param filter optionaler Filter, der auf die Liste angewendet wird. Er muss einen boolean-Wert zurückgeben: z.B. @literal{k->k.isMarkiert() && k.isBesucht()}
|
||||
^
|
||||
/home/sbel/gt/1_graphentester/graph/Graph.java:394: warning: invalid input: '&'
|
||||
* @param filter optionaler Filter, der auf die Liste angewendet wird. Er muss einen boolean-Wert zurückgeben: z.B. @literal{k->k.isMarkiert() && k.isBesucht()}
|
||||
^
|
||||
/home/sbel/gt/1_graphentester/graph/Graph.java:394: warning: invalid input: '&'
|
||||
* @param filter optionaler Filter, der auf die Liste angewendet wird. Er muss einen boolean-Wert zurückgeben: z.B. @literal{k->k.isMarkiert() && k.isBesucht()}
|
||||
^
|
||||
/home/sbel/gt/1_graphentester/graph/Graph.java:410: warning: invalid input: '&'
|
||||
* @param filter optionaler Filter, der auf die Liste angewendet wird. Er muss einen boolean-Wert zurückgeben: z.B. @literal{k->k.isMarkiert() && k.isBesucht()}
|
||||
^
|
||||
/home/sbel/gt/1_graphentester/graph/Graph.java:410: warning: invalid input: '&'
|
||||
* @param filter optionaler Filter, der auf die Liste angewendet wird. Er muss einen boolean-Wert zurückgeben: z.B. @literal{k->k.isMarkiert() && k.isBesucht()}
|
||||
^
|
||||
Generating /home/sbel/gt/1_graphentester/doc/graph/package-summary.html...
|
||||
Generating /home/sbel/gt/1_graphentester/doc/index.html...
|
||||
14 warnings
|
||||
Generating H:\GitTest\3_vorlagen_tauschordner\1_graphentester\doc\graph\GraphElement.html...
|
||||
Generating H:\GitTest\3_vorlagen_tauschordner\1_graphentester\doc\graph\package-summary.html...
|
||||
Generating H:\GitTest\3_vorlagen_tauschordner\1_graphentester\doc\constant-values.html...
|
||||
Building index for all the packages and classes...
|
||||
Building index for all classes...
|
||||
Generating H:\GitTest\3_vorlagen_tauschordner\1_graphentester\doc\allclasses.html...
|
||||
Generating H:\GitTest\3_vorlagen_tauschordner\1_graphentester\doc\allclasses.html...
|
||||
Generating H:\GitTest\3_vorlagen_tauschordner\1_graphentester\doc\index.html...
|
||||
|
|
|
|||
183
doc/script.js
183
doc/script.js
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
|
@ -29,13 +29,82 @@ var typeSearchIndex;
|
|||
var memberSearchIndex;
|
||||
var tagSearchIndex;
|
||||
function loadScripts(doc, tag) {
|
||||
createElem(doc, tag, 'jquery/jszip/dist/jszip.js');
|
||||
createElem(doc, tag, 'jquery/jszip-utils/dist/jszip-utils.js');
|
||||
if (window.navigator.userAgent.indexOf('MSIE ') > 0 || window.navigator.userAgent.indexOf('Trident/') > 0 ||
|
||||
window.navigator.userAgent.indexOf('Edge/') > 0) {
|
||||
createElem(doc, tag, 'jquery/jszip-utils/dist/jszip-utils-ie.js');
|
||||
}
|
||||
createElem(doc, tag, 'search.js');
|
||||
|
||||
createElem(doc, tag, 'module-search-index.js');
|
||||
createElem(doc, tag, 'package-search-index.js');
|
||||
createElem(doc, tag, 'type-search-index.js');
|
||||
createElem(doc, tag, 'member-search-index.js');
|
||||
createElem(doc, tag, 'tag-search-index.js');
|
||||
$.get(pathtoroot + "module-search-index.zip")
|
||||
.done(function() {
|
||||
JSZipUtils.getBinaryContent(pathtoroot + "module-search-index.zip", function(e, data) {
|
||||
JSZip.loadAsync(data).then(function(zip){
|
||||
zip.file("module-search-index.json").async("text").then(function(content){
|
||||
moduleSearchIndex = JSON.parse(content);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
$.get(pathtoroot + "package-search-index.zip")
|
||||
.done(function() {
|
||||
JSZipUtils.getBinaryContent(pathtoroot + "package-search-index.zip", function(e, data) {
|
||||
JSZip.loadAsync(data).then(function(zip){
|
||||
zip.file("package-search-index.json").async("text").then(function(content){
|
||||
packageSearchIndex = JSON.parse(content);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
$.get(pathtoroot + "type-search-index.zip")
|
||||
.done(function() {
|
||||
JSZipUtils.getBinaryContent(pathtoroot + "type-search-index.zip", function(e, data) {
|
||||
JSZip.loadAsync(data).then(function(zip){
|
||||
zip.file("type-search-index.json").async("text").then(function(content){
|
||||
typeSearchIndex = JSON.parse(content);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
$.get(pathtoroot + "member-search-index.zip")
|
||||
.done(function() {
|
||||
JSZipUtils.getBinaryContent(pathtoroot + "member-search-index.zip", function(e, data) {
|
||||
JSZip.loadAsync(data).then(function(zip){
|
||||
zip.file("member-search-index.json").async("text").then(function(content){
|
||||
memberSearchIndex = JSON.parse(content);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
$.get(pathtoroot + "tag-search-index.zip")
|
||||
.done(function() {
|
||||
JSZipUtils.getBinaryContent(pathtoroot + "tag-search-index.zip", function(e, data) {
|
||||
JSZip.loadAsync(data).then(function(zip){
|
||||
zip.file("tag-search-index.json").async("text").then(function(content){
|
||||
tagSearchIndex = JSON.parse(content);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
if (!moduleSearchIndex) {
|
||||
createElem(doc, tag, 'module-search-index.js');
|
||||
}
|
||||
if (!packageSearchIndex) {
|
||||
createElem(doc, tag, 'package-search-index.js');
|
||||
}
|
||||
if (!typeSearchIndex) {
|
||||
createElem(doc, tag, 'type-search-index.js');
|
||||
}
|
||||
if (!memberSearchIndex) {
|
||||
createElem(doc, tag, 'member-search-index.js');
|
||||
}
|
||||
if (!tagSearchIndex) {
|
||||
createElem(doc, tag, 'tag-search-index.js');
|
||||
}
|
||||
$(window).resize(function() {
|
||||
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
});
|
||||
}
|
||||
|
||||
function createElem(doc, tag, path) {
|
||||
|
|
@ -45,88 +114,36 @@ function createElem(doc, tag, path) {
|
|||
scriptElement.parentNode.insertBefore(script, scriptElement);
|
||||
}
|
||||
|
||||
function show(tableId, selected, columns) {
|
||||
if (tableId !== selected) {
|
||||
document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')')
|
||||
.forEach(function(elem) {
|
||||
elem.style.display = 'none';
|
||||
});
|
||||
function show(type) {
|
||||
count = 0;
|
||||
for (var key in data) {
|
||||
var row = document.getElementById(key);
|
||||
if ((data[key] & type) !== 0) {
|
||||
row.style.display = '';
|
||||
row.className = (count++ % 2) ? rowColor : altColor;
|
||||
}
|
||||
else
|
||||
row.style.display = 'none';
|
||||
}
|
||||
document.querySelectorAll('div.' + selected)
|
||||
.forEach(function(elem, index) {
|
||||
elem.style.display = '';
|
||||
var isEvenRow = index % (columns * 2) < columns;
|
||||
elem.classList.remove(isEvenRow ? oddRowColor : evenRowColor);
|
||||
elem.classList.add(isEvenRow ? evenRowColor : oddRowColor);
|
||||
});
|
||||
updateTabs(tableId, selected);
|
||||
updateTabs(type);
|
||||
}
|
||||
|
||||
function updateTabs(tableId, selected) {
|
||||
document.querySelector('div#' + tableId +' .summary-table')
|
||||
.setAttribute('aria-labelledby', selected);
|
||||
document.querySelectorAll('button[id^="' + tableId + '"]')
|
||||
.forEach(function(tab, index) {
|
||||
if (selected === tab.id || (tableId === selected && index === 0)) {
|
||||
tab.className = activeTableTab;
|
||||
tab.setAttribute('aria-selected', true);
|
||||
tab.setAttribute('tabindex',0);
|
||||
} else {
|
||||
tab.className = tableTab;
|
||||
tab.setAttribute('aria-selected', false);
|
||||
tab.setAttribute('tabindex',-1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function switchTab(e) {
|
||||
var selected = document.querySelector('[aria-selected=true]');
|
||||
if (selected) {
|
||||
if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) {
|
||||
// left or up arrow key pressed: move focus to previous tab
|
||||
selected.previousSibling.click();
|
||||
selected.previousSibling.focus();
|
||||
e.preventDefault();
|
||||
} else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) {
|
||||
// right or down arrow key pressed: move focus to next tab
|
||||
selected.nextSibling.click();
|
||||
selected.nextSibling.focus();
|
||||
e.preventDefault();
|
||||
function updateTabs(type) {
|
||||
for (var value in tabs) {
|
||||
var sNode = document.getElementById(tabs[value][0]);
|
||||
var spanNode = sNode.firstChild;
|
||||
if (value == type) {
|
||||
sNode.className = activeTableTab;
|
||||
spanNode.innerHTML = tabs[value][1];
|
||||
}
|
||||
else {
|
||||
sNode.className = tableTab;
|
||||
spanNode.innerHTML = "<a href=\"javascript:show("+ value + ");\">" + tabs[value][1] + "</a>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var updateSearchResults = function() {};
|
||||
|
||||
function indexFilesLoaded() {
|
||||
return moduleSearchIndex
|
||||
&& packageSearchIndex
|
||||
&& typeSearchIndex
|
||||
&& memberSearchIndex
|
||||
&& tagSearchIndex;
|
||||
function updateModuleFrame(pFrame, cFrame) {
|
||||
top.packageFrame.location = pFrame;
|
||||
top.classFrame.location = cFrame;
|
||||
}
|
||||
|
||||
// Workaround for scroll position not being included in browser history (8249133)
|
||||
document.addEventListener("DOMContentLoaded", function(e) {
|
||||
var contentDiv = document.querySelector("div.flex-content");
|
||||
window.addEventListener("popstate", function(e) {
|
||||
if (e.state !== null) {
|
||||
contentDiv.scrollTop = e.state;
|
||||
}
|
||||
});
|
||||
window.addEventListener("hashchange", function(e) {
|
||||
history.replaceState(contentDiv.scrollTop, document.title);
|
||||
});
|
||||
contentDiv.addEventListener("scroll", function(e) {
|
||||
var timeoutID;
|
||||
if (!timeoutID) {
|
||||
timeoutID = setTimeout(function() {
|
||||
history.replaceState(contentDiv.scrollTop, document.title);
|
||||
timeoutID = null;
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
if (!location.hash) {
|
||||
history.replaceState(contentDiv.scrollTop, document.title);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,6 @@
|
|||
#BlueJ class context
|
||||
comment0.target=GraphAlgo_Coloring_Schueler
|
||||
comment0.text=\n\ Dieser\ Algorithmus\ f\u00E4rbt\ einen\ Graphen,\ so\ dass\ keine\ benachbarten\ Knoten\n\ die\ gleiche\ Farbe\ haben\ und\ m\u00F6glichst\ wenige\ Farben\ benutzt\ werden.\n\ Algorithmus\:\ Beispieldatei,\ in\ der\ Sch\u00FCler\ den\ Algorithmus\ selbst\ umsetzen\ k\u00F6nnen\n\n\ @version\ 1.0\ from\ 10.12.2020\n\ @author\ Thomas\ Schaller\n
|
||||
comment0.text=\r\n\ Dieser\ Algorithmus\ f\u00E4rbt\ einen\ Graphen,\ so\ dass\ keine\ benachbarten\ Knoten\r\n\ die\ gleiche\ Farbe\ haben\ und\ m\u00F6glichst\ wenige\ Farben\ benutzt\ werden.\r\n\ Algorithmus\:\ Beispieldatei,\ in\ der\ Sch\u00FCler\ den\ Algorithmus\ selbst\ umsetzen\ k\u00F6nnen\r\n\r\n\ @version\ 1.0\ from\ 10.12.2020\r\n\ @author\ Thomas\ Schaller\r\n
|
||||
comment1.params=
|
||||
comment1.target=java.lang.String\ getBezeichnung()
|
||||
comment2.params=
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import algorithmen.*;
|
|||
|
||||
public class GraphAlgo_Coloring_Schueler extends GraphAlgo {
|
||||
|
||||
|
||||
Graph gr;
|
||||
|
||||
public String getBezeichnung() {
|
||||
return "Greedy-Coloring (toDo)";
|
||||
|
|
@ -29,7 +29,8 @@ public class GraphAlgo_Coloring_Schueler extends GraphAlgo {
|
|||
|
||||
// Anfang Methoden
|
||||
public void fuehreAlgorithmusAus() {
|
||||
getStartKnoten().setFarbe(3);
|
||||
gr = getGraph();
|
||||
getStartKnoten().setFarbe(3);
|
||||
|
||||
// Hole alle Knoten vom Graph g
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
#BlueJ package file
|
||||
objectbench.height=93
|
||||
objectbench.width=776
|
||||
objectbench.width=760
|
||||
package.divider.horizontal=0.599476439790576
|
||||
package.divider.vertical=0.8003992015968064
|
||||
package.editor.height=394
|
||||
package.editor.width=659
|
||||
package.divider.vertical=0.8
|
||||
package.editor.height=393
|
||||
package.editor.width=649
|
||||
package.editor.x=819
|
||||
package.editor.y=382
|
||||
package.frame.height=600
|
||||
package.frame.width=800
|
||||
package.numDependencies=0
|
||||
package.numTargets=1
|
||||
package.numTargets=2
|
||||
package.showExtends=true
|
||||
package.showUses=true
|
||||
readme.height=60
|
||||
|
|
@ -18,10 +18,17 @@ readme.name=@README
|
|||
readme.width=49
|
||||
readme.x=10
|
||||
readme.y=10
|
||||
target1.height=50
|
||||
target1.name=GraphAlgo_Coloring_Schueler
|
||||
target1.height=70
|
||||
target1.name=GraphAlgo_Dijkstra_Eigener
|
||||
target1.showInterface=false
|
||||
target1.type=ClassTarget
|
||||
target1.width=220
|
||||
target1.x=10
|
||||
target1.y=90
|
||||
target1.width=200
|
||||
target1.x=70
|
||||
target1.y=10
|
||||
target2.height=50
|
||||
target2.name=GraphAlgo_Coloring_Schueler
|
||||
target2.showInterface=false
|
||||
target2.type=ClassTarget
|
||||
target2.width=210
|
||||
target2.x=10
|
||||
target2.y=90
|
||||
|
|
|
|||
|
|
@ -456,6 +456,7 @@ public class Graph
|
|||
if (!isKnotenEnthalten(k)){
|
||||
kList.add(k);
|
||||
adList.add(new ArrayList<Kante>());
|
||||
k.setGraph(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -493,6 +494,7 @@ public class Graph
|
|||
}
|
||||
adList.remove(index);
|
||||
kList.remove(k);
|
||||
k.setGraph(null);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -577,6 +579,7 @@ public class Graph
|
|||
adList.get(kList.indexOf(e.getStart())).add(e);
|
||||
if(!gerichtet) adList.get(kList.indexOf(e.getZiel())).add(e);
|
||||
kaList.add(e);
|
||||
e.setGraph(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -625,8 +628,10 @@ public class Graph
|
|||
}
|
||||
}
|
||||
kaList.remove(e1);
|
||||
e1.setGraph(null);
|
||||
if(!gerichtet) {
|
||||
kaList.remove(e2);
|
||||
e2.setGraph(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -654,6 +659,8 @@ public class Graph
|
|||
* Loescht den gesamten Graphen
|
||||
*/
|
||||
public void loescheAlles() {
|
||||
for(Kante k : kaList) k.setGraph(null);
|
||||
for(Knoten k : kList) k.setGraph(null);
|
||||
adList.clear();
|
||||
kList.clear();
|
||||
kaList.clear();
|
||||
|
|
|
|||
|
|
@ -1,16 +1,229 @@
|
|||
package graph;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* Die Klasse GraphElement ist eine Oberklasse von Knoten und Kanten.
|
||||
* Sie ist nur für die interne Verarbeitung wichtig.
|
||||
*
|
||||
* @author Thomas Schaller
|
||||
* @version v1.1
|
||||
* @version 28.02.2023 (v7.0)
|
||||
* v7.0: Die am Element gespeicherten Informationen werden in einer Hashmap gespeichert. Daher können beliebige weitere Informationen abgelegt werden.
|
||||
* Es wird auch gespeichert, als welcher Typ die Information übergeben wurde.
|
||||
*/
|
||||
public abstract class GraphElement implements Comparable<GraphElement>
|
||||
{
|
||||
public abstract int compareTo(GraphElement e);
|
||||
public abstract String getStatus();
|
||||
public abstract void setStatus(String status);
|
||||
protected HashMap<String,String> daten;
|
||||
protected HashMap<String,String> typen;
|
||||
protected Graph g;
|
||||
protected String sortierKriterium;
|
||||
|
||||
public GraphElement() {
|
||||
daten = new HashMap<String,String>();
|
||||
typen = new HashMap<String,String>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Setzt den Status einer Kante, der in einem String gespeichert ist.
|
||||
* Form: markiert,geloescht,farbe
|
||||
* Dabei sind markiert und geloescht boolsche Werte (0 = false, 1 = true) und
|
||||
* die farbe eine Zahl
|
||||
* @param status Statusstring
|
||||
*/
|
||||
public void setStatus(String status) {
|
||||
List<String> items = Arrays.asList(status.split("\\s*,\\s*"));
|
||||
for(int i=0; i< items.size(); i++) {
|
||||
String[] pair = items.get(i).split(":");
|
||||
daten.put(pair[0], pair[1]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert den Status einer Kante als String.
|
||||
* Form: markiert,geloescht,farbe
|
||||
* Dabei sind markiert und geloescht boolsche Werte (0 = false, 1 = true) und
|
||||
* die farbe eine Zahl
|
||||
* @return Statusstring
|
||||
*/
|
||||
public String getStatus() {
|
||||
String s = "";
|
||||
for (String i : daten.keySet()) {
|
||||
s = s + ","+i+":"+daten.get(i);
|
||||
}
|
||||
s = s.substring(1);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
/** Setzt das Sortierkriterium des Knoten/der Kante.
|
||||
* @param name Bezeichnung des Wertes nach dem sortiert werden soll
|
||||
*/
|
||||
public void setSortierkriterium(String name) {
|
||||
sortierKriterium = name;
|
||||
}
|
||||
|
||||
/** Gibt die Beschreibung des Knoten / der Kante als Kurztext für die Anzeige im
|
||||
* Kreis bzw. Kasten zurück. Dabei wird jeder Eintrag der Liste als eigene Zeile
|
||||
* dargestellt. Es werden nur die Werte angezeigt. Es sind max. 2 Zeilen zulässig.
|
||||
* @param namen Namen der Werte, die im Kurztext angezeigt werden sollen.
|
||||
*/
|
||||
public abstract List<String> getKurztext(String[] namen);
|
||||
|
||||
/** Gibt die Beschreibung des Knoten / der Kante als Langtext für die Anzeige im
|
||||
* Tooltip-Fenster zurück. Dabei wird jeder Eintrag der Liste als eigene Zeile
|
||||
* dargestellt. Es wird jeweils die Bezeichnung und der Wert ausgegeben.
|
||||
* @param namen Namen der Werte, die im Tooltip angezeigt werden sollen.
|
||||
*/
|
||||
public abstract List<String> getLangtext(String[] namen);
|
||||
|
||||
/** Speichert den Graphen, in den Knoten/Kante eingefügt wurde. Damit kann er selbst seine Nummer
|
||||
* ermitteln.
|
||||
* @param g Graph
|
||||
*/
|
||||
public void setGraph(Graph g) {
|
||||
this.g = g;
|
||||
}
|
||||
|
||||
/** Speichert zusätzliche Daten am Knoten oder der Kante
|
||||
* @param name Bezeichnung der Art der Daten
|
||||
* @param wert Wert der zu speichernden Daten
|
||||
*/
|
||||
public void set(String name, String wert) {
|
||||
wert = wert.replaceAll(":", "");
|
||||
wert = wert.replaceAll(",", "");
|
||||
daten.put(name.toLowerCase(), wert);
|
||||
typen.put(name.toLowerCase(), "String");
|
||||
}
|
||||
|
||||
/** Speichert zusätzliche Daten am Knoten oder der Kante
|
||||
* Double.POSITIVE_INFINITY bzw. NEGATIVE_INFINITY wird als +/- unendlich dargestellt
|
||||
* @param name Bezeichnung der Art der Daten
|
||||
* @param wert Wert der zu speichernden Daten
|
||||
*/
|
||||
public void set(String name, double wert) {
|
||||
if(wert == Double.POSITIVE_INFINITY) {
|
||||
daten.put(name.toLowerCase(), "\u221e");
|
||||
|
||||
} else {
|
||||
if(wert == Double.NEGATIVE_INFINITY) {
|
||||
daten.put(name.toLowerCase(), "-\u221e");
|
||||
|
||||
} else {
|
||||
if((int) wert == wert) {
|
||||
daten.put(name.toLowerCase(), ""+(int) wert);
|
||||
} else {
|
||||
daten.put(name.toLowerCase(), ""+wert);
|
||||
}
|
||||
}
|
||||
}
|
||||
typen.put(name.toLowerCase(), "Number");
|
||||
}
|
||||
|
||||
/** Speichert zusätzliche Daten am Knoten oder der Kante
|
||||
* Integer.MAX_VALUE bzw. MIN_VALUE werden als +/- unendlich dargestellt.
|
||||
* @param name Bezeichnung der Art der Daten
|
||||
* @param wert Wert der zu speichernden Daten
|
||||
*/
|
||||
public void set(String name, int wert) {
|
||||
typen.put(name.toLowerCase(), "Number");
|
||||
|
||||
if(wert == Integer.MAX_VALUE) {
|
||||
daten.put(name.toLowerCase(), "\u221e");
|
||||
return;
|
||||
}
|
||||
if(wert == Integer.MIN_VALUE) {
|
||||
daten.put(name.toLowerCase(), "-\u221e");
|
||||
return;
|
||||
}
|
||||
daten.put(name.toLowerCase(), ""+wert);
|
||||
}
|
||||
|
||||
/** Speichert zusätzliche Daten am Knoten oder der Kante
|
||||
* @param name Bezeichnung der Art der Daten
|
||||
* @param wert Wert der zu speichernden Daten
|
||||
*/
|
||||
public void set(String name, boolean wert) {
|
||||
typen.put(name.toLowerCase(), "Boolean");
|
||||
daten.put(name.toLowerCase(), ""+wert);
|
||||
}
|
||||
|
||||
/** Gibt zusätzliche Daten als String zurück
|
||||
* @param name Bezeichnung der zusätzlichen Daten
|
||||
* @return Wert von "name" oder "", wenn name nicht gespeichert ist
|
||||
*/
|
||||
public String getString(String name) {
|
||||
if(daten.containsKey(name.toLowerCase())) {
|
||||
return daten.get(name.toLowerCase());
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/** Gibt zusätzliche Daten als int zurück
|
||||
* @param name Bezeichnung der zusätzlichen Daten
|
||||
* @return Wert von "name" oder 0, wenn name nicht gespeichert ist oder keine Zahl ist
|
||||
*/
|
||||
public int getInt(String name) {
|
||||
try{
|
||||
if(daten.get(name.toLowerCase()).equals("\u221e")) return Integer.MAX_VALUE;
|
||||
if(daten.get(name.toLowerCase()).equals("-\u221e")) return Integer.MIN_VALUE;
|
||||
return Integer.parseInt(daten.get(name.toLowerCase()));
|
||||
} catch(Exception e) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/** Gibt zusätzliche Daten als int zurück
|
||||
* @param name Bezeichnung der zusätzlichen Daten
|
||||
* @return Wert von "name" oder 0, wenn name nicht gespeichert ist oder keine Zahl ist
|
||||
*/
|
||||
public double getDouble(String name) {
|
||||
try{
|
||||
if(daten.get(name.toLowerCase()).equals("\u221e")) return Double.POSITIVE_INFINITY;
|
||||
if(daten.get(name.toLowerCase()).equals("-\u221e")) return Double.NEGATIVE_INFINITY;
|
||||
return Double.parseDouble(daten.get(name.toLowerCase()));
|
||||
} catch(Exception e) {
|
||||
return 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
/** Gibt zusätzliche Daten als int zurück
|
||||
* @param name Bezeichnung der zusätzlichen Daten
|
||||
* @return Wert von "name" oder false, wenn name nicht gespeichert ist oder kein Boolean ist
|
||||
*/
|
||||
public boolean getBoolean(String name) {
|
||||
try{
|
||||
return Boolean.parseBoolean(daten.get(name.toLowerCase()));
|
||||
} catch(Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/** Vergleicht den Knoten/Kante mit einem anderen Knoten/Kante bezüglich seines Sortierkriteriums
|
||||
* Das Sortierkriterium ist normalerweise der "Wert", kann aber mit setSortierkriterium gesetzt werden.
|
||||
* @param e anderer Knoten
|
||||
* @return kleiner 0 der andere Knoten hat einen größeren Wert, größer 0 der andere Knoten hat einen kleineren Wert, gleich 0 beide sind gleich
|
||||
*/
|
||||
public int compareTo(GraphElement e) {
|
||||
double w1, w2;
|
||||
String s1 = sortierKriterium.toLowerCase();
|
||||
String s2 = e.sortierKriterium.toLowerCase();
|
||||
if(!typen.get(s1).equals(e.typen.get(s2))) return 0;
|
||||
|
||||
if(typen.get(s1).equals("String")){
|
||||
return getString(s1).compareTo(e.getString(s2));
|
||||
}
|
||||
if(typen.get(s1).equals("Number")){
|
||||
return (int) (getDouble(s1) - e.getDouble(s2));
|
||||
}
|
||||
if(typen.get(s1).equals("Boolean")){
|
||||
if(getBoolean(s1) == e.getBoolean(s2)) return 0;
|
||||
if(getBoolean(s1)) return 1; else return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,10 +7,15 @@ import java.util.Arrays;
|
|||
* GraphPlotter angezeigt wird.
|
||||
*
|
||||
* @author Thomas Schaller
|
||||
* @version v6.7 (9.12.2020)
|
||||
* @version v7.0 (28.02.2023)
|
||||
* v7.0 Angezeigte Informationen bei Knoten/Kanten können ausgewählt werden
|
||||
*
|
||||
*/
|
||||
public class GraphOptions
|
||||
{
|
||||
// Graph
|
||||
Graph g;
|
||||
|
||||
// Bild
|
||||
public String bildDatei = "";
|
||||
public boolean bildAnzeigen = false;
|
||||
|
|
@ -22,6 +27,12 @@ public class GraphOptions
|
|||
public boolean showVertexText = false;
|
||||
public boolean showVertexInfo = false;
|
||||
|
||||
// Welche Informationen sollen bei Knoten und Kanten angezeigt werden
|
||||
public String[] kanteKurztext;
|
||||
public String[] kanteLangtext;
|
||||
public String[] knotenKurztext = {"Wert"};
|
||||
public String[] knotenLangtext = {"Infotext","Wert","Markiert","Besucht"};
|
||||
|
||||
// Speicheroption
|
||||
public boolean saveAsMatrix = false;
|
||||
|
||||
|
|
@ -36,7 +47,15 @@ public class GraphOptions
|
|||
public GraphElement parent = null;
|
||||
public int auswahl = 0; // 0 = alle, 1 = Nachbarn, 2 = Single
|
||||
|
||||
public GraphOptions() {
|
||||
public GraphOptions(Graph g) {
|
||||
this.g = g;
|
||||
if(g.isGewichtet()) {
|
||||
kanteKurztext = new String[]{"Gewicht"};
|
||||
kanteLangtext = new String[]{"Gewicht","Markiert","Gelöscht"};
|
||||
} else {
|
||||
kanteKurztext = new String[]{};
|
||||
kanteLangtext = new String[]{"Markiert","Gelöscht"};
|
||||
}
|
||||
}
|
||||
|
||||
public void ladeGraph(Table csvParser) {
|
||||
|
|
@ -145,7 +164,7 @@ public class GraphOptions
|
|||
}
|
||||
|
||||
public GraphOptions copy() {
|
||||
GraphOptions kopie = new GraphOptions();
|
||||
GraphOptions kopie = new GraphOptions(g);
|
||||
kopie.bildDatei= bildDatei;
|
||||
kopie.bildAnzeigen = bildAnzeigen;
|
||||
kopie.vertexSize = vertexSize;
|
||||
|
|
@ -161,6 +180,10 @@ public class GraphOptions
|
|||
kopie.fokusArt = fokusArt;
|
||||
kopie.auswahl = auswahl;
|
||||
kopie.parent = parent;
|
||||
kopie.kanteKurztext = kanteKurztext.clone();
|
||||
kopie.knotenKurztext = knotenKurztext.clone();
|
||||
kopie.kanteLangtext = kanteLangtext.clone();
|
||||
kopie.knotenLangtext = knotenLangtext.clone();
|
||||
return kopie;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
package graph;
|
||||
|
||||
import imp.*;
|
||||
import javafx.beans.property.BooleanProperty;
|
||||
import javafx.beans.property.ObjectProperty;
|
||||
import javafx.beans.property.SimpleObjectProperty;
|
||||
import javafx.beans.property.SimpleBooleanProperty;
|
||||
import java.awt.Graphics2D;
|
||||
|
||||
import javafx.geometry.Point2D;
|
||||
import javafx.geometry.Pos;
|
||||
|
|
@ -12,13 +17,18 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import javafx.scene.control.Tooltip;
|
||||
import javafx.util.Duration;
|
||||
import javafx.animation.AnimationTimer;
|
||||
import java.awt.image.*;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
/**
|
||||
* Der GraphPlotter ist das Herzstueck der Visualisierung und dient als Schnittstelle zur GUI.
|
||||
*
|
||||
* @author Thomas Schaller
|
||||
* @version 09.12.2020 (v6.7)
|
||||
* @version 07.02.2023 (v7.0)
|
||||
* v6.9: Context-Menü schließt, wenn an andere Stelle geklickt wird
|
||||
* v7.0: MouseOver - Infos für Knoten und Kanten, Infos können ausgewählt werden.
|
||||
*
|
||||
*/
|
||||
public class GraphPlotter extends PictureViewer {
|
||||
// Anfang Attribute
|
||||
|
|
@ -38,6 +48,9 @@ public class GraphPlotter extends PictureViewer {
|
|||
private GraphElement restrictTo = null;
|
||||
private Point2D offset = new Point2D(0,0);
|
||||
|
||||
private ObjectProperty<Point2D> mouseLocation = new SimpleObjectProperty<Point2D>(new Point2D(0, 0));
|
||||
private BooleanProperty mouseMoving = new SimpleBooleanProperty();
|
||||
|
||||
// private JTextArea jTAMeldungen = new JTextArea("");
|
||||
// private JScrollPane jTAMeldungenScrollPane = new JScrollPane(jTAMeldungen);
|
||||
|
||||
|
|
@ -51,36 +64,41 @@ public class GraphPlotter extends PictureViewer {
|
|||
* @param String hintergrundBild Gibt den Namen eines Hintergrundbildes an
|
||||
*/
|
||||
public GraphPlotter() {
|
||||
options = new GraphOptions();
|
||||
graph = new Graph();
|
||||
options = new GraphOptions(graph);
|
||||
|
||||
this.setStyle("-fx-background:#FFFFE8");
|
||||
|
||||
// add(jTAMeldungenScrollPane, BorderLayout.SOUTH);
|
||||
setOnMouseClicked(mouseEvent -> mouseClicked(mouseEvent));
|
||||
// setOnMouseMoved(mouseEvent -> { mouseX = mouseEvent.getSceneX(); mouseY = mouseEvent.getSceneY(); t.hide();});
|
||||
this.widthProperty().addListener((value, oldWidth, newWidth) -> updateImage());
|
||||
this.heightProperty().addListener((value, oldWidth, newWidth) -> updateImage());
|
||||
|
||||
// t = new Tooltip();
|
||||
// Tooltip.install(this, t);
|
||||
// t.setPrefWidth(80);
|
||||
// t.setWrapText(true);
|
||||
// t.setHideOnEscape(true);
|
||||
// t.setStyle("-fx-background: rgba(30,30,30); -fx-text-fill: black; -fx-background-color: rgba(230,230,90,0.8);"+
|
||||
// "-fx-background-radius: 6px; -fx-background-insets: 0; -fx-padding: 0.667em 0.75em 0.667em 0.75em; "+
|
||||
// " -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.5) , 10, 0.0 , 0 , 3 ); -fx-font-size: 0.85em;");
|
||||
setOnMouseMoved(e -> mouseLocation.set(new Point2D(e.getSceneX(), e.getSceneY())));
|
||||
mouseMoving.addListener((obs, wasMoving, isNowMoving) -> {
|
||||
updateImage();
|
||||
});
|
||||
|
||||
// t.setShowDelay(Duration.seconds(1));
|
||||
// t.setOnShowing(ev -> {// called just prior to being shown
|
||||
// Point2D local = this.getContent().sceneToLocal(mouseX, mouseY);
|
||||
// Knoten k = getKnotenAt((int) local.getX(), (int) local.getY());
|
||||
// if(k == null) {
|
||||
// t.hide();
|
||||
// } else {
|
||||
// t.setText("Knoten Nr. "+graph.getNummer(k)+"\nWert: "+k.getDoubleWert());
|
||||
// }
|
||||
// });
|
||||
AnimationTimer timer = new AnimationTimer() {
|
||||
private double lastMouseX ;
|
||||
private double lastMouseY ;
|
||||
long lastMouseMovement ;
|
||||
long MIN_STATIONARY_TIME = 2000;
|
||||
@Override
|
||||
public void handle(long timestamp) {
|
||||
double x = mouseLocation.get().getX();
|
||||
double y = mouseLocation.get().getY();
|
||||
if (Math.abs(lastMouseX-x) > 5 || Math.abs(lastMouseY-y)>5) {
|
||||
lastMouseMovement = timestamp ;
|
||||
lastMouseX = x;
|
||||
lastMouseY = y;
|
||||
}
|
||||
|
||||
mouseMoving.set(timestamp - lastMouseMovement < MIN_STATIONARY_TIME);
|
||||
|
||||
}
|
||||
};
|
||||
timer.start();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -101,10 +119,10 @@ public class GraphPlotter extends PictureViewer {
|
|||
|
||||
public void setRestrictTo(GraphElement k) {
|
||||
if(restrictTo != k) {
|
||||
restrictTo = k;
|
||||
selected.clear();
|
||||
if (k!= null) selected.add(k);
|
||||
updateImage();
|
||||
restrictTo = k;
|
||||
selected.clear();
|
||||
if (k!= null) selected.add(k);
|
||||
updateImage();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -175,7 +193,9 @@ public class GraphPlotter extends PictureViewer {
|
|||
Point2D local = this.getContent().sceneToLocal(mouseEvent.getSceneX(), mouseEvent.getSceneY());
|
||||
Knoten k = getKnotenAt((int) local.getX(), (int) local.getY());
|
||||
if(dragMode == 3 && k==null && getKanteAt((int) local.getX(), (int) local.getY())==null) { // neuer Knoten
|
||||
graph.neuerKnoten(new Knoten((int)local.getX(), (int) local.getY())) ;
|
||||
if(getContextMenu() == null) {
|
||||
graph.neuerKnoten(new Knoten((int)local.getX(), (int) local.getY())) ;
|
||||
} else { setContextMenu(null); }
|
||||
} else {
|
||||
if(dragMode == 2 && k != null && k != dragKnoten) {
|
||||
graph.neueKante(dragKnoten, k, 0.0);
|
||||
|
|
@ -323,6 +343,9 @@ public class GraphPlotter extends PictureViewer {
|
|||
}
|
||||
|
||||
public Picture updateImage() {
|
||||
Picture p = new Picture(2000,2000,"FFFFE8");
|
||||
Graphics2D g = (Graphics2D) p.getImage().getGraphics();
|
||||
|
||||
Knoten restrictToKnoten = null;
|
||||
Kante restrictToKante = null;
|
||||
if(restrictTo != null && restrictTo instanceof Knoten) restrictToKnoten = (Knoten) restrictTo;
|
||||
|
|
@ -340,8 +363,6 @@ public class GraphPlotter extends PictureViewer {
|
|||
miny = Math.min(miny,k.getY());
|
||||
}
|
||||
|
||||
Picture p = new Picture(2000,2000,"FFFFE8");
|
||||
|
||||
if(restrictToKnoten != null) {
|
||||
knoten = graph.getNachbarknoten(restrictToKnoten);
|
||||
kanten = graph.getAusgehendeKanten(restrictToKnoten);
|
||||
|
|
@ -464,15 +485,28 @@ public class GraphPlotter extends PictureViewer {
|
|||
}
|
||||
|
||||
}
|
||||
if(options.showEdgeWeights && graph.isGewichtet()) {
|
||||
if(options.showEdgeWeights) {
|
||||
|
||||
double my = (startY+startY+endY)/3;
|
||||
double mx = (startX+startX+endX)/3;
|
||||
|
||||
p.fill(255);
|
||||
p.stroke(0);
|
||||
p.strokeWeight(1);
|
||||
p.rect((int) mx-15, (int) my-7, 30, 16);
|
||||
p.fill(0);
|
||||
p.text(format(k.getGewicht()), (int) mx, (int) my);
|
||||
|
||||
int lh = g.getFontMetrics().getAscent();
|
||||
List<String> t = k.getKurztext(options.kanteKurztext);
|
||||
if(t.size() == 1) {
|
||||
p.rect((int) mx-15, (int) my-(lh+4)/2, 30, lh+4);
|
||||
p.fill(0);
|
||||
p.text(t.get(0), (int) mx, (int) my);
|
||||
}
|
||||
if(t.size() > 1) {
|
||||
p.rect((int) mx-15, (int) my-(lh+2), 30, lh*2+4);
|
||||
p.fill(0);
|
||||
p.text(t.get(0), (int) mx, (int) my-lh/2);
|
||||
p.text(t.get(1), (int) mx, (int) my+lh/2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -499,7 +533,14 @@ public class GraphPlotter extends PictureViewer {
|
|||
p.text(""+graph.getNummer(k), k.getX(), k.getY());
|
||||
} else {
|
||||
if (options.showVertexValue) {
|
||||
p.text(format(k.getDoubleWert()), k.getX(), k.getY());
|
||||
List<String> t = k.getKurztext(options.knotenKurztext);
|
||||
if(t.size() == 1) {
|
||||
p.text(t.get(0), k.getX(), k.getY());
|
||||
} else {
|
||||
int lh = g.getFontMetrics().getAscent();
|
||||
p.text(t.get(0), k.getX(), k.getY()-lh/2);
|
||||
p.text(t.get(1), k.getX(), k.getY()+lh/2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -511,6 +552,43 @@ public class GraphPlotter extends PictureViewer {
|
|||
}
|
||||
|
||||
}
|
||||
// Tooltip anzeigen, aber nicht wenn im Editiermodus
|
||||
if(!mouseMoving.get() && !editable) {
|
||||
Point2D local = this.getContent().sceneToLocal(mouseLocation.get().getX(), mouseLocation.get().getY());
|
||||
|
||||
int x = (int) local.getX();
|
||||
int y = (int) local.getY();
|
||||
|
||||
// sowohl bei Kante wie auch Knoten
|
||||
GraphElement k = getKnotenAt(x,y);
|
||||
if(k == null) { k = getKanteAt(x,y);}
|
||||
if(k != null) {
|
||||
p.fill(200);
|
||||
p.stroke(0);
|
||||
p.strokeWeight(2);
|
||||
|
||||
List<String> t;
|
||||
if(k instanceof Knoten) t = k.getLangtext(options.knotenLangtext);
|
||||
else t = k.getLangtext(options.kanteLangtext);
|
||||
|
||||
// Größe des Kastens berechnen
|
||||
int w = 0;
|
||||
int lh = g.getFontMetrics().getAscent();
|
||||
int h = t.size() * lh;
|
||||
for(int i = 0; i<t.size(); i++) {
|
||||
int w2 = g.getFontMetrics().stringWidth(t.get(i));
|
||||
if(w2 > w) w = w2;
|
||||
}
|
||||
|
||||
// Rechteck mit Text ausgeben
|
||||
p.rect(x, y, w+16, h+10);
|
||||
p.fill("303030");
|
||||
for(int i = 0; i<t.size(); i++) {
|
||||
p.text(t.get(i), x+8, y+(i+1)*lh+3);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
this.setImage(p, false);
|
||||
Picture zugeschnitten = new Picture(maxx-minx+2*options.vertexSize,maxy-miny+2*options.vertexSize);
|
||||
|
|
@ -518,7 +596,6 @@ public class GraphPlotter extends PictureViewer {
|
|||
return zugeschnitten;
|
||||
}
|
||||
|
||||
|
||||
public GraphOptions getGraphOptions() {
|
||||
return options;
|
||||
}
|
||||
|
|
|
|||
113
graph/Kante.java
113
graph/Kante.java
|
|
@ -1,7 +1,7 @@
|
|||
package graph;
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Die Klasse Kante beschreibt die Datenstruktur einer Kante, bestehend aus Startknoten, Gewicht und Zielknoten.
|
||||
|
|
@ -10,16 +10,15 @@ import java.util.Arrays;
|
|||
* Auch soll sie das Kantengewicht verwalten und Aufschluss darueber geben, ob sie gefaerbt/geloescht ist oder nicht.
|
||||
*
|
||||
* @author Dirk Zechnall, Thomas Schaller
|
||||
* @version 22.07.2020 (v6.4)
|
||||
* @version 28.02.2023 (v7.0)
|
||||
* v7.0: Die Kanteninformationen werden in einer Hashmap gespeichert. Daher können beliebige weitere Informationen abgelegt werden.
|
||||
|
||||
*/
|
||||
public class Kante extends GraphElement
|
||||
{
|
||||
private Knoten start;
|
||||
private Knoten ziel;
|
||||
private double gewicht;
|
||||
private boolean markiert = false;
|
||||
private boolean geloescht = false;
|
||||
private int farbe = -1;
|
||||
|
||||
|
||||
/**
|
||||
* Der Konstruktor erstellt eine neue Kante mit Start- und Zielknoten und Kantengewicht.
|
||||
|
|
@ -30,7 +29,12 @@ public class Kante extends GraphElement
|
|||
* @param neuesGewicht Das neue Kantengewicht
|
||||
*/
|
||||
public Kante (Knoten neuerStart, Knoten neuerZiel, double neuesGewicht) {
|
||||
gewicht = neuesGewicht;
|
||||
super();
|
||||
set("Gewicht",neuesGewicht);
|
||||
set("Markiert", false);
|
||||
set("Gelöscht", false);
|
||||
set("Farbe", -1);
|
||||
setSortierkriterium("Gewicht");
|
||||
start = neuerStart;
|
||||
ziel = neuerZiel;
|
||||
}
|
||||
|
|
@ -39,42 +43,58 @@ public class Kante extends GraphElement
|
|||
* Die Methode init initialisiert die Kantenfaerbung (auf unmarkiert)
|
||||
*/
|
||||
protected void init() {
|
||||
markiert = false;
|
||||
geloescht = false;
|
||||
set("Markiert", false);
|
||||
set("Gelöscht", false);
|
||||
set("Farbe", -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setzt den Status einer Kante, der in einem String gespeichert ist.
|
||||
* Form: markiert,geloescht,farbe
|
||||
* Dabei sind markiert und geloescht boolsche Werte (0 = false, 1 = true) und
|
||||
* die farbe eine Zahl
|
||||
* @param status Statusstring
|
||||
* Liefert einen kurzen Text, der den Wert des Knotens angibt und innerhalb der Kreises
|
||||
* des Knotens angezeigt werden kann.
|
||||
* @return Array von Anzeigezeilen (dürfen max. 2 sein)
|
||||
*/
|
||||
public void setStatus(String status) {
|
||||
List<String> items = Arrays.asList(status.split("\\s*,\\s*"));
|
||||
this.markiert = items.get(0).equals("1");
|
||||
this.geloescht = items.get(1).equals("1");
|
||||
this.farbe = Integer.parseInt(items.get(2));
|
||||
public List<String> getKurztext(String[] namen) {
|
||||
int l = Math.min(namen.length,2);
|
||||
List<String> t = new ArrayList<String>();
|
||||
for(int i = 0; i<l; i++) {
|
||||
t.add(getString(namen[i]));
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert den Status einer Kante als String.
|
||||
* Form: markiert,geloescht,farbe
|
||||
* Dabei sind markiert und geloescht boolsche Werte (0 = false, 1 = true) und
|
||||
* die farbe eine Zahl
|
||||
* @return Statusstring
|
||||
* Liefert eine ausführliche Beschreibung der Werte des Knoten. Wird in dem Tooltext Fenster
|
||||
* angezeigt, wenn man mit der Maus über den Knoten geht.
|
||||
* @return Array von Anzeigezeilen
|
||||
*/
|
||||
public String getStatus() {
|
||||
return ""+(markiert ? "1," : "0,")+ (geloescht ? "1," : "0,")+ farbe;
|
||||
public List<String> getLangtext(String[] namen) {
|
||||
int l = namen.length;
|
||||
List<String> t = new ArrayList<String>();
|
||||
|
||||
String symbol = "<->";
|
||||
if(g.isGerichtet()) symbol = "->";
|
||||
if(!start.getInfotext().equals("") && !ziel.getInfotext().equals("")) {
|
||||
t.add(start.getInfotext()+" "+symbol+" "+ziel.getInfotext());
|
||||
} else {
|
||||
t.add("Knoten Nr."+g.getNummer(start)+" "+symbol+" Knoten Nr."+g.getNummer(ziel));
|
||||
}
|
||||
|
||||
for(int i = 0; i<l; i++) {
|
||||
String w =getString(namen[i]);
|
||||
if(!w.isBlank())
|
||||
t.add(namen[i]+": "+w);
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Setzt das Gewicht der Kante
|
||||
*
|
||||
* @param neuesGewicht Das neu zu setzende Gewicht
|
||||
*/
|
||||
public void setGewicht(double neuesGewicht) {
|
||||
gewicht = neuesGewicht;
|
||||
set("Gewicht", neuesGewicht);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -83,7 +103,7 @@ public class Kante extends GraphElement
|
|||
* @return Gewicht der Kante
|
||||
*/
|
||||
public double getGewicht() {
|
||||
return gewicht;
|
||||
return getDouble("Gewicht");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -91,8 +111,8 @@ public class Kante extends GraphElement
|
|||
*
|
||||
* @param neuerSatrtKnoten Der neu zu setzende Startknoten
|
||||
*/
|
||||
public void setStart(Knoten neuerSatrtKnoten) {
|
||||
start = neuerSatrtKnoten;
|
||||
public void setStart(Knoten neuerStartKnoten) {
|
||||
start = neuerStartKnoten;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -139,7 +159,7 @@ public class Kante extends GraphElement
|
|||
* @param wert Der neu zu setzende markiert-Wert
|
||||
*/
|
||||
public void setMarkiert(boolean wert) {
|
||||
markiert = wert;
|
||||
set("markiert", wert);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -148,7 +168,7 @@ public class Kante extends GraphElement
|
|||
* @return markiert?
|
||||
*/
|
||||
public boolean isMarkiert() {
|
||||
return markiert;
|
||||
return getBoolean("markiert");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -157,7 +177,7 @@ public class Kante extends GraphElement
|
|||
* @param wert Der neu zu setzende gelöscht-Wert
|
||||
*/
|
||||
public void setGeloescht(boolean wert) {
|
||||
geloescht = wert;
|
||||
set("Gelöscht", wert);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -166,7 +186,7 @@ public class Kante extends GraphElement
|
|||
* @return gelöscht?
|
||||
*/
|
||||
public boolean isGeloescht() {
|
||||
return geloescht;
|
||||
return getBoolean("Gelöscht");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -176,12 +196,12 @@ public class Kante extends GraphElement
|
|||
* @return Nummer der Farbe
|
||||
*/
|
||||
public int getFarbe() {
|
||||
if(farbe == -1) {
|
||||
if(geloescht) return 2;
|
||||
if(markiert) return 1;
|
||||
if(getInt("Farbe") == -1) {
|
||||
if(isGeloescht()) return 2;
|
||||
if(isMarkiert()) return 1;
|
||||
return 0;
|
||||
}
|
||||
return farbe;
|
||||
return getInt("Farbe");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -190,7 +210,7 @@ public class Kante extends GraphElement
|
|||
*/
|
||||
public void setFarbe(int farbe) {
|
||||
if(farbe>=0 && farbe < 20)
|
||||
this.farbe = farbe;
|
||||
set("Farbe",farbe);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -198,19 +218,10 @@ public class Kante extends GraphElement
|
|||
*/
|
||||
|
||||
public void setStandardFarbe() {
|
||||
farbe = -1;
|
||||
setFarbe(-1);
|
||||
}
|
||||
|
||||
/** Vergleicht die Kante mit einer anderen Kante bezüglich ihres Gewichts
|
||||
* @param e andere Kante
|
||||
* @return kleiner 0 die andere Kante hat ein größeres Gewicht, größer 0 die andere Kante hat ein kleineres Gewicht, gleich 0 beides sind gleich
|
||||
*/
|
||||
public int compareTo(GraphElement e) {
|
||||
double w1, w2;
|
||||
if(e instanceof Knoten) w1 = ((Knoten) e).getDoubleWert(); else w1 = ((Kante) e).getGewicht();
|
||||
w2 = getGewicht();
|
||||
return (int) (w2-w1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Die Methode ueberschreibt die Methode toString() und gibt die String-Raepraesentation einer Kante zurueck
|
||||
|
|
@ -219,7 +230,7 @@ public class Kante extends GraphElement
|
|||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return " --("+gewicht+")--> ";
|
||||
return " --("+getGewicht()+")--> ";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package graph;
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Diese Klasse Knoten definiert einen Knoten.
|
||||
|
|
@ -8,17 +9,16 @@ import java.util.Arrays;
|
|||
* Im Infotext kann eine zusätzliche Information für die Anzeige gespeichert werden.
|
||||
*
|
||||
* @author Dirk Zechnall, Thomas Schaller
|
||||
* @version 22.07.2020 (v6.4)
|
||||
* @version 28.02.2023 (v7.0)
|
||||
* v7.0: Die Knoteninformationen werden in einer Hashmap gespeichert. Daher können beliebige weitere Informationen abgelegt werden.
|
||||
*/
|
||||
public class Knoten extends GraphElement
|
||||
{
|
||||
private String infotext;
|
||||
private double wert; // wird z.B. fuer den Colorierungs-Algorithmus verwendet - speichert da die Farben (codiert als Zahlen)
|
||||
private boolean istMarkiert = false;
|
||||
private boolean istBesucht = false;
|
||||
|
||||
|
||||
private int x;
|
||||
private int y;
|
||||
private int farbe = -1;
|
||||
|
||||
/**
|
||||
* Der Konstruktor erstellt einen neuen Knoten mit einem neuen Namen
|
||||
*
|
||||
|
|
@ -26,10 +26,7 @@ public class Knoten extends GraphElement
|
|||
* @param y y-Position des Knotens
|
||||
*/
|
||||
public Knoten(int x, int y) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
wert = 0;
|
||||
infotext = "";
|
||||
this(x,y,0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -40,62 +37,74 @@ public class Knoten extends GraphElement
|
|||
* @param neuerWert Der neue Wert des Knotens
|
||||
*/
|
||||
public Knoten(int x, int y, double neuerWert) {
|
||||
super();
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
wert = neuerWert;
|
||||
infotext = "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Setzt den Status eines Knotens aus einem Status-String
|
||||
* Format: wert,markiert,besucht,farbe
|
||||
* wobei wert eine double-Zahl, mariert und besucht ein boolean-Wert (0=false, 1 = true) und
|
||||
* farbe eine zahl ist.
|
||||
*
|
||||
* @param status Der Statusstring
|
||||
*/
|
||||
public void setStatus(String status) {
|
||||
List<String> items = Arrays.asList(status.split("\\s*,\\s*"));
|
||||
this.wert = Double.parseDouble(items.get(0)); // wird z.B. fuer den Colorierungs-Algorithmus verwendet - speichert da die Farben (codiert als Zahlen)
|
||||
this.istMarkiert = items.get(1).equals("1");
|
||||
this.istBesucht = items.get(2).equals("1");
|
||||
this.farbe = Integer.parseInt(items.get(3));
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert den Status eines Knotens als Status-String
|
||||
* Format: wert,markiert,besucht,farbe
|
||||
* wobei wert eine double-Zahl, mariert und besucht ein boolean-Wert (0=false, 1 = true) und
|
||||
* farbe eine zahl ist.
|
||||
*
|
||||
* @return Der Statusstring
|
||||
*/
|
||||
public String getStatus() {
|
||||
return ""+wert+","+(istMarkiert ? "1," : "0,")+ (istBesucht ? "1," : "0,")+ farbe;
|
||||
set("Wert",neuerWert);
|
||||
set("Markiert", false);
|
||||
set("Geloescht", false);
|
||||
set("Farbe", -1);
|
||||
setSortierkriterium("Wert");
|
||||
}
|
||||
|
||||
/**
|
||||
* Die Methode init initialisiert den Zustand eines Knotens
|
||||
*/
|
||||
protected void init() {
|
||||
wert = 0.0;
|
||||
farbe = -1;
|
||||
istMarkiert = false;
|
||||
istBesucht = false;
|
||||
set("Wert", 0.0);
|
||||
set("Farbe", -1);
|
||||
set("Markiert", false);
|
||||
set("Besucht", false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert einen kurzen Text, der den Wert des Knotens angibt und innerhalb der Kreises
|
||||
* des Knotens angezeigt werden kann.
|
||||
* @return Array von Anzeigezeilen (dürfen max. 2 sein)
|
||||
*/
|
||||
public List<String> getKurztext(String[] namen) {
|
||||
int l = Math.min(namen.length,2);
|
||||
List<String> t = new ArrayList<String>();
|
||||
for(int i = 0; i<l; i++) {
|
||||
String text = getString(namen[i]);
|
||||
if(text.length()>3)
|
||||
t.add(text.substring(0,3));
|
||||
else
|
||||
t.add(text);
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert eine ausführliche Beschreibung der Werte des Knoten. Wird in dem Tooltext Fenster
|
||||
* angezeigt, wenn man mit der Maus über den Knoten geht.
|
||||
* @return Array von Anzeigezeilen
|
||||
*/
|
||||
public List<String> getLangtext(String[] namen) {
|
||||
int l = namen.length;
|
||||
List<String> t = new ArrayList<String>();
|
||||
t.add("Knoten Nr. "+g.getNummer(this));
|
||||
for(int i = 0; i<l; i++) {
|
||||
String w =getString(namen[i]);
|
||||
if(!w.isEmpty())
|
||||
t.add(namen[i]+": "+w);
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
|
||||
/** Setzt den Infotext für einen Knoten
|
||||
* @param infotext Der neue Text
|
||||
*/
|
||||
public void setInfotext(String infotext) {
|
||||
this.infotext = infotext;
|
||||
set("Infotext", infotext);
|
||||
}
|
||||
|
||||
/** Liefert den Infotext des Knotens
|
||||
* @return Der Infotext
|
||||
*/
|
||||
public String getInfotext(){
|
||||
return infotext;
|
||||
return getString("Infotext");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -104,7 +113,7 @@ public class Knoten extends GraphElement
|
|||
* @param neuerWert Der neu zu setzende Wert
|
||||
*/
|
||||
public void setWert(double neuerWert) {
|
||||
wert = neuerWert;
|
||||
set("Wert", neuerWert);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -113,7 +122,7 @@ public class Knoten extends GraphElement
|
|||
* @return Wert des Knotens
|
||||
*/
|
||||
public int getIntWert() {
|
||||
return (int) wert;
|
||||
return getInt("Wert");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -122,7 +131,7 @@ public class Knoten extends GraphElement
|
|||
* @return Wert des Knotens
|
||||
*/
|
||||
public double getDoubleWert() {
|
||||
return wert;
|
||||
return getDouble("Wert");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -131,7 +140,7 @@ public class Knoten extends GraphElement
|
|||
* @param markiert Der neu zu setzende Markiertwert
|
||||
*/
|
||||
public void setMarkiert(boolean markiert) {
|
||||
istMarkiert = markiert;
|
||||
set("Markiert", markiert);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -140,7 +149,7 @@ public class Knoten extends GraphElement
|
|||
* @return markiert?
|
||||
*/
|
||||
public boolean isMarkiert() {
|
||||
return istMarkiert;
|
||||
return getBoolean("Markiert");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -148,8 +157,8 @@ public class Knoten extends GraphElement
|
|||
*
|
||||
* @param markiert Der neu zu setzende Besuchtwert
|
||||
*/
|
||||
public void setBesucht(boolean markiert) {
|
||||
istBesucht = markiert;
|
||||
public void setBesucht(boolean besucht) {
|
||||
set("Besucht",besucht);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -158,10 +167,9 @@ public class Knoten extends GraphElement
|
|||
* @return besucht?
|
||||
*/
|
||||
public boolean isBesucht() {
|
||||
return istBesucht;
|
||||
return getBoolean("Besucht");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gibt den Index der Farbe des Knoten zurück.
|
||||
* Standardmäßig hängt die Farbe von den Attributen markiert und besucht ab.
|
||||
|
|
@ -169,17 +177,17 @@ public class Knoten extends GraphElement
|
|||
* @return Farbe des Knotens
|
||||
*/
|
||||
public int getFarbe() {
|
||||
if (farbe == -1) {
|
||||
if (getInt("Farbe") == -1) {
|
||||
int f = 0;
|
||||
if(istMarkiert) {
|
||||
if(isMarkiert()) {
|
||||
f += 1;
|
||||
}
|
||||
if(istBesucht) {
|
||||
if(isBesucht()) {
|
||||
f += 2;
|
||||
}
|
||||
return f;
|
||||
}
|
||||
return farbe;
|
||||
return getInt("Farbe");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -190,7 +198,7 @@ public class Knoten extends GraphElement
|
|||
*/
|
||||
|
||||
public void setFarbe(int farbe) {
|
||||
this.farbe = farbe;
|
||||
set("Farbe",farbe);
|
||||
}
|
||||
|
||||
/** Gibt zurück, ob die Knotenfarbe automatisch aus den Attributen ermittelt wird.
|
||||
|
|
@ -198,7 +206,7 @@ public class Knoten extends GraphElement
|
|||
|
||||
*/
|
||||
public boolean isFarbeAutomatisch() {
|
||||
return this.farbe == -1;
|
||||
return getInt("Farbe") == -1;
|
||||
}
|
||||
|
||||
/** Legt fest, ob die Knotenfarbe automatisch aus den Attributen ermittelt wird.
|
||||
|
|
@ -207,9 +215,9 @@ public class Knoten extends GraphElement
|
|||
*/
|
||||
public void setFarbeAutomatisch(boolean auto) {
|
||||
if(auto) {
|
||||
farbe = -1;
|
||||
set("Farbe", -1);
|
||||
} else {
|
||||
if(farbe == -1) farbe = 0;
|
||||
if(isFarbeAutomatisch()) set("Farbe", 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -236,19 +244,9 @@ public class Knoten extends GraphElement
|
|||
|
||||
/** Setzt die y-Position des Knotens
|
||||
* @param y y-Postion
|
||||
*/ public void setY(int y) {
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
/** Vergleicht den Knoten mit einem anderen Knoten bezüglich seines Werts
|
||||
* @param e anderer Knoten
|
||||
* @return kleiner 0 der andere Knoten hat einen größeren Wert, größer 0 der andere Knoten hat einen kleineren Wert, gleich 0 beide sind gleich
|
||||
*/
|
||||
public int compareTo(GraphElement e) {
|
||||
double w1, w2;
|
||||
if(e instanceof Knoten) w1 = ((Knoten) e).getDoubleWert(); else w1 = ((Kante) e).getGewicht();
|
||||
w2 = getDoubleWert();
|
||||
return (int) (w2-w1);
|
||||
public void setY(int y) {
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -258,6 +256,7 @@ public class Knoten extends GraphElement
|
|||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "["+infotext+","+wert+","+istMarkiert+","+istBesucht+"]";
|
||||
|
||||
return getStatus();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,50 +5,47 @@ dependency1.type=UsesDependency
|
|||
dependency10.from=GraphOptions
|
||||
dependency10.to=GraphElement
|
||||
dependency10.type=UsesDependency
|
||||
dependency11.from=Knoten
|
||||
dependency11.to=GraphElement
|
||||
dependency11.from=Hilfe
|
||||
dependency11.to=GraphPlotter
|
||||
dependency11.type=UsesDependency
|
||||
dependency12.from=Knoten
|
||||
dependency12.to=Kante
|
||||
dependency12.from=Kante
|
||||
dependency12.to=Knoten
|
||||
dependency12.type=UsesDependency
|
||||
dependency13.from=Hilfe
|
||||
dependency13.to=GraphPlotter
|
||||
dependency13.type=UsesDependency
|
||||
dependency2.from=Graph
|
||||
dependency2.to=Kante
|
||||
dependency2.type=UsesDependency
|
||||
dependency3.from=Kante
|
||||
dependency3.to=Knoten
|
||||
dependency3.from=GraphElement
|
||||
dependency3.to=Graph
|
||||
dependency3.type=UsesDependency
|
||||
dependency4.from=Kante
|
||||
dependency4.to=GraphElement
|
||||
dependency4.from=GraphPlotter
|
||||
dependency4.to=Graph
|
||||
dependency4.type=UsesDependency
|
||||
dependency5.from=GraphPlotter
|
||||
dependency5.to=Graph
|
||||
dependency5.to=GraphOptions
|
||||
dependency5.type=UsesDependency
|
||||
dependency6.from=GraphPlotter
|
||||
dependency6.to=GraphOptions
|
||||
dependency6.to=GraphElement
|
||||
dependency6.type=UsesDependency
|
||||
dependency7.from=GraphPlotter
|
||||
dependency7.to=GraphElement
|
||||
dependency7.to=Knoten
|
||||
dependency7.type=UsesDependency
|
||||
dependency8.from=GraphPlotter
|
||||
dependency8.to=Knoten
|
||||
dependency8.to=Kante
|
||||
dependency8.type=UsesDependency
|
||||
dependency9.from=GraphPlotter
|
||||
dependency9.to=Kante
|
||||
dependency9.from=GraphOptions
|
||||
dependency9.to=Graph
|
||||
dependency9.type=UsesDependency
|
||||
objectbench.height=93
|
||||
objectbench.width=907
|
||||
package.divider.horizontal=0.6
|
||||
package.divider.vertical=0.8207885304659498
|
||||
package.editor.height=451
|
||||
package.editor.width=790
|
||||
package.editor.x=879
|
||||
package.editor.y=186
|
||||
package.frame.height=657
|
||||
package.frame.width=931
|
||||
package.numDependencies=13
|
||||
objectbench.height=209
|
||||
objectbench.width=601
|
||||
package.divider.horizontal=0.5996055226824457
|
||||
package.divider.vertical=0.6823529411764706
|
||||
package.editor.height=457
|
||||
package.editor.width=899
|
||||
package.editor.x=759
|
||||
package.editor.y=196
|
||||
package.frame.height=780
|
||||
package.frame.width=1050
|
||||
package.numDependencies=12
|
||||
package.numTargets=7
|
||||
package.showExtends=true
|
||||
package.showUses=true
|
||||
|
|
@ -60,7 +57,7 @@ readme.y=10
|
|||
target1.height=50
|
||||
target1.name=Graph
|
||||
target1.naviview.expanded=true
|
||||
target1.showInterface=true
|
||||
target1.showInterface=false
|
||||
target1.type=ClassTarget
|
||||
target1.width=80
|
||||
target1.x=340
|
||||
|
|
@ -74,9 +71,9 @@ target2.x=240
|
|||
target2.y=260
|
||||
target3.height=50
|
||||
target3.name=GraphElement
|
||||
target3.showInterface=false
|
||||
target3.showInterface=true
|
||||
target3.type=AbstractTarget
|
||||
target3.width=120
|
||||
target3.width=110
|
||||
target3.x=220
|
||||
target3.y=360
|
||||
target4.height=50
|
||||
|
|
|
|||
BIN
images/KarlsruheMannheim.png
Normal file
BIN
images/KarlsruheMannheim.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 550 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 218 KiB After Width: | Height: | Size: 393 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 249 KiB After Width: | Height: | Size: 389 KiB |
|
|
@ -8,12 +8,12 @@ dependency2.type=UsesDependency
|
|||
dependency3.from=Picture
|
||||
dependency3.to=PictureViewer
|
||||
dependency3.type=UsesDependency
|
||||
objectbench.height=89
|
||||
objectbench.width=776
|
||||
objectbench.height=99
|
||||
objectbench.width=451
|
||||
package.divider.horizontal=0.599476439790576
|
||||
package.divider.vertical=0.8083832335329342
|
||||
package.editor.height=398
|
||||
package.editor.width=659
|
||||
package.divider.vertical=0.788
|
||||
package.editor.height=374
|
||||
package.editor.width=636
|
||||
package.editor.x=161
|
||||
package.editor.y=148
|
||||
package.frame.height=600
|
||||
|
|
@ -32,7 +32,7 @@ target1.name=PictureViewer
|
|||
target1.naviview.expanded=true
|
||||
target1.showInterface=false
|
||||
target1.type=ClassTarget
|
||||
target1.width=110
|
||||
target1.width=130
|
||||
target1.x=280
|
||||
target1.y=310
|
||||
target2.height=50
|
||||
|
|
@ -50,24 +50,24 @@ target3.width=90
|
|||
target3.x=40
|
||||
target3.y=200
|
||||
target4.height=50
|
||||
target4.name=XML
|
||||
target4.name=Picture
|
||||
target4.showInterface=false
|
||||
target4.type=ClassTarget
|
||||
target4.width=80
|
||||
target4.x=520
|
||||
target4.y=220
|
||||
target4.x=180
|
||||
target4.y=250
|
||||
target5.height=50
|
||||
target5.name=Picture
|
||||
target5.name=XML
|
||||
target5.showInterface=false
|
||||
target5.type=ClassTarget
|
||||
target5.width=80
|
||||
target5.x=180
|
||||
target5.y=250
|
||||
target5.x=520
|
||||
target5.y=220
|
||||
target6.height=50
|
||||
target6.name=TableRow
|
||||
target6.showInterface=false
|
||||
target6.type=ClassTarget
|
||||
target6.width=90
|
||||
target6.width=100
|
||||
target6.x=520
|
||||
target6.y=150
|
||||
target7.height=50
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
#BlueJ package file
|
||||
editor.fx.0.height=736
|
||||
editor.fx.0.width=800
|
||||
editor.fx.0.x=560
|
||||
editor.fx.0.y=136
|
||||
objectbench.height=150
|
||||
objectbench.width=776
|
||||
package.divider.horizontal=0.599476439790576
|
||||
package.divider.vertical=0.685370741482966
|
||||
package.editor.height=335
|
||||
package.editor.width=659
|
||||
package.editor.x=741
|
||||
package.editor.y=268
|
||||
package.frame.height=598
|
||||
package.frame.width=800
|
||||
editor.fx.0.height=739
|
||||
editor.fx.0.width=1157
|
||||
editor.fx.0.x=161
|
||||
editor.fx.0.y=101
|
||||
objectbench.height=505
|
||||
objectbench.width=580
|
||||
package.divider.horizontal=0.599591419816139
|
||||
package.divider.vertical=0.2768361581920904
|
||||
package.editor.height=189
|
||||
package.editor.width=864
|
||||
package.editor.x=2119
|
||||
package.editor.y=112
|
||||
package.frame.height=808
|
||||
package.frame.width=1015
|
||||
package.numDependencies=0
|
||||
package.numTargets=6
|
||||
package.showExtends=true
|
||||
|
|
@ -31,23 +31,23 @@ target1.width=80
|
|||
target1.x=280
|
||||
target1.y=10
|
||||
target2.height=62
|
||||
target2.name=eigeneAlgorithmen
|
||||
target2.name=algorithmen
|
||||
target2.type=PackageTarget
|
||||
target2.width=130
|
||||
target2.x=390
|
||||
target2.width=90
|
||||
target2.x=280
|
||||
target2.y=90
|
||||
target3.height=62
|
||||
target3.name=imp
|
||||
target3.name=eigeneAlgorithmen
|
||||
target3.type=PackageTarget
|
||||
target3.width=80
|
||||
target3.x=480
|
||||
target3.y=10
|
||||
target3.width=130
|
||||
target3.x=390
|
||||
target3.y=90
|
||||
target4.height=62
|
||||
target4.name=algorithmen
|
||||
target4.name=imp
|
||||
target4.type=PackageTarget
|
||||
target4.width=90
|
||||
target4.x=280
|
||||
target4.y=90
|
||||
target4.width=80
|
||||
target4.x=480
|
||||
target4.y=10
|
||||
target5.height=62
|
||||
target5.name=graph
|
||||
target5.type=PackageTarget
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<?import javafx.scene.input.KeyCodeCombination?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
|
||||
<VBox prefHeight="600.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<VBox prefHeight="600.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<children>
|
||||
<MenuBar VBox.vgrow="NEVER">
|
||||
<menus>
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
<CheckMenuItem fx:id="mOptionKnotenwerte" mnemonicParsing="false" onAction="#mChangeOptionKnotenwerte" text="Knotenwerte anzeigen" />
|
||||
<CheckMenuItem fx:id="mOptionKnotenname" mnemonicParsing="false" onAction="#mChangeOptionKnotenname" text="Knotennamen anzeigen" />
|
||||
<CheckMenuItem fx:id="mOptionKnoteninfo" mnemonicParsing="false" onAction="#mChangeOptionKnoteninfo" text="Knoteninfo anzeigen" />
|
||||
<CheckMenuItem fx:id="mOptionKantengewichte" mnemonicParsing="false" onAction="#mChangeOptionKantengewichte" text="Kantengewichte anzeigen" />
|
||||
<CheckMenuItem fx:id="mOptionKantengewichte" mnemonicParsing="false" onAction="#mChangeOptionKantengewichte" text="Kantenwerte anzeigen" />
|
||||
<CheckMenuItem fx:id="mOptionBild" mnemonicParsing="false" onAction="#mChangeOptionBild" text="Bild anzeigen" />
|
||||
</items>
|
||||
</Menu>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||
</VBox.margin>
|
||||
</Label>
|
||||
<ListView fx:id="lvAuswahl" prefHeight="200.0" VBox.vgrow="ALWAYS" />
|
||||
<ListView fx:id="lvAuswahl" onContextMenuRequested="#toDoContextMenu" prefHeight="200.0" VBox.vgrow="ALWAYS" />
|
||||
<HBox spacing="10.0" VBox.vgrow="NEVER">
|
||||
<children>
|
||||
<Button maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="40.0" mnemonicParsing="false" onAction="#bAnfang" prefHeight="30.0">
|
||||
|
|
|
|||
|
|
@ -6,18 +6,20 @@
|
|||
<?import javafx.scene.control.ComboBox?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.Slider?>
|
||||
<?import javafx.scene.control.SplitPane?>
|
||||
<?import javafx.scene.control.TreeView?>
|
||||
<?import javafx.scene.image.Image?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
|
||||
<VBox xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<VBox xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<children>
|
||||
<HBox VBox.vgrow="ALWAYS">
|
||||
<children>
|
||||
<VBox prefHeight="200.0" prefWidth="100.0" />
|
||||
<GraphPlotter fx:id="viewer" HBox.hgrow="ALWAYS" />
|
||||
<SplitPane dividerPositions="0.8" VBox.vgrow="ALWAYS">
|
||||
<items>
|
||||
<GraphPlotter fx:id="viewer" prefHeight="1000.0" prefWidth="1358.0" />
|
||||
<VBox prefHeight="200.0" prefWidth="100.0" spacing="5.0">
|
||||
<children>
|
||||
<Label minWidth="-Infinity" text="Algorithmen">
|
||||
|
|
@ -41,7 +43,8 @@
|
|||
<Image url="@step.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</graphic></Button>
|
||||
</graphic>
|
||||
</Button>
|
||||
<Button fx:id="bStart" minWidth="-Infinity" mnemonicParsing="false" onAction="#mStart" HBox.hgrow="ALWAYS">
|
||||
<HBox.margin>
|
||||
<Insets />
|
||||
|
|
@ -70,17 +73,33 @@
|
|||
<Image url="@reset.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</graphic></Button>
|
||||
</graphic>
|
||||
</Button>
|
||||
</children>
|
||||
<VBox.margin>
|
||||
<Insets top="10.0" />
|
||||
</VBox.margin>
|
||||
</HBox>
|
||||
<Label fx:id="lAblauf" text="Ablauf des Algorithmus" visible="false">
|
||||
<font>
|
||||
<Font name="System Bold" size="12.0" />
|
||||
</font>
|
||||
<VBox.margin>
|
||||
<Insets bottom="3.0" top="20.0" />
|
||||
</VBox.margin>
|
||||
</Label>
|
||||
<TreeView fx:id="tvAblauf" prefHeight="200.0" prefWidth="200.0" visible="false" VBox.vgrow="ALWAYS" />
|
||||
<AnchorPane>
|
||||
<children>
|
||||
<Button fx:id="bClipboard" mnemonicParsing="false" onAction="#bCopyClicked" text="In Zwischenablage kopieren" visible="false" AnchorPane.bottomAnchor="2.0" AnchorPane.rightAnchor="2.0" AnchorPane.topAnchor="2.0" />
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</children>
|
||||
<HBox.margin>
|
||||
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||
</HBox.margin></VBox>
|
||||
</children>
|
||||
</HBox>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
</padding>
|
||||
</VBox>
|
||||
</items>
|
||||
</SplitPane>
|
||||
</children>
|
||||
</VBox>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue