Sync with upstream

This commit is contained in:
Frank Schiebel 2024-03-12 17:34:56 +01:00
parent 39a2f13410
commit 66e8fa72bf
135 changed files with 38902 additions and 37757 deletions

View file

@ -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;
@ -21,6 +26,12 @@ public class GraphOptions
public boolean showVertexValue = true;
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;
}