DM Greedy Vererbung geändert, Ausgabe der Knoten hinzugefügt. CTXT DAteien aus der VVerwaltung raus. Name fürs Hauptfenster

This commit is contained in:
Frank Schiebel 2022-11-26 19:01:13 +01:00
parent 160bbe909a
commit 39a2f13410
68 changed files with 145 additions and 1929 deletions

View file

@ -8,7 +8,8 @@ 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;
/**
*
@ -48,7 +49,7 @@ public abstract class GraphAlgo extends Thread {
this.hilfe = hilfe;
if (hilfe != null) hilfe.setGraphPlotter(gp);
}
public void setGraph(Graph g) {
this.g = g;
gp = null;
@ -64,8 +65,8 @@ public abstract class GraphAlgo extends Thread {
if (hilfe != null) hilfe.setReviewAllowed(true);
int i = 0;
while((waitforclick && (stepping || i*10 < speed)) && !isInterrupted()){
Thread.sleep(10);
i++;
Thread.sleep(10);
i++;
}
if (hilfe != null) hilfe.setReviewAllowed(false);
g.setStatus(aktuellerZustand);
@ -140,13 +141,27 @@ public abstract class GraphAlgo extends Thread {
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
});
}
public void melde(String s) {
info(s);
Platform.runLater(() -> {
Alert meldung = new Alert(AlertType.INFORMATION, s, ButtonType.OK);
meldung.setTitle("Information");
meldung.setHeaderText(null);
meldung.showAndWait();
Alert meldung = new Alert(AlertType.INFORMATION, s, ButtonType.OK);
meldung.setTitle("Information");
meldung.setHeaderText(null);
meldung.showAndWait();
});
}
@ -168,5 +183,4 @@ public abstract class GraphAlgo extends Thread {
}
}