some fixes

This commit is contained in:
Mystikfluu 2023-03-28 20:42:22 +02:00
parent a08dae9ad9
commit 734db05673
57 changed files with 7419 additions and 9556 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
out/ out/
mappings/

8
.idea/compiler.xml generated
View File

@ -1,5 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="CompilerConfiguration">
<excludeFromCompile>
<file url="file://$PROJECT_DIR$/.gitignore" />
<file url="file://$PROJECT_DIR$/noEasyDB.iml" />
<file url="file://$PROJECT_DIR$/obfuscate.bat" />
<directory url="file://$PROJECT_DIR$/mappings" includeSubdirectories="true" />
</excludeFromCompile>
</component>
<component name="JavacSettings"> <component name="JavacSettings">
<option name="DEBUGGING_INFO" value="false" /> <option name="DEBUGGING_INFO" value="false" />
<option name="ADDITIONAL_OPTIONS_STRING" value="-Xlint:unchecked" /> <option name="ADDITIONAL_OPTIONS_STRING" value="-Xlint:unchecked" />

View File

@ -1,72 +0,0 @@
<component name="libraryTable">
<library name="soot.oss" type="repository">
<properties maven-id="org.soot-oss:soot:4.3.0" />
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/soot-4.3.0.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/commons-io-2.7.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/dexlib2-2.5.2.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/jsr305-3.0.2.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/guava-27.1-android.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/failureaccess-1.0.1.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/checker-compat-qual-2.5.2.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/error_prone_annotations-2.2.0.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/j2objc-annotations-1.1.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/animal-sniffer-annotations-1.17.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/asm-9.2.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/asm-tree-9.2.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/asm-util-9.2.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/asm-analysis-9.2.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/asm-commons-9.2.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/xmlpull-1.1.3.4d_b4_min.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/axml-2.1.2.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/polyglot-2006.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/heros-1.2.3.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/functionaljava-4.2.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/jasmin-3.0.3.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/java_cup-0.9.2.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/slf4j-api-1.7.32.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/javax.annotation-api-1.3.2.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/jaxb-api-2.4.0-b180725.0427.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/javax.activation-api-1.2.0.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/jaxb-runtime-2.4.0-b180830.0438.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/txw2-2.4.0-b180830.0438.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/istack-commons-runtime-3.0.7.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/stax-ex-1.8.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/FastInfoset-1.2.15.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$PROJECT_DIR$/lib/soot-4.3.0-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/commons-io-2.7-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/dexlib2-2.5.2-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/jsr305-3.0.2-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/guava-27.1-android-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/failureaccess-1.0.1-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/checker-compat-qual-2.5.2-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/error_prone_annotations-2.2.0-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/j2objc-annotations-1.1-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/animal-sniffer-annotations-1.17-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/asm-9.2-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/asm-tree-9.2-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/asm-util-9.2-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/asm-analysis-9.2-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/asm-commons-9.2-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/axml-2.1.2-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/polyglot-2006-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/heros-1.2.3-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/functionaljava-4.2-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/jasmin-3.0.3-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/java_cup-0.9.2-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/slf4j-api-1.7.32-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/javax.annotation-api-1.3.2-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/jaxb-api-2.4.0-b180725.0427-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/javax.activation-api-1.2.0-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/jaxb-runtime-2.4.0-b180830.0438-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/txw2-2.4.0-b180830.0438-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/istack-commons-runtime-3.0.7-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/stax-ex-1.8-javadoc.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/FastInfoset-1.2.15-javadoc.jar!/" />
</JAVADOC>
<SOURCES />
</library>
</component>

2
.idea/misc.xml generated
View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_19" default="true" project-jdk-name="azul-19" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="azul-17 (2)" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
</project> </project>

6
.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@ -7,12 +7,12 @@ public class A1 extends Application {
public A1() { public A1() {
} }
public void start(Stage stage) {
new B3();
}
public static void main(String[] args) { public static void main(String[] args) {
launch(args); launch(args);
} }
public void start(Stage stage) {
new B3();
}
} }

View File

@ -5,8 +5,7 @@
import javafx.scene.control.RadioButton; import javafx.scene.control.RadioButton;
public class A2 public class A2
implements EventHandler<ActionEvent> implements EventHandler<ActionEvent> {
{
private final B3 view; private final B3 view;
public A2(B3 simpleFrame) { public A2(B3 simpleFrame) {
@ -14,11 +13,6 @@
} }
public void handle(ActionEvent arg0) { public void handle(ActionEvent arg0) {
Object source = arg0.getSource(); Object source = arg0.getSource();
@ -37,7 +31,6 @@
this.view.menuVisibility.setDisable(true); this.view.menuVisibility.setDisable(true);
this.view.showAttributeCB.setSelected(false); this.view.showAttributeCB.setSelected(false);
this.view.graphicElemLV.getItems().clear(); this.view.graphicElemLV.getItems().clear();
this.view.graphicElemLV.getItems().addAll((this.view.getCurrentTab()).canvas.sddsfsfsdf45645645()); this.view.graphicElemLV.getItems().addAll((this.view.getCurrentTab()).canvas.sddsfsfsdf45645645());
@ -49,49 +42,26 @@
this.view.selectModeBTN.setSelected(true); this.view.selectModeBTN.setSelected(true);
return; return;
} }
if (this.view.generateRelationalModelCB.isSelected()) { if (this.view.generateRelationalModelCB.isSelected()) {
this.view.selectModeBTN.setStyle("-fx-text-fill:red"); this.view.selectModeBTN.setStyle("-fx-text-fill:red");
this.view.creationModelabel.setStyle("-fx-text-fill:white"); this.view.creationModelabel.setStyle("-fx-text-fill:white");
this.view.selectModeBTN.setSelected(true); this.view.selectModeBTN.setSelected(true);
return; return;
} }
} }
if (source == this.view.menuExitMI) { if (source == this.view.menuExitMI) {
this.view.close(); this.view.close();
} }
if (source == this.view.menuNewMI) { if (source == this.view.menuNewMI) {
this.view.setCurrentTab(this.view.addNewTab(null)); this.view.setCurrentTab(this.view.addNewTab(null));
(this.view.getCurrentTab()).canvas.requestFocus(); (this.view.getCurrentTab()).canvas.requestFocus();
@ -132,8 +102,6 @@
} }
if (source == this.view.textElemBTN) { if (source == this.view.textElemBTN) {
(this.view.getCurrentTab()).canvas.sdfsdfds3465er(true); (this.view.getCurrentTab()).canvas.sdfsdfds3465er(true);
this.view.statusInformation.setText("Creation Mode: text-element-with-border -> press left mouse button on working area -> enter text (ALT-Enter for linefeed) -> press enter key"); this.view.statusInformation.setText("Creation Mode: text-element-with-border -> press left mouse button on working area -> enter text (ALT-Enter for linefeed) -> press enter key");
@ -252,7 +220,6 @@
} }
if (this.view.getCurrentTab() != null) { if (this.view.getCurrentTab() != null) {
(this.view.getCurrentTab()).canvas.dsfdsdfssdf45645re(); (this.view.getCurrentTab()).canvas.dsfdsdfssdf45645re();
} }

File diff suppressed because it is too large Load Diff

View File

@ -10,14 +10,13 @@
import javafx.stage.StageStyle; import javafx.stage.StageStyle;
public class A4 public class A4
extends Stage extends Stage {
{
private final A4 thisActionMessageDialog; private final A4 thisActionMessageDialog;
private final TextField minTF; private final TextField minTF;
private final TextField maxTF; private final TextField maxTF;
private boolean doNothing;
private final String holdminimum; private final String holdminimum;
private final String holdmaximum; private final String holdmaximum;
private boolean doNothing;
public A4(final A3 canvas, double xPos, double yPos, String minimum, String maximum) { public A4(final A3 canvas, double xPos, double yPos, String minimum, String maximum) {
@ -33,9 +32,6 @@
initModality(Modality.APPLICATION_MODAL); initModality(Modality.APPLICATION_MODAL);
this.minTF = new TextField(minimum); this.minTF = new TextField(minimum);
this.minTF.textProperty().addListener((observable, oldValue, newValue) -> { this.minTF.textProperty().addListener((observable, oldValue, newValue) -> {
if (newValue.length() > 1 && newValue.charAt(0) == '0') { if (newValue.length() > 1 && newValue.charAt(0) == '0') {
@ -111,8 +107,6 @@
gPane.add(this.maxTF, 1, 2); gPane.add(this.maxTF, 1, 2);
initStyle(StageStyle.UNDECORATED); initStyle(StageStyle.UNDECORATED);
Scene scene = new Scene(gPane, 130.0D, 90.0D); Scene scene = new Scene(gPane, 130.0D, 90.0D);
@ -135,8 +129,6 @@
} }
private void setDataAndLeave() { private void setDataAndLeave() {
if (this.minTF.getText() == null || this.minTF.getText().length() == 0) this.minTF.setText("m"); if (this.minTF.getText() == null || this.minTF.getText().length() == 0) this.minTF.setText("m");
if (this.maxTF.getText() == null || this.maxTF.getText().length() == 0) this.maxTF.setText("n"); if (this.maxTF.getText() == null || this.maxTF.getText().length() == 0) this.maxTF.setText("n");
@ -144,9 +136,6 @@
} }
private void setNothingAndLeave() { private void setNothingAndLeave() {
this.minTF.setText(this.holdminimum); this.minTF.setText(this.holdminimum);
this.maxTF.setText(this.holdmaximum); this.maxTF.setText(this.holdmaximum);
@ -156,22 +145,16 @@
} }
public TextField getMinTF() { public TextField getMinTF() {
return this.minTF; return this.minTF;
} }
public TextField getMaxTF() { public TextField getMaxTF() {
return this.maxTF; return this.maxTF;
} }
public boolean isDoNothing() { public boolean isDoNothing() {
return this.doNothing; return this.doNothing;
} }

View File

@ -10,12 +10,11 @@
import javafx.stage.StageStyle; import javafx.stage.StageStyle;
public class A5 public class A5
extends Stage extends Stage {
{
private final A5 thisActionMessageDialog; private final A5 thisActionMessageDialog;
private final TextField nameTF; private final TextField nameTF;
private boolean doNothing;
private final String holdName; private final String holdName;
private boolean doNothing;
public A5(final A3 canvas, double xPos, double yPos, String name) { public A5(final A3 canvas, double xPos, double yPos, String name) {
@ -30,9 +29,6 @@
initModality(Modality.APPLICATION_MODAL); initModality(Modality.APPLICATION_MODAL);
this.nameTF = new TextField(name); this.nameTF = new TextField(name);
this.nameTF.setOnMouseEntered(event -> T3.fdssdf4354(A5.this.nameTF, C2.MouseSelectedColor)); this.nameTF.setOnMouseEntered(event -> T3.fdssdf4354(A5.this.nameTF, C2.MouseSelectedColor));
this.nameTF.setOnMouseExited(event -> A5.this.nameTF.setEffect(null)); this.nameTF.setOnMouseExited(event -> A5.this.nameTF.setEffect(null));
@ -58,9 +54,6 @@
fPane.add(this.nameTF, 1, 1); fPane.add(this.nameTF, 1, 1);
Scene scene = new Scene(fPane, 220.0D, 75.0D); Scene scene = new Scene(fPane, 220.0D, 75.0D);
setX(xPos); setX(xPos);
@ -83,16 +76,13 @@
} }
private void setDataAndLeave() { private void setDataAndLeave() {
if (this.nameTF.getText() == null || this.nameTF.getText().length() == 0) if (this.nameTF.getText() == null || this.nameTF.getText().length() == 0)
return; this.thisActionMessageDialog.close(); return;
this.thisActionMessageDialog.close();
} }
private void setNothingAndLeave() { private void setNothingAndLeave() {
this.nameTF.setText(this.holdName); this.nameTF.setText(this.holdName);
this.doNothing = true; this.doNothing = true;
@ -100,15 +90,11 @@
} }
public TextField getNameTF() { public TextField getNameTF() {
return this.nameTF; return this.nameTF;
} }
public boolean isDoNothing() { public boolean isDoNothing() {
return this.doNothing; return this.doNothing;
} }

View File

@ -10,36 +10,16 @@
import javafx.stage.Modality; import javafx.stage.Modality;
import javafx.stage.Stage; import javafx.stage.Stage;
import javafx.stage.StageStyle; import javafx.stage.StageStyle;
public class A6 public class A6
extends Stage extends Stage {
{
private final A6 thisActionMessageDialog; private final A6 thisActionMessageDialog;
private final TextField p_tTF; private final TextField p_tTF;
private final TextField d_ndTF; private final TextField d_ndTF;
private boolean doNothing;
private final String holdpartial_or_total; private final String holdpartial_or_total;
private final String holddisjunct_or_notdisjunct; private final String holddisjunct_or_notdisjunct;
private boolean doNothing;
public A6(final A3 canvas, double xPos, double yPos, String partial_or_total, String disjunct_or_notdisjunct) { public A6(final A3 canvas, double xPos, double yPos, String partial_or_total, String disjunct_or_notdisjunct) {
@ -57,9 +37,6 @@
initModality(Modality.APPLICATION_MODAL); initModality(Modality.APPLICATION_MODAL);
this.p_tTF = new TextField(partial_or_total); this.p_tTF = new TextField(partial_or_total);
this.p_tTF.setPrefWidth(50.0D); this.p_tTF.setPrefWidth(50.0D);
this.p_tTF.textProperty().addListener((observable, oldValue, newValue) -> { this.p_tTF.textProperty().addListener((observable, oldValue, newValue) -> {
@ -139,8 +116,6 @@
gPane.add(this.d_ndTF, 1, 2); gPane.add(this.d_ndTF, 1, 2);
initStyle(StageStyle.UNDECORATED); initStyle(StageStyle.UNDECORATED);
Scene scene = new Scene(gPane, 230.0D, 90.0D); Scene scene = new Scene(gPane, 230.0D, 90.0D);
@ -164,8 +139,6 @@
} }
private void setDataAndLeave() { private void setDataAndLeave() {
if (this.p_tTF.getText() == null || this.p_tTF.getText().length() == 0) this.p_tTF.setText("p"); if (this.p_tTF.getText() == null || this.p_tTF.getText().length() == 0) this.p_tTF.setText("p");
if (this.d_ndTF.getText() == null || this.d_ndTF.getText().length() == 0) this.d_ndTF.setText("nd"); if (this.d_ndTF.getText() == null || this.d_ndTF.getText().length() == 0) this.d_ndTF.setText("nd");
@ -173,8 +146,6 @@
} }
private void setNothingAndLeave() { private void setNothingAndLeave() {
this.p_tTF.setText(this.holdpartial_or_total); this.p_tTF.setText(this.holdpartial_or_total);
this.d_ndTF.setText(this.holddisjunct_or_notdisjunct); this.d_ndTF.setText(this.holddisjunct_or_notdisjunct);
@ -184,22 +155,16 @@
} }
public TextField getP_tTF() { public TextField getP_tTF() {
return this.p_tTF; return this.p_tTF;
} }
public TextField getD_ndTF() { public TextField getD_ndTF() {
return this.d_ndTF; return this.d_ndTF;
} }
public boolean isDoNothing() { public boolean isDoNothing() {
return this.doNothing; return this.doNothing;
} }

View File

@ -12,40 +12,14 @@
import javafx.stage.Stage; import javafx.stage.Stage;
import javafx.stage.StageStyle; import javafx.stage.StageStyle;
public class A7 public class A7
extends Stage extends Stage {
{ final KeyCombination keyCombinationALT_ENTER = new KeyCodeCombination(KeyCode.ENTER, KeyCombination.ALT_DOWN);
private final A7 thisActionMessageDialog; private final A7 thisActionMessageDialog;
private final TextArea textTA; private final TextArea textTA;
private boolean doNothing;
private final String holdName; private final String holdName;
final KeyCombination keyCombinationALT_ENTER = new KeyCodeCombination(KeyCode.ENTER, KeyCombination.ALT_DOWN); private boolean doNothing;
public A7(final A3 canvas, double xPos, double yPos, String name) { public A7(final A3 canvas, double xPos, double yPos, String name) {
@ -62,8 +36,6 @@
initModality(Modality.APPLICATION_MODAL); initModality(Modality.APPLICATION_MODAL);
this.textTA = new TextArea(name); this.textTA = new TextArea(name);
this.textTA.setPrefWidth(350.0D); this.textTA.setPrefWidth(350.0D);
this.textTA.setPrefHeight(100.0D); this.textTA.setPrefHeight(100.0D);
@ -96,7 +68,6 @@
fPane.add(this.textTA, 0, 1); fPane.add(this.textTA, 0, 1);
initStyle(StageStyle.UNDECORATED); initStyle(StageStyle.UNDECORATED);
Scene scene = new Scene(fPane, 370.0D, 150.0D); Scene scene = new Scene(fPane, 370.0D, 150.0D);
@ -119,9 +90,6 @@
} }
private void setDataAndLeave() { private void setDataAndLeave() {
if (this.textTA.getText() == null || this.textTA.getText().length() == 0) { if (this.textTA.getText() == null || this.textTA.getText().length() == 0) {
this.textTA.setText(""); this.textTA.setText("");
@ -134,8 +102,6 @@
} }
private void setNothingAndLeave() { private void setNothingAndLeave() {
this.textTA.setText(this.holdName); this.textTA.setText(this.holdName);
this.doNothing = true; this.doNothing = true;
@ -143,15 +109,11 @@
} }
public TextArea getTextTA() { public TextArea getTextTA() {
return this.textTA; return this.textTA;
} }
public boolean isDoNothing() { public boolean isDoNothing() {
return this.doNothing; return this.doNothing;
} }

View File

@ -19,48 +19,8 @@ import java.util.Objects;
import java.util.Optional; import java.util.Optional;
public class A8 public class A8
extends Stage extends Stage {
{
private final A8 thisActionMessageDialog; private final A8 thisActionMessageDialog;
private final TextField nameTF; private final TextField nameTF;
private final CheckBox createColumnCB; private final CheckBox createColumnCB;
@ -78,7 +38,6 @@ public class A8
private final Label par2LBL; private final Label par2LBL;
private final TextField par2TF; private final TextField par2TF;
private final Button okBTN; private final Button okBTN;
private Button cancelBTN;
private final String holdName; private final String holdName;
private final boolean holdcreateColumn; private final boolean holdcreateColumn;
private final String holdcolumnName; private final String holdcolumnName;
@ -94,6 +53,7 @@ public class A8
private final String holdpar1; private final String holdpar1;
private final String holdpar2_label; private final String holdpar2_label;
private final String holdpar2; private final String holdpar2;
private Button cancelBTN;
public A8(final A3 canvas, double xPos, double yPos, String name, boolean createColumn, String columnName, String columnPostfix, String datatype, boolean isWeakKey, boolean isAutoincrement, long autoincrementStartAt, boolean isKey, boolean isNullable, boolean isUnique, String dataGenerationType, String par1, String par1_label, String par2, String par2_label) { public A8(final A3 canvas, double xPos, double yPos, String name, boolean createColumn, String columnName, String columnPostfix, String datatype, boolean isWeakKey, boolean isAutoincrement, long autoincrementStartAt, boolean isKey, boolean isNullable, boolean isUnique, String dataGenerationType, String par1, String par1_label, String par2, String par2_label) {
String title = "Attribute Transformation"; String title = "Attribute Transformation";
@ -121,17 +81,12 @@ public class A8
initModality(Modality.APPLICATION_MODAL); initModality(Modality.APPLICATION_MODAL);
this.nameTF = new TextField(name); this.nameTF = new TextField(name);
this.nameTF.setPrefWidth(150.0D); this.nameTF.setPrefWidth(150.0D);
this.nameTF.setMaxWidth(150.0D); this.nameTF.setMaxWidth(150.0D);
this.nameTF.setDisable(true); this.nameTF.setDisable(true);
this.createColumnCB = new CheckBox(); this.createColumnCB = new CheckBox();
this.createColumnCB.setSelected(false); this.createColumnCB.setSelected(false);
if (createColumn) this.createColumnCB.setSelected(true); if (createColumn) this.createColumnCB.setSelected(true);
@ -211,8 +166,6 @@ public class A8
this.isUniqueCB.setOnMouseExited(event -> A8.this.isUniqueCB.setEffect(null)); this.isUniqueCB.setOnMouseExited(event -> A8.this.isUniqueCB.setEffect(null));
ObservableList<String> possibleGenerations = ObservableList<String> possibleGenerations =
FXCollections.observableArrayList(T3.dsfsdfsdf4353534); FXCollections.observableArrayList(T3.dsfsdfsdf4353534);
this.dataGenerationTypeCoB = new ComboBox<>(possibleGenerations); this.dataGenerationTypeCoB = new ComboBox<>(possibleGenerations);
@ -220,23 +173,28 @@ public class A8
if (dataGenerationType == null) { if (dataGenerationType == null) {
this.dataGenerationTypeCoB.getSelectionModel().select(0); this.dataGenerationTypeCoB.getSelectionModel().select(0);
this.par1TF = new TextField(""); this.par1TF.setDisable(true); this.par1TF = new TextField("");
this.par1TF.setDisable(true);
this.par1LBL = new Label(""); this.par1LBL = new Label("");
this.par2TF = new TextField(""); this.par2TF.setDisable(true); this.par2TF = new TextField("");
this.par2TF.setDisable(true);
this.par2LBL = new Label(""); this.par2LBL = new Label("");
} else { } else {
this.dataGenerationTypeCoB.getSelectionModel().select(dataGenerationType); this.dataGenerationTypeCoB.getSelectionModel().select(dataGenerationType);
this.par1TF = new TextField(par1); this.par1TF.setDisable(true); this.par1TF = new TextField(par1);
this.par1TF.setDisable(true);
this.par1LBL = new Label(par1_label); this.par1LBL = new Label(par1_label);
this.par2TF = new TextField(par2); this.par2TF.setDisable(true); this.par2TF = new TextField(par2);
this.par2TF.setDisable(true);
this.par2LBL = new Label(par2_label); this.par2LBL = new Label(par2_label);
setVisibilityForGenerationtype(); setVisibilityForGenerationtype();
} }
this.par2TF.setOnMousePressed(event -> { this.par2TF.setOnMousePressed(event -> {
if (!A8.this.dataGenerationTypeCoB.getSelectionModel().getSelectedItem().equals("Extern")) if (!A8.this.dataGenerationTypeCoB.getSelectionModel().getSelectedItem().equals("Extern"))
return; if (event.getButton() == MouseButton.SECONDARY) { return;
if (event.getButton() == MouseButton.SECONDARY) {
event.consume(); event.consume();
FileChooser fc = new FileChooser(); FileChooser fc = new FileChooser();
fc.setInitialDirectory(new File(System.getProperty("user.home"))); fc.setInitialDirectory(new File(System.getProperty("user.home")));
@ -278,7 +236,8 @@ public class A8
this.okBTN.setOnAction(event -> { this.okBTN.setOnAction(event -> {
A8.this.setDataAndLeave(); A8.this.setDataAndLeave();
if (!canvas.getTabWithCanvas().getText().contains("*")) canvas.getTabWithCanvas().setText(canvas.getTabWithCanvas().getText() + "*"); if (!canvas.getTabWithCanvas().getText().contains("*"))
canvas.getTabWithCanvas().setText(canvas.getTabWithCanvas().getText() + "*");
}); });
this.okBTN.setOnKeyPressed(event -> { this.okBTN.setOnKeyPressed(event -> {
if (Objects.requireNonNull(event.getCode()) == KeyCode.ENTER) { if (Objects.requireNonNull(event.getCode()) == KeyCode.ENTER) {
@ -288,7 +247,6 @@ public class A8
} }
}); });
this.cancelBTN = new Button("Cancel"); this.cancelBTN = new Button("Cancel");
this.cancelBTN.setBackground(new Background(new BackgroundFill(C2.ButtonBackgroundColor, new CornerRadii(5.0D), Insets.EMPTY))); this.cancelBTN.setBackground(new Background(new BackgroundFill(C2.ButtonBackgroundColor, new CornerRadii(5.0D), Insets.EMPTY)));
@ -331,7 +289,6 @@ public class A8
} }
GridPane gridPane = new GridPane(); GridPane gridPane = new GridPane();
gridPane.setPadding(new Insets(10.0D, 10.0D, 10.0D, 10.0D)); gridPane.setPadding(new Insets(10.0D, 10.0D, 10.0D, 10.0D));
@ -411,9 +368,6 @@ public class A8
gridPane.add(fp, 0, 11, 2, 1); gridPane.add(fp, 0, 11, 2, 1);
Scene scene = new Scene(gridPane, 280.0D, 355.0D); Scene scene = new Scene(gridPane, 280.0D, 355.0D);
setScene(scene); setScene(scene);
@ -430,8 +384,6 @@ public class A8
this.columnNameTF.requestFocus(); this.columnNameTF.requestFocus();
if (isAutoincrement) { if (isAutoincrement) {
this.dataGenerationTypeCoB.setDisable(true); this.dataGenerationTypeCoB.setDisable(true);
this.par1TF.setDisable(true); this.par1TF.setDisable(true);
@ -441,8 +393,6 @@ public class A8
} }
private void setDataAndLeave() { private void setDataAndLeave() {
if (this.createColumnCB.isSelected()) { if (this.createColumnCB.isSelected()) {
if (this.columnNameTF.getText() == null || this.columnNameTF.getText().length() == 0) { if (this.columnNameTF.getText() == null || this.columnNameTF.getText().length() == 0) {
@ -450,61 +400,26 @@ public class A8
} }
if (this.datatypeTF.getText() == null || this.datatypeTF.getText().length() == 0) { if (this.datatypeTF.getText() == null || this.datatypeTF.getText().length() == 0) {
return; return;
} }
} }
if (this.dataGenerationTypeCoB.getSelectionModel().getSelectedItem().equals("Extern")) { if (this.dataGenerationTypeCoB.getSelectionModel().getSelectedItem().equals("Extern")) {
BufferedReader br = C2.randomDataFilesExtern.get(this.par1TF.getText()); BufferedReader br = C2.randomDataFilesExtern.get(this.par1TF.getText());
if (br == null) if (br == null) {
{
try { try {
BufferedReader fr = new BufferedReader(new InputStreamReader(new FileInputStream(this.par2TF.getText()), StandardCharsets.UTF_8)); BufferedReader fr = new BufferedReader(new InputStreamReader(new FileInputStream(this.par2TF.getText()), StandardCharsets.UTF_8));
C2.randomDataFilesExtern.put(this.par1TF.getText(), fr); C2.randomDataFilesExtern.put(this.par1TF.getText(), fr);
this.thisActionMessageDialog.close(); this.thisActionMessageDialog.close();
} catch (FileNotFoundException ignored) {} } catch (FileNotFoundException ignored) {
} }
else
{
} else {
C1 alert = new C1(null, C1 alert = new C1(null,
@ -523,8 +438,7 @@ public class A8
Optional<ButtonType> result = alert.getResult(); Optional<ButtonType> result = alert.getResult();
if (result.isPresent() && result.get() == ButtonType.OK) if (result.isPresent() && result.get() == ButtonType.OK) {
{
this.thisActionMessageDialog.close(); this.thisActionMessageDialog.close();
} }
} }
@ -536,7 +450,6 @@ public class A8
} }
private void setNothingAndLeave() { private void setNothingAndLeave() {
this.nameTF.setText(this.holdName); this.nameTF.setText(this.holdName);
this.createColumnCB.setSelected(this.holdcreateColumn); this.createColumnCB.setSelected(this.holdcreateColumn);
@ -564,85 +477,61 @@ public class A8
} }
public TextField getColumnNameTF() { public TextField getColumnNameTF() {
return this.columnNameTF; return this.columnNameTF;
} }
public TextField getColumnPostfixTF() { public TextField getColumnPostfixTF() {
return this.columnPostfixTF; return this.columnPostfixTF;
} }
public TextField getDatatypeTF() { public TextField getDatatypeTF() {
return this.datatypeTF; return this.datatypeTF;
} }
public CheckBox getIsAutoincrementCB() { public CheckBox getIsAutoincrementCB() {
return this.isAutoincrementCB; return this.isAutoincrementCB;
} }
public CheckBox getIsKeyCB() { public CheckBox getIsKeyCB() {
return this.isKeyCB; return this.isKeyCB;
} }
public CheckBox getIsNullableCB() { public CheckBox getIsNullableCB() {
return this.isNullableCB; return this.isNullableCB;
} }
public CheckBox getIsUniqueCB() { public CheckBox getIsUniqueCB() {
return this.isUniqueCB; return this.isUniqueCB;
} }
public ComboBox<String> getDataGenerationTypeCoB() { public ComboBox<String> getDataGenerationTypeCoB() {
return this.dataGenerationTypeCoB; return this.dataGenerationTypeCoB;
} }
public Label getPar1LBL() { public Label getPar1LBL() {
return this.par1LBL; return this.par1LBL;
} }
public TextField getPar1TF() { public TextField getPar1TF() {
return this.par1TF; return this.par1TF;
} }
public Label getPar2LBL() { public Label getPar2LBL() {
return this.par2LBL; return this.par2LBL;
} }
public TextField getPar2TF() { public TextField getPar2TF() {
return this.par2TF; return this.par2TF;
} }
@ -654,7 +543,8 @@ public class A8
private void setSelectionForGenerationtype() { private void setSelectionForGenerationtype() {
if (this.dataGenerationTypeCoB.getSelectionModel().getSelectedItem() == null) if (this.dataGenerationTypeCoB.getSelectionModel().getSelectedItem() == null)
return; String str; return;
String str;
switch ((str = this.dataGenerationTypeCoB.getSelectionModel().getSelectedItem()).hashCode()) { switch ((str = this.dataGenerationTypeCoB.getSelectionModel().getSelectedItem()).hashCode()) {
case -1601184309 -> { case -1601184309 -> {
if (!str.equals("Random Boolean")) { if (!str.equals("Random Boolean")) {
@ -752,8 +642,12 @@ public class A8
return; return;
} }
} }
this.par1TF.setText(""); this.par1LBL.setText(""); this.par1TF.setDisable(true); this.par1TF.setText("");
this.par2TF.setText(""); this.par2LBL.setText(""); this.par2TF.setDisable(true); this.par1LBL.setText("");
this.par1TF.setDisable(true);
this.par2TF.setText("");
this.par2LBL.setText("");
this.par2TF.setDisable(true);
} }
private void setVisibilityForGenerationtype() { private void setVisibilityForGenerationtype() {
@ -822,8 +716,12 @@ public class A8
return; return;
} }
} }
this.par1TF.setText(""); this.par1LBL.setText(""); this.par1TF.setDisable(true); this.par1TF.setText("");
this.par2TF.setText(""); this.par2LBL.setText(""); this.par2TF.setDisable(true); this.par1LBL.setText("");
this.par1TF.setDisable(true);
this.par2TF.setText("");
this.par2LBL.setText("");
this.par2TF.setDisable(true);
} }
} }

View File

@ -18,8 +18,7 @@
public class A9 public class A9
extends Stage extends Stage {
{
private final A9 thisActionMessageDialog; private final A9 thisActionMessageDialog;
private final TextField nameTF; private final TextField nameTF;
private final CheckBox createRelationCB; private final CheckBox createRelationCB;
@ -28,8 +27,8 @@
private final CheckBox createInsertStatementsCB; private final CheckBox createInsertStatementsCB;
private final TextField numberRowsToInsertTF; private final TextField numberRowsToInsertTF;
private final Button okBTN; private final Button okBTN;
private Button cancelBTN;
private final String holdName; private final String holdName;
private Button cancelBTN;
public A9(final A3 canvas, double xPos, double yPos, String name, boolean createRelation, String relationName, String relationPraefix, boolean createInsertStatements, long numberRowsToInsert, boolean setCreationRelationChangeable) { public A9(final A3 canvas, double xPos, double yPos, String name, boolean createRelation, String relationName, String relationPraefix, boolean createInsertStatements, long numberRowsToInsert, boolean setCreationRelationChangeable) {
@ -43,9 +42,6 @@
initModality(Modality.APPLICATION_MODAL); initModality(Modality.APPLICATION_MODAL);
this.nameTF = new TextField(name); this.nameTF = new TextField(name);
this.nameTF.setDisable(true); this.nameTF.setDisable(true);
@ -102,7 +98,8 @@
this.okBTN.setOnAction(event -> { this.okBTN.setOnAction(event -> {
A9.this.setDataAndLeave(); A9.this.setDataAndLeave();
if (!canvas.getTabWithCanvas().getText().contains("*")) canvas.getTabWithCanvas().setText(canvas.getTabWithCanvas().getText() + "*"); if (!canvas.getTabWithCanvas().getText().contains("*"))
canvas.getTabWithCanvas().setText(canvas.getTabWithCanvas().getText() + "*");
}); });
this.okBTN.setOnKeyPressed(event -> { this.okBTN.setOnKeyPressed(event -> {
if (Objects.requireNonNull(event.getCode()) == KeyCode.ENTER) { if (Objects.requireNonNull(event.getCode()) == KeyCode.ENTER) {
@ -113,7 +110,6 @@
} }
}); });
this.cancelBTN = new Button("Cancel"); this.cancelBTN = new Button("Cancel");
this.cancelBTN.setBackground(new Background(new BackgroundFill(C2.ButtonBackgroundColor, new CornerRadii(5.0D), Insets.EMPTY))); this.cancelBTN.setBackground(new Background(new BackgroundFill(C2.ButtonBackgroundColor, new CornerRadii(5.0D), Insets.EMPTY)));
@ -170,9 +166,6 @@
gridPane.add(fp, 0, 6, 2, 1); gridPane.add(fp, 0, 6, 2, 1);
Scene scene = new Scene(gridPane, 300.0D, 205.0D); Scene scene = new Scene(gridPane, 300.0D, 205.0D);
setScene(scene); setScene(scene);
@ -190,22 +183,18 @@
this.relationNameTF.requestFocus(); this.relationNameTF.requestFocus();
sizeToScene(); sizeToScene();
showAndWait(); showAndWait();
} }
private void setDataAndLeave() { private void setDataAndLeave() {
if (this.nameTF.getText() == null || this.nameTF.getText().length() == 0) if (this.nameTF.getText() == null || this.nameTF.getText().length() == 0)
return; this.thisActionMessageDialog.close(); return;
this.thisActionMessageDialog.close();
} }
private void setNothingAndLeave() { private void setNothingAndLeave() {
this.nameTF.setText(this.holdName); this.nameTF.setText(this.holdName);
this.thisActionMessageDialog.close(); this.thisActionMessageDialog.close();
@ -217,29 +206,21 @@
} }
public TextField getRelationNameTF() { public TextField getRelationNameTF() {
return this.relationNameTF; return this.relationNameTF;
} }
public TextField getRelationPraefixTF() { public TextField getRelationPraefixTF() {
return this.relationPraefixTF; return this.relationPraefixTF;
} }
public CheckBox getCreateInsertStatementsCB() { public CheckBox getCreateInsertStatementsCB() {
return this.createInsertStatementsCB; return this.createInsertStatementsCB;
} }
public TextField getNumberRowsToInsertTF() { public TextField getNumberRowsToInsertTF() {
return this.numberRowsToInsertTF; return this.numberRowsToInsertTF;
} }

View File

@ -16,8 +16,7 @@
public class B1 public class B1
extends Stage extends Stage {
{
private final B1 thisActionMessageDialog; private final B1 thisActionMessageDialog;
private final TextField nameTF; private final TextField nameTF;
private final CheckBox createColumnCB; private final CheckBox createColumnCB;
@ -31,8 +30,8 @@
private final CheckBox isNullableCB; private final CheckBox isNullableCB;
private final CheckBox isUniqueCB; private final CheckBox isUniqueCB;
private final Button okBTN; private final Button okBTN;
private Button cancelBTN;
private final String holdName; private final String holdName;
private Button cancelBTN;
public B1(final A3 canvas, double xPos, double yPos, String name, boolean createColumn, String columnName, String relationName, String relationNamePraefix, String columnPostfix, String datatype, boolean isAutoincrement, boolean isKey, boolean isNullable, boolean isUnique) { public B1(final A3 canvas, double xPos, double yPos, String name, boolean createColumn, String columnName, String relationName, String relationNamePraefix, String columnPostfix, String datatype, boolean isAutoincrement, boolean isKey, boolean isNullable, boolean isUnique) {
String title = "Multivalue Attribute Transformation"; String title = "Multivalue Attribute Transformation";
@ -45,15 +44,10 @@
initModality(Modality.APPLICATION_MODAL); initModality(Modality.APPLICATION_MODAL);
this.nameTF = new TextField(name); this.nameTF = new TextField(name);
this.nameTF.setDisable(true); this.nameTF.setDisable(true);
this.createColumnCB = new CheckBox(); this.createColumnCB = new CheckBox();
this.createColumnCB.setSelected(false); this.createColumnCB.setSelected(false);
@ -129,7 +123,8 @@
} }
}); });
this.okBTN.setOnAction(event -> { this.okBTN.setOnAction(event -> {
if (!canvas.getTabWithCanvas().getText().contains("*")) canvas.getTabWithCanvas().setText(canvas.getTabWithCanvas().getText() + "*"); if (!canvas.getTabWithCanvas().getText().contains("*"))
canvas.getTabWithCanvas().setText(canvas.getTabWithCanvas().getText() + "*");
B1.this.setDataAndLeave(); B1.this.setDataAndLeave();
}); });
@ -142,7 +137,6 @@
} }
}); });
this.cancelBTN = new Button("Cancel"); this.cancelBTN = new Button("Cancel");
this.cancelBTN.setBackground(new Background(new BackgroundFill(C2.ButtonBackgroundColor, new CornerRadii(5.0D), Insets.EMPTY))); this.cancelBTN.setBackground(new Background(new BackgroundFill(C2.ButtonBackgroundColor, new CornerRadii(5.0D), Insets.EMPTY)));
@ -185,7 +179,6 @@
} }
GridPane gridPane = new GridPane(); GridPane gridPane = new GridPane();
gridPane.setPadding(new Insets(10.0D, 10.0D, 10.0D, 10.0D)); gridPane.setPadding(new Insets(10.0D, 10.0D, 10.0D, 10.0D));
gridPane.setVgap(4.0D); gridPane.setVgap(4.0D);
@ -215,16 +208,12 @@
gridPane.add(this.isUniqueCB, 1, 10); gridPane.add(this.isUniqueCB, 1, 10);
FlowPane fp = new FlowPane(); FlowPane fp = new FlowPane();
fp.setHgap(10.0D); fp.setHgap(10.0D);
fp.getChildren().addAll(this.okBTN, this.cancelBTN); fp.getChildren().addAll(this.okBTN, this.cancelBTN);
gridPane.add(fp, 0, 11, 2, 1); gridPane.add(fp, 0, 11, 2, 1);
Scene scene = new Scene(gridPane, 300.0D, 325.0D); Scene scene = new Scene(gridPane, 300.0D, 325.0D);
setScene(scene); setScene(scene);
@ -240,23 +229,19 @@
this.columnNameTF.requestFocus(); this.columnNameTF.requestFocus();
sizeToScene(); sizeToScene();
showAndWait(); showAndWait();
} }
private void setDataAndLeave() { private void setDataAndLeave() {
if (this.nameTF.getText() == null || this.nameTF.getText().length() == 0) if (this.nameTF.getText() == null || this.nameTF.getText().length() == 0)
return; this.thisActionMessageDialog.close(); return;
this.thisActionMessageDialog.close();
} }
private void setNothingAndLeave() { private void setNothingAndLeave() {
this.nameTF.setText(this.holdName); this.nameTF.setText(this.holdName);
this.thisActionMessageDialog.close(); this.thisActionMessageDialog.close();
@ -268,64 +253,46 @@
} }
public TextField getColumnNameTF() { public TextField getColumnNameTF() {
return this.columnNameTF; return this.columnNameTF;
} }
public TextField getColumnPostfixTF() { public TextField getColumnPostfixTF() {
return this.columnPostfixTF; return this.columnPostfixTF;
} }
public TextField getDatatypeTF() { public TextField getDatatypeTF() {
return this.datatypeTF; return this.datatypeTF;
} }
public CheckBox getIsAutoincrementCB() { public CheckBox getIsAutoincrementCB() {
return this.isAutoincrementCB; return this.isAutoincrementCB;
} }
public CheckBox getIsKeyCB() { public CheckBox getIsKeyCB() {
return this.isKeyCB; return this.isKeyCB;
} }
public CheckBox getIsNullableCB() { public CheckBox getIsNullableCB() {
return this.isNullableCB; return this.isNullableCB;
} }
public CheckBox getIsUniqueCB() { public CheckBox getIsUniqueCB() {
return this.isUniqueCB; return this.isUniqueCB;
} }
public TextField getRelationNameTF() { public TextField getRelationNameTF() {
return this.relationNameTF; return this.relationNameTF;
} }
public TextField getRelationNamePraefixTF() { public TextField getRelationNamePraefixTF() {
return this.relationNamePraefixTF; return this.relationNamePraefixTF;
} }

View File

@ -42,10 +42,7 @@ import java.util.ArrayList;
import java.util.Objects; import java.util.Objects;
public class B3 public class B3
extends Stage extends Stage {
{
B3 thisERMViewFX;
BorderPane borderPane;
public final TabPane tabPane; public final TabPane tabPane;
public final TabPane infoTabPane; public final TabPane infoTabPane;
public final CheckBox showAttributeCB; public final CheckBox showAttributeCB;
@ -77,7 +74,6 @@ public class B3
public final RadioButton rsidToESBTN; public final RadioButton rsidToESBTN;
public final RadioButton rsisaGeToESBTN; public final RadioButton rsisaGeToESBTN;
public final RadioButton rsisaSpToESBTN; public final RadioButton rsisaSpToESBTN;
public RadioButton lastCreationSelected;
public final ToggleGroup sqlStyleGroup; public final ToggleGroup sqlStyleGroup;
public final RadioButton mySqlStyle; public final RadioButton mySqlStyle;
public final RadioButton msSqlStyle; public final RadioButton msSqlStyle;
@ -86,13 +82,6 @@ public class B3
public final CheckBox generateInsertsCB; public final CheckBox generateInsertsCB;
public final CheckBox singleInsertStatementCB; public final CheckBox singleInsertStatementCB;
public final CheckBox addCurrentDateToDatabaseNameCB; public final CheckBox addCurrentDateToDatabaseNameCB;
public BorderPane treeBorderPane;
public TreeItem<T1> rootTableNode;
public TreeView<T1> treeTableView;
public TreeItem<C3> rootColumnNode;
public TreeView<C3> treeColumnView;
public VBox verticalBox;
public ListView<Graphic_Main_Elem> graphicElemLV;
public final TextField statusInformation; public final TextField statusInformation;
public final MenuItem menuCutMI; public final MenuItem menuCutMI;
public final MenuItem menuCopyMI; public final MenuItem menuCopyMI;
@ -116,6 +105,16 @@ public class B3
public final MenuItem mergeModelsMI; public final MenuItem mergeModelsMI;
public final A2 controller; public final A2 controller;
public final C2 properties; public final C2 properties;
public RadioButton lastCreationSelected;
public BorderPane treeBorderPane;
public TreeItem<T1> rootTableNode;
public TreeView<T1> treeTableView;
public TreeItem<C3> rootColumnNode;
public TreeView<C3> treeColumnView;
public VBox verticalBox;
public ListView<Graphic_Main_Elem> graphicElemLV;
B3 thisERMViewFX;
BorderPane borderPane;
private U1 currentTab; private U1 currentTab;
private ArrayList<Graphic_Main_Elem> toCopyElements; private ArrayList<Graphic_Main_Elem> toCopyElements;
private V1 progress; private V1 progress;
@ -131,18 +130,14 @@ public class B3
treeBorderPane.setBackground(C2.AppBackground); treeBorderPane.setBackground(C2.AppBackground);
this.verticalBox = new VBox(); this.verticalBox = new VBox();
verticalBox.setBackground(C2.AppBackground); verticalBox.setBackground(C2.AppBackground);
this.controller = new A2(this); this.controller = new A2(this);
this.tabPane = new TabPane(); this.tabPane = new TabPane();
tabPane.setBackground(C2.AppBackground); tabPane.setBackground(C2.AppBackground);
@ -181,7 +176,6 @@ public class B3
}); });
this.infoTabPane.setOnMouseClicked(arg0 -> B3.this.showAttributeCB.setDisable(B3.this.infoTabPane.getSelectionModel().getSelectedIndex() != 0)); this.infoTabPane.setOnMouseClicked(arg0 -> B3.this.showAttributeCB.setDisable(B3.this.infoTabPane.getSelectionModel().getSelectedIndex() != 0));
@ -213,7 +207,6 @@ public class B3
}); });
VBox vBox = new VBox(); VBox vBox = new VBox();
this.creation_selection_group = new ToggleGroup(); this.creation_selection_group = new ToggleGroup();
@ -268,7 +261,6 @@ public class B3
}); });
this.treeOpenBTN.setBackground(new Background(new BackgroundFill(Color.LIGHTGRAY, CornerRadii.EMPTY, Insets.EMPTY))); this.treeOpenBTN.setBackground(new Background(new BackgroundFill(Color.LIGHTGRAY, CornerRadii.EMPTY, Insets.EMPTY)));
@ -285,7 +277,6 @@ public class B3
this.treeBorderPane.setTop(this.fptree); this.treeBorderPane.setTop(this.fptree);
this.graphicElemLV = new ListView<>(); this.graphicElemLV = new ListView<>();
graphicElemLV.setBackground(C2.AppBackground); graphicElemLV.setBackground(C2.AppBackground);
this.graphicElemLV.setPrefHeight(300.0D); this.graphicElemLV.setPrefHeight(300.0D);
@ -405,17 +396,13 @@ public class B3
}); });
this.infoTabPane.getTabs().add(new Tab("Elem", this.graphicElemLV)); this.infoTabPane.getTabs().add(new Tab("Elem", this.graphicElemLV));
this.infoTabPane.getTabs().add(new Tab("R-Model", this.verticalBox)); this.infoTabPane.getTabs().add(new Tab("R-Model", this.verticalBox));
this.treeBorderPane.setCenter(this.infoTabPane); this.treeBorderPane.setCenter(this.infoTabPane);
this.selectModeBTN = new RadioButton("Selection Mode"); this.selectModeBTN = new RadioButton("Selection Mode");
this.selectModeBTN.setFont(Font.font(null, FontWeight.BOLD, 11.0D)); this.selectModeBTN.setFont(Font.font(null, FontWeight.BOLD, 11.0D));
this.selectModeBTN.setStyle("-fx-text-fill:white"); this.selectModeBTN.setStyle("-fx-text-fill:white");
@ -454,7 +441,6 @@ public class B3
setMouseHandler(this.textWithoutBorderElemBTN); setMouseHandler(this.textWithoutBorderElemBTN);
imageView = new ImageView(C2.esImage); imageView = new ImageView(C2.esImage);
imageView.setFitHeight(C2.imageHeight); imageView.setFitHeight(C2.imageHeight);
imageView.setFitWidth(C2.imageWidth); imageView.setFitWidth(C2.imageWidth);
@ -470,7 +456,6 @@ public class B3
this.esBTN.setTooltip(new Tooltip("Entity set")); this.esBTN.setTooltip(new Tooltip("Entity set"));
imageView = new ImageView(C2.es_weakImage); imageView = new ImageView(C2.es_weakImage);
imageView.setFitHeight(C2.imageHeight); imageView.setFitHeight(C2.imageHeight);
imageView.setFitWidth(C2.imageWidth); imageView.setFitWidth(C2.imageWidth);
@ -510,7 +495,6 @@ public class B3
this.rsBTN.setTooltip(new Tooltip("Relationship")); this.rsBTN.setTooltip(new Tooltip("Relationship"));
imageView = new ImageView(C2.rs_idImage); imageView = new ImageView(C2.rs_idImage);
imageView.setFitHeight(C2.imageHeight); imageView.setFitHeight(C2.imageHeight);
imageView.setFitWidth(C2.imageWidth); imageView.setFitWidth(C2.imageWidth);
@ -615,7 +599,6 @@ public class B3
this.attrDerivedMultiBTN.setTooltip(new Tooltip("Derived multi-value-attribute")); this.attrDerivedMultiBTN.setTooltip(new Tooltip("Derived multi-value-attribute"));
imageView = new ImageView(C2.attr_conn_attrImage); imageView = new ImageView(C2.attr_conn_attrImage);
imageView.setFitHeight(C2.imageHeight); imageView.setFitHeight(C2.imageHeight);
imageView.setFitWidth(C2.imageWidth); imageView.setFitWidth(C2.imageWidth);
@ -730,7 +713,8 @@ public class B3
B3.this.generateRelationalModelCB.setSelected(false); B3.this.generateRelationalModelCB.setSelected(false);
return; return;
} }
if (B3.this.currentTab != null && B3.this.currentTab.canvas != null) B3.this.currentTab.canvas.dsfdsdfssdf45645re(); if (B3.this.currentTab != null && B3.this.currentTab.canvas != null)
B3.this.currentTab.canvas.dsfdsdfssdf45645re();
} else { } else {
@ -756,34 +740,6 @@ public class B3
}); });
this.generateInsertsCB = new CheckBox("Generate insert statement"); this.generateInsertsCB = new CheckBox("Generate insert statement");
this.generateInsertsCB.setTooltip(new Tooltip("If selected, insert statements are generated in the ddl-script")); this.generateInsertsCB.setTooltip(new Tooltip("If selected, insert statements are generated in the ddl-script"));
setMouseHandler(this.generateInsertsCB); setMouseHandler(this.generateInsertsCB);
@ -802,7 +758,6 @@ public class B3
this.addCurrentDateToDatabaseNameCB.setSelected(false); this.addCurrentDateToDatabaseNameCB.setSelected(false);
this.sqlStyleGroup = new ToggleGroup(); this.sqlStyleGroup = new ToggleGroup();
this.mySqlStyle = new RadioButton("MySQL"); this.mySqlStyle = new RadioButton("MySQL");
this.mySqlStyle.setTooltip(new Tooltip("Creates a MySQL style script")); this.mySqlStyle.setTooltip(new Tooltip("Creates a MySQL style script"));
@ -822,7 +777,6 @@ public class B3
int ci = 0, ri = 0; int ci = 0, ri = 0;
this.buttonPane.add(this.selectModeBTN, ci, ri++, 2, 1); this.buttonPane.add(this.selectModeBTN, ci, ri++, 2, 1);
@ -848,23 +802,6 @@ public class B3
this.buttonPane.add(labeledSeparator, 0, ri++, 2, 1); this.buttonPane.add(labeledSeparator, 0, ri++, 2, 1);
VBox vbox0 = new VBox(10.0D); VBox vbox0 = new VBox(10.0D);
HBox hbox0 = new HBox(10.0D); HBox hbox0 = new HBox(10.0D);
hbox0.getChildren().addAll(this.textElemBTN, this.textWithoutBorderElemBTN); hbox0.getChildren().addAll(this.textElemBTN, this.textWithoutBorderElemBTN);
@ -933,8 +870,6 @@ public class B3
this.buttonPane.add(this.generateRelationalModelCB, 0, ri++, 2, 1); this.buttonPane.add(this.generateRelationalModelCB, 0, ri++, 2, 1);
VBox box = new VBox(10.0D); VBox box = new VBox(10.0D);
box.getChildren().addAll(this.addCurrentDateToDatabaseNameCB, this.generateInsertsCB, this.singleInsertStatementCB, this.saveSQLScriptBTN); box.getChildren().addAll(this.addCurrentDateToDatabaseNameCB, this.generateInsertsCB, this.singleInsertStatementCB, this.saveSQLScriptBTN);
TitledPane createddl = new TitledPane("Create DDL", box); TitledPane createddl = new TitledPane("Create DDL", box);
@ -1066,19 +1001,6 @@ public class B3
} }
for (Tab tab : B3.this.tabPane.getTabs()) { for (Tab tab : B3.this.tabPane.getTabs()) {
U1 runningTab = (U1) tab; U1 runningTab = (U1) tab;
if (runningTab.getText().contains("*")) { if (runningTab.getText().contains("*")) {
@ -1087,55 +1009,21 @@ public class B3
} }
ZZ30 mergedModel = new ZZ30(B3.this.thisERMViewFX); ZZ30 mergedModel = new ZZ30(B3.this.thisERMViewFX);
try { try {
boolean merged = mergedModel.mergeAllModelsInPanes(); boolean merged = mergedModel.mergeAllModelsInPanes();
if (!merged) if (!merged) {
{
return; return;
} }
} catch (ClassNotFoundException | IOException e) {
}
catch (ClassNotFoundException|IOException e) {
return; return;
} }
B3.this.currentTab = B3.this.addNewTab(null); B3.this.currentTab = B3.this.addNewTab(null);
for (Graphic_Main_Elem gme : mergedModel.getGraphicElements()) { for (Graphic_Main_Elem gme : mergedModel.getGraphicElements()) {
@ -1157,9 +1045,6 @@ public class B3
}); });
this.menuVisibility = new Menu("_Visibility"); this.menuVisibility = new Menu("_Visibility");
this.menuVisibility.setDisable(true); this.menuVisibility.setDisable(true);
this.menuVisibilityAllRMI = new RadioMenuItem("All"); this.menuVisibilityAllRMI = new RadioMenuItem("All");
@ -1180,8 +1065,6 @@ public class B3
tggroup.getToggles().addAll(this.menuVisibilityAllRMI, this.menuVisibilityES_RSRMI, this.menuVisibilityES_RS_KEYRMI); tggroup.getToggles().addAll(this.menuVisibilityAllRMI, this.menuVisibilityES_RSRMI, this.menuVisibilityES_RS_KEYRMI);
Menu menuHelp = new Menu("_Help"); Menu menuHelp = new Menu("_Help");
this.menuVersionMI = new MenuItem("Version"); this.menuVersionMI = new MenuItem("Version");
this.menuVersionMI.addEventHandler(ActionEvent.ACTION, this.controller); this.menuVersionMI.addEventHandler(ActionEvent.ACTION, this.controller);
@ -1220,8 +1103,6 @@ public class B3
} }
public void exportModel() { public void exportModel() {
FileChooser fc = new FileChooser(); FileChooser fc = new FileChooser();
fc.setInitialDirectory(new File("/")); fc.setInitialDirectory(new File("/"));
@ -1230,7 +1111,8 @@ public class B3
File file = fc.showSaveDialog(this); File file = fc.showSaveDialog(this);
if (file != null) { if (file != null) {
double[] size = this.currentTab.canvas.dssfsdfd43643634(); double[] size = this.currentTab.canvas.dssfsdfd43643634();
WritableImage wi = new WritableImage((int)size[0], (int)size[1]); try { WritableImage wi = new WritableImage((int) size[0], (int) size[1]);
try {
SnapshotParameters sp = new SnapshotParameters(); SnapshotParameters sp = new SnapshotParameters();
sp.setFill(Paint.valueOf("rgb(27, 27, 30)")); sp.setFill(Paint.valueOf("rgb(27, 27, 30)"));
ImageIO.write(SwingFXUtils.fromFXImage(this.currentTab.canvas.snapshot(sp, wi), null), "png", file); ImageIO.write(SwingFXUtils.fromFXImage(this.currentTab.canvas.snapshot(sp, wi), null), "png", file);
@ -1241,8 +1123,6 @@ public class B3
} }
public boolean saveModelAs() { public boolean saveModelAs() {
if (this.currentTab == null || this.currentTab.canvas == null) return false; if (this.currentTab == null || this.currentTab.canvas == null) return false;
@ -1278,10 +1158,6 @@ public class B3
} }
public void saveSQLScript() throws ZZ20 { public void saveSQLScript() throws ZZ20 {
if (this.currentTab == null || this.currentTab.canvas == null) if (this.currentTab == null || this.currentTab.canvas == null)
return; return;
@ -1290,9 +1166,9 @@ public class B3
LocalDate today = LocalDate.now(); LocalDate today = LocalDate.now();
String currentDate = ""; String currentDate = "";
if (this.addCurrentDateToDatabaseNameCB.isSelected()) if (this.addCurrentDateToDatabaseNameCB.isSelected()) {
{ currentDate = today.getYear() + ((today.getMonthValue() < 10) ? ("0" + today.getMonthValue()) : "" + today.getMonthValue()) + ((today.getDayOfMonth() < 10) ? ("0" + today.getDayOfMonth()) : "" + today.getDayOfMonth());
currentDate = today.getYear() + ((today.getMonthValue() < 10) ? ("0" + today.getMonthValue()) : ""+ today.getMonthValue()) + ((today.getDayOfMonth() < 10) ? ("0" + today.getDayOfMonth()) : ""+ today.getDayOfMonth()); } }
fc.setInitialFileName(currentDate + this.currentTab.canvas.dsfdsfd45645zr().getDatabaseName()); fc.setInitialFileName(currentDate + this.currentTab.canvas.dsfdsfd45645zr().getDatabaseName());
fc.getExtensionFilters().add(new FileChooser.ExtensionFilter("*.SQL", "*.sql")); fc.getExtensionFilters().add(new FileChooser.ExtensionFilter("*.SQL", "*.sql"));
fc.setTitle("Save sql script as ..."); fc.setTitle("Save sql script as ...");
@ -1312,23 +1188,27 @@ public class B3
StringBuffer sb = null; StringBuffer sb = null;
if (B3.this.mySqlStyle.isSelected()) { sb = B3.this.currentTab.canvas.dsfdsfd45645zr().create_MySQL_Script(B3.this.generateInsertsCB.isSelected(), if (B3.this.mySqlStyle.isSelected()) {
sb = B3.this.currentTab.canvas.dsfdsfd45645zr().create_MySQL_Script(B3.this.generateInsertsCB.isSelected(),
B3.this.addCurrentDateToDatabaseNameCB.isSelected(), B3.this.addCurrentDateToDatabaseNameCB.isSelected(),
B3.this.singleInsertStatementCB.isSelected()); } B3.this.singleInsertStatementCB.isSelected());
} else if (B3.this.msSqlStyle.isSelected()) {
else if (B3.this.msSqlStyle.isSelected()) { sb = B3.this.currentTab.canvas.dsfdsfd45645zr().create_MS_SQL_Script(B3.this.generateInsertsCB.isSelected(), sb = B3.this.currentTab.canvas.dsfdsfd45645zr().create_MS_SQL_Script(B3.this.generateInsertsCB.isSelected(),
B3.this.addCurrentDateToDatabaseNameCB.isSelected(), B3.this.addCurrentDateToDatabaseNameCB.isSelected(),
B3.this.singleInsertStatementCB.isSelected()); } B3.this.singleInsertStatementCB.isSelected());
}
assert sb != null; assert sb != null;
fw.write(sb.toString()); fw.write(sb.toString());
fw.close(); fw.close();
Thread.sleep(2000L); Thread.sleep(2000L);
} } catch (IOException | ZZ20 | InterruptedException ex) {
catch (IOException|ZZ20|InterruptedException ex) {
try { if (fw != null) fw.close(); } catch (IOException ignored) {} try {
if (fw != null) fw.close();
} catch (IOException ignored) {
}
} }
Platform.runLater(() -> { Platform.runLater(() -> {
@ -1337,13 +1217,15 @@ public class B3
}); });
}); });
this.progress.setThread(t); this.progress.setThread(t);
try { t.join(); } catch (InterruptedException ignored) {} try {
t.join();
} catch (InterruptedException ignored) {
}
this.borderPane.setDisable(false); this.borderPane.setDisable(false);
} }
String databaseName = this.currentTab.getText().replace(".erm", "") + "db"; String databaseName = this.currentTab.getText().replace(".erm", "") + "db";
this.currentTab.canvas.dsfdsfd45645zr().setDatabaseName(databaseName); this.currentTab.canvas.dsfdsfd45645zr().setDatabaseName(databaseName);
} }
@ -1377,15 +1259,14 @@ public class B3
} }
public void readModel() { public void readModel() {
FileChooser fc = new FileChooser(); FileChooser fc = new FileChooser();
if (this.currentTab != null && this.currentTab.canvas != null && this.currentTab.canvas.getInitialDirectory() != null) { fc.setInitialDirectory(new File(this.currentTab.canvas.getSaveFile().getParentFile().getAbsolutePath())); } if (this.currentTab != null && this.currentTab.canvas != null && this.currentTab.canvas.getInitialDirectory() != null) {
else { fc.setInitialDirectory(new File("/")); } fc.setInitialDirectory(new File(this.currentTab.canvas.getSaveFile().getParentFile().getAbsolutePath()));
} else {
fc.setInitialDirectory(new File("/"));
}
fc.getExtensionFilters().add(new FileChooser.ExtensionFilter("ERM", "*.erm")); fc.getExtensionFilters().add(new FileChooser.ExtensionFilter("ERM", "*.erm"));
fc.setTitle("Open model"); fc.setTitle("Open model");
File file = fc.showOpenDialog(this); File file = fc.showOpenDialog(this);
@ -1413,8 +1294,6 @@ public class B3
this.currentTab.canvas.sdfsdfds3465er(true); this.currentTab.canvas.sdfsdfds3465er(true);
this.currentTab.canvas.setSaveFile(file); this.currentTab.canvas.setSaveFile(file);
this.currentTab.setText(file.getName()); this.currentTab.setText(file.getName());
this.tabPane.getSelectionModel().select(this.currentTab); this.tabPane.getSelectionModel().select(this.currentTab);
@ -1443,16 +1322,11 @@ public class B3
} }
public void setCurrentTab(U1 currentTab) { public void setCurrentTab(U1 currentTab) {
this.currentTab = currentTab; this.currentTab = currentTab;
} }
public U1 addNewTab(File modelFromFile) { public U1 addNewTab(File modelFromFile) {
int number = this.tabPane.getTabs().size(); int number = this.tabPane.getTabs().size();
@ -1462,24 +1336,16 @@ public class B3
} }
public ArrayList<Graphic_Main_Elem> getToCopyElements() { public ArrayList<Graphic_Main_Elem> getToCopyElements() {
return this.toCopyElements; return this.toCopyElements;
} }
public void setToCopyElements(ArrayList<Graphic_Main_Elem> toCopyElements) { public void setToCopyElements(ArrayList<Graphic_Main_Elem> toCopyElements) {
this.toCopyElements = toCopyElements; this.toCopyElements = toCopyElements;
} }
private void setMouseHandler(final Labeled node) { private void setMouseHandler(final Labeled node) {
node.setOnMouseEntered(event -> { node.setOnMouseEntered(event -> {
B3.this.getScene().getRoot().setCursor(Cursor.HAND); B3.this.getScene().getRoot().setCursor(Cursor.HAND);

View File

@ -16,10 +16,10 @@
import javafx.stage.Stage; import javafx.stage.Stage;
import javafx.stage.StageStyle; import javafx.stage.StageStyle;
import javafx.stage.Window; import javafx.stage.Window;
import java.util.Optional; import java.util.Optional;
public class C1 public class C1 {
{
private Optional<ButtonType> result; private Optional<ButtonType> result;
public C1(Window window, Alert.AlertType alertType, String title, String header, String contentText, Boolean showAndWait, Image image, String okBtnText, String cancelBtnText, Color btnBackgroundColor, Color btnSelectedColor, Color btnFocusColor) { public C1(Window window, Alert.AlertType alertType, String title, String header, String contentText, Boolean showAndWait, Image image, String okBtnText, String cancelBtnText, Color btnBackgroundColor, Color btnSelectedColor, Color btnFocusColor) {
@ -31,7 +31,8 @@
} }
button = (Button) alert.getDialogPane().lookupButton(ButtonType.CANCEL); button = (Button) alert.getDialogPane().lookupButton(ButtonType.CANCEL);
if (button != null) setButtonLookAndFeel(button, cancelBtnText, btnBackgroundColor, btnSelectedColor, btnFocusColor); if (button != null)
setButtonLookAndFeel(button, cancelBtnText, btnBackgroundColor, btnSelectedColor, btnFocusColor);
button = (Button) alert.getDialogPane().lookupButton(ButtonType.APPLY); button = (Button) alert.getDialogPane().lookupButton(ButtonType.APPLY);
if (button != null) setButtonLookAndFeel(button, null, btnBackgroundColor, btnSelectedColor, btnFocusColor); if (button != null) setButtonLookAndFeel(button, null, btnBackgroundColor, btnSelectedColor, btnFocusColor);
@ -91,18 +92,6 @@
} }
private Alert setAlert(Window window, Alert.AlertType alertType, String title, String header, String contentText, Image image) { private Alert setAlert(Window window, Alert.AlertType alertType, String title, String header, String contentText, Image image) {
Alert alert = new Alert(alertType); Alert alert = new Alert(alertType);
alert.setTitle(title); alert.setTitle(title);
@ -113,12 +102,9 @@
StackPane iv = switch (alertType) { StackPane iv = switch (alertType) {
case ERROR -> case ERROR -> C2.alerterror;
C2.alerterror; case INFORMATION -> C2.alertinformation;
case INFORMATION -> default -> C2.alertconfirmation;
C2.alertinformation;
default ->
C2.alertconfirmation;
}; };
alert.setGraphic(iv); alert.setGraphic(iv);
@ -147,8 +133,6 @@
} }
public Optional<ButtonType> getResult() { public Optional<ButtonType> getResult() {
return this.result; return this.result;
} }

View File

@ -1,10 +1,5 @@
package at.fos.ermodel.gui; package at.fos.ermodel.gui;
import java.io.BufferedReader;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Objects;
import javafx.geometry.Insets; import javafx.geometry.Insets;
import javafx.scene.image.Image; import javafx.scene.image.Image;
import javafx.scene.layout.Background; import javafx.scene.layout.Background;
@ -16,8 +11,12 @@
import javafx.scene.text.FontWeight; import javafx.scene.text.FontWeight;
import javafx.scene.text.Text; import javafx.scene.text.Text;
public class C2 import java.io.BufferedReader;
{ import java.io.InputStream;
import java.util.HashMap;
import java.util.Objects;
public class C2 {
public static final Color MouseSelectedColor = Color.RED; public static final Color MouseSelectedColor = Color.RED;
public static final Color FocusOnComponentColor = Color.BLUE; public static final Color FocusOnComponentColor = Color.BLUE;
public static final Color ButtonBackgroundColor = Color.rgb(179, 179, 179); public static final Color ButtonBackgroundColor = Color.rgb(179, 179, 179);
@ -94,9 +93,6 @@
public static HashMap<String, BufferedReader> randomDataFilesExtern = new HashMap<>(); public static HashMap<String, BufferedReader> randomDataFilesExtern = new HashMap<>();
public C2() { public C2() {
alerterror.getStyleClass().add("alert.error.dialog-pane"); alerterror.getStyleClass().add("alert.error.dialog-pane");

View File

@ -1,8 +1,11 @@
package at.fos.ermodel.gui; package at.fos.ermodel.gui;
public class C3 public class C3
implements Comparable<C3> implements Comparable<C3> {
{
private final String columnName; private final String columnName;
protected String dataGenerationType;
protected String par1;
protected String par2;
private String datatype; private String datatype;
private boolean isKey; private boolean isKey;
private boolean isNullable; private boolean isNullable;
@ -11,9 +14,6 @@
private long autoincrementStartAt; private long autoincrementStartAt;
private T2 referencesTo; private T2 referencesTo;
private long referstoGraphicalElement; private long referstoGraphicalElement;
protected String dataGenerationType;
protected String par1;
protected String par2;
public C3(String columnName, String datatype, boolean isKey, boolean isNullable, boolean isUnique, boolean isAutoincrement, long autoincrementStartAt, T2 referencesTo, long referstoGraphicalElement, String dataGenerationType, String par1, String par2) { public C3(String columnName, String datatype, boolean isKey, boolean isNullable, boolean isUnique, boolean isAutoincrement, long autoincrementStartAt, T2 referencesTo, long referstoGraphicalElement, String dataGenerationType, String par1, String par2) {
this.columnName = columnName; this.columnName = columnName;
@ -29,25 +29,6 @@
this.par1 = par1; this.par1 = par1;
this.par2 = par2; this.par2 = par2;
} }
public C3(String columnName) { public C3(String columnName) {
@ -55,9 +36,6 @@
} }
public String getColumnName() { public String getColumnName() {
return this.columnName; return this.columnName;
} }
@ -105,8 +83,6 @@
} }
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (this == obj) if (this == obj)
return true; return true;
@ -121,8 +97,6 @@
} }
public String toString() { public String toString() {
return "RM_Column [columnName=" + this.columnName + ", datatype=" + this.datatype + ", isKey=" + this.isKey + ", isNullable=" + return "RM_Column [columnName=" + this.columnName + ", datatype=" + this.datatype + ", isKey=" + this.isKey + ", isNullable=" +
this.isNullable + ", isUnique=" + this.isUnique + ", isAutoincrement=" + this.isAutoincrement + ", referencesTo=" + this.isNullable + ", isUnique=" + this.isUnique + ", isAutoincrement=" + this.isAutoincrement + ", referencesTo=" +
@ -131,8 +105,6 @@
} }
public int compareTo(C3 o) { public int compareTo(C3 o) {
if (this.isKey && !o.isKey) return -1; if (this.isKey && !o.isKey) return -1;
if (!this.isKey && o.isKey) return 1; if (!this.isKey && o.isKey) return 1;
@ -140,9 +112,6 @@
} }
public long getReferstoGraphicalElement() { public long getReferstoGraphicalElement() {
return this.referstoGraphicalElement; return this.referstoGraphicalElement;
} }

View File

@ -1,5 +1,7 @@
package at.fos.ermodel.gui; package at.fos.ermodel.gui;
import javafx.application.Platform;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
@ -10,29 +12,9 @@
import java.util.Collections; import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import javafx.application.Platform;
public class C4 {
public class C4
{
private String databaseName; private String databaseName;
private ArrayList<T1> tables; private ArrayList<T1> tables;
private StringBuffer sqlScript; private StringBuffer sqlScript;
@ -43,90 +25,52 @@
} }
public boolean addTable(T1 table) { public boolean addTable(T1 table) {
if (this.tables.contains(table)) return true; if (this.tables.contains(table)) return true;
return !this.tables.add(table); return !this.tables.add(table);
} }
public void removeTable(T1 table) { public void removeTable(T1 table) {
this.tables.remove(table); this.tables.remove(table);
} }
public String getDatabaseName() { public String getDatabaseName() {
return this.databaseName; return this.databaseName;
} }
public void setDatabaseName(String databaseName) { public void setDatabaseName(String databaseName) {
this.databaseName = databaseName; this.databaseName = databaseName;
} }
public String toString() { public String toString() {
return "RM_Database [databaseName=" + this.databaseName + ", tables=" + this.tables + "]"; return "RM_Database [databaseName=" + this.databaseName + ", tables=" + this.tables + "]";
} }
public ArrayList<T1> getTables() { public ArrayList<T1> getTables() {
return this.tables; return this.tables;
} }
public void setTables(ArrayList<T1> tables) { public void setTables(ArrayList<T1> tables) {
this.tables = tables; this.tables = tables;
} }
public void sortByTableName() { public void sortByTableName() {
Collections.sort(this.tables); Collections.sort(this.tables);
} }
private String addChars() { private String addChars() {
return String.valueOf(' ').repeat(5); return String.valueOf(' ').repeat(5);
} }
public StringBuffer create_MS_SQL_Script(boolean createInsertStatements, boolean addCDToDBName, boolean singeInserts) throws ZZ20 { public StringBuffer create_MS_SQL_Script(boolean createInsertStatements, boolean addCDToDBName, boolean singeInserts) throws ZZ20 {
LocalDate today = LocalDate.now(); LocalDate today = LocalDate.now();
String currentDate = today.getYear() + ( String currentDate = today.getYear() + (
@ -178,8 +122,7 @@
keypart.append(")").append("\n"); keypart.append(")").append("\n");
this.sqlScript = this.sqlScript.append(addChars()).append(keypart).append(")"); this.sqlScript = this.sqlScript.append(addChars()).append(keypart).append(")");
this.sqlScript.append(";\n\n"); this.sqlScript.append(";\n\n");
if (autoincrementCounter != 1) if (autoincrementCounter != 1) {
{
if (autoincrementCounter > 1) { if (autoincrementCounter > 1) {
throw new ZZ20("There is only one autoincrement value allowed, and it must be the key. Table: " + table.getTablename()); throw new ZZ20("There is only one autoincrement value allowed, and it must be the key. Table: " + table.getTablename());
@ -215,8 +158,6 @@
} }
ArrayList<C3> equalColumnsBecauseRecursive = new ArrayList<>(); ArrayList<C3> equalColumnsBecauseRecursive = new ArrayList<>();
for (int i = 0; i < fkColumns.size(); i++) { for (int i = 0; i < fkColumns.size(); i++) {
for (int j = i + 1; j < fkColumns.size(); j++) { for (int j = i + 1; j < fkColumns.size(); j++) {
@ -263,22 +204,6 @@
} }
public StringBuffer create_MySQL_Script(boolean createInsertStatements, boolean addCDToDBName, boolean singeInserts) throws ZZ20 { public StringBuffer create_MySQL_Script(boolean createInsertStatements, boolean addCDToDBName, boolean singeInserts) throws ZZ20 {
LocalDate today = LocalDate.now(); LocalDate today = LocalDate.now();
String currentDate = today.getYear() + ( String currentDate = today.getYear() + (
@ -329,8 +254,7 @@
this.sqlScript = this.sqlScript.append(addChars()).append(keypart).append(")"); this.sqlScript = this.sqlScript.append(addChars()).append(keypart).append(")");
if (autoincrementCounter == 1) { if (autoincrementCounter == 1) {
this.sqlScript.append("auto_increment=").append(holdAutoincrementStartAt); this.sqlScript.append("auto_increment=").append(holdAutoincrementStartAt);
} } else if (autoincrementCounter > 1) {
else if (autoincrementCounter > 1) {
throw new ZZ20("There is only one autoincrement value allowed, and it must be the key. Table: " + table.getTablename()); throw new ZZ20("There is only one autoincrement value allowed, and it must be the key. Table: " + table.getTablename());
} }
this.sqlScript.append(";\n\n"); this.sqlScript.append(";\n\n");
@ -357,7 +281,8 @@
if (column.getReferencesTo() != null) fkColumns.add(column); if (column.getReferencesTo() != null) fkColumns.add(column);
} }
if (fkColumns.size() == 0) if (fkColumns.size() == 0)
continue; this.sqlScript = this.sqlScript.append("alter table ").append(table.getTablename()).append("\n"); continue;
this.sqlScript = this.sqlScript.append("alter table ").append(table.getTablename()).append("\n");
HashSet<String> tableNamesInfkColumns = new HashSet<>(); HashSet<String> tableNamesInfkColumns = new HashSet<>();
@ -366,8 +291,6 @@
} }
ArrayList<C3> equalColumnsBecauseRecursive = new ArrayList<>(); ArrayList<C3> equalColumnsBecauseRecursive = new ArrayList<>();
for (int i = 0; i < fkColumns.size(); i++) { for (int i = 0; i < fkColumns.size(); i++) {
for (int j = i + 1; j < fkColumns.size(); j++) { for (int j = i + 1; j < fkColumns.size(); j++) {
@ -412,12 +335,6 @@
} }
private void allColumnsSetForGeneration() throws ZZ20 { private void allColumnsSetForGeneration() throws ZZ20 {
for (T1 table : this.tables) { for (T1 table : this.tables) {
for (C3 column : table.getSkjdfhgdskjf674534()) { for (C3 column : table.getSkjdfhgdskjf674534()) {
@ -432,10 +349,6 @@
} }
private void allTablesSetForGeneration() throws ZZ20 { private void allTablesSetForGeneration() throws ZZ20 {
for (T1 table : this.tables) { for (T1 table : this.tables) {
if (!table.isCreateInserts()) { if (!table.isCreateInserts()) {
@ -445,15 +358,12 @@
} }
private String generateRandomValue(C3 column) throws ZZ20 { private String generateRandomValue(C3 column) throws ZZ20 {
String randomValue; String randomValue;
try { String[] datumteil; LocalDate from, till; String str; try {
String[] datumteil;
LocalDate from, till;
String str;
switch ((str = column.dataGenerationType).hashCode()) { switch ((str = column.dataGenerationType).hashCode()) {
case -1601184309 -> { case -1601184309 -> {
if (!str.equals("Random Boolean")) { if (!str.equals("Random Boolean")) {
@ -494,12 +404,12 @@
return randomValue; return randomValue;
} }
} }
randomValue = T3.getRandomData(column.dataGenerationType, null); } catch (NumberFormatException nfe) { throw new ZZ20("Column: " + column.getColumnName() + "\n" + "There is a data conversion problem: " + column.par1 + "/" + column.par2); } return randomValue; randomValue = T3.getRandomData(column.dataGenerationType, null);
} catch (NumberFormatException nfe) {
throw new ZZ20("Column: " + column.getColumnName() + "\n" + "There is a data conversion problem: " + column.par1 + "/" + column.par2);
}
return randomValue;
} }
private int getNumberValuesOfRandomData(C3 column) { private int getNumberValuesOfRandomData(C3 column) {
@ -512,19 +422,19 @@
} }
} else { } else {
randomDataAsList = T3.randomData.get(column.dataGenerationType); randomDataAsList = T3.randomData.get(column.dataGenerationType);
} if (randomDataAsList != null) return randomDataAsList.size(); }
if (randomDataAsList != null) return randomDataAsList.size();
return -1; return -1;
} }
private void createFilehandleForExternalDataSources() throws ZZ20 { private void createFilehandleForExternalDataSources() throws ZZ20 {
for (T1 table : this.tables) { for (T1 table : this.tables) {
for (C3 column : table.getSkjdfhgdskjf674534()) { for (C3 column : table.getSkjdfhgdskjf674534()) {
if (column.dataGenerationType == null || if (column.dataGenerationType == null ||
!column.dataGenerationType.equals("Extern")) !column.dataGenerationType.equals("Extern"))
continue; BufferedReader br = C2.randomDataFilesExtern.get(column.par1); continue;
BufferedReader br = C2.randomDataFilesExtern.get(column.par1);
if (br == null) { if (br == null) {
BufferedReader fr; BufferedReader fr;
@ -542,12 +452,6 @@
} }
public void createDependency() { public void createDependency() {
for (T1 table : this.tables) { for (T1 table : this.tables) {
for (C3 column : table.getSkjdfhgdskjf674534()) { for (C3 column : table.getSkjdfhgdskjf674534()) {
@ -567,31 +471,24 @@
} }
private HashMap<String, ArrayList<String>> initializeColumns() { private HashMap<String, ArrayList<String>> initializeColumns() {
HashMap<String, ArrayList<String>> holdValues = new HashMap<>(); HashMap<String, ArrayList<String>> holdValues = new HashMap<>();
for (T1 table : this.tables) { for (T1 table : this.tables) {
if (!table.isCreateInserts()) if (!table.isCreateInserts())
continue; for (C3 column : table.getSkjdfhgdskjf674534()) { continue;
for (C3 column : table.getSkjdfhgdskjf674534()) {
if (column.dataGenerationType != null && column.dataGenerationType.equals("No") && column.isNullable()) if (column.dataGenerationType != null && column.dataGenerationType.equals("No") && column.isNullable())
continue; holdValues.put(table.getTablename() + "." + column.getColumnName(), null); continue;
holdValues.put(table.getTablename() + "." + column.getColumnName(), null);
} }
} }
return holdValues; return holdValues;
} }
private T1 getTableGivenTablename(String tablename) { private T1 getTableGivenTablename(String tablename) {
for (T1 table : this.tables) { for (T1 table : this.tables) {
if (table.getTablename().equals(tablename)) return table; if (table.getTablename().equals(tablename)) return table;
@ -600,17 +497,13 @@
} }
private boolean allColumnValuesCreated(HashMap<String, ArrayList<String>> columnValues) { private boolean allColumnValuesCreated(HashMap<String, ArrayList<String>> columnValues) {
int counter = 0; int counter = 0;
for (T1 table : this.tables) { for (T1 table : this.tables) {
if (!table.isCreateInserts()) if (!table.isCreateInserts())
continue; for (C3 column : table.getSkjdfhgdskjf674534()) { continue;
for (C3 column : table.getSkjdfhgdskjf674534()) {
ArrayList<String> values = columnValues.get(table.getTablename() + "." + column.getColumnName()); ArrayList<String> values = columnValues.get(table.getTablename() + "." + column.getColumnName());
if (values != null && values.size() > 0) counter++; if (values != null && values.size() > 0) counter++;
} }
@ -619,13 +512,6 @@
} }
private void allDependentCreated(T1 table, HashMap<String, ArrayList<String>> createdColumns) { private void allDependentCreated(T1 table, HashMap<String, ArrayList<String>> createdColumns) {
for (T1 dependsOn : table.getDependsOnTable()) { for (T1 dependsOn : table.getDependsOnTable()) {
for (C3 column : dependsOn.getSkjdfhgdskjf674534()) { for (C3 column : dependsOn.getSkjdfhgdskjf674534()) {
@ -638,16 +524,10 @@
} }
private HashMap<String, ArrayList<String>> createColumnValues() throws ZZ20 { private HashMap<String, ArrayList<String>> createColumnValues() throws ZZ20 {
Platform.runLater(() -> V1.thisActionMessageDialog.getShowFilename().setText("create column values")); Platform.runLater(() -> V1.thisActionMessageDialog.getShowFilename().setText("create column values"));
HashMap<String, ArrayList<String>> columnValues = initializeColumns(); HashMap<String, ArrayList<String>> columnValues = initializeColumns();
createFilehandleForExternalDataSources(); createFilehandleForExternalDataSources();
@ -659,17 +539,6 @@
createDependency(); createDependency();
while (!done) { while (!done) {
for (T1 table : this.tables) { for (T1 table : this.tables) {
for (C3 column : table.getSkjdfhgdskjf674534()) { for (C3 column : table.getSkjdfhgdskjf674534()) {
@ -688,33 +557,28 @@
values.add(String.valueOf(autoincrementStartAt++)); values.add(String.valueOf(autoincrementStartAt++));
} }
} } else if (column.isKey() && column.getReferencesTo() == null && !valuesExist) {
else if (column.isKey() && column.getReferencesTo() == null && !valuesExist) {
for (int i = 0; i < table.getJdshfalkajsd677676(); i++) { for (int i = 0; i < table.getJdshfalkajsd677676(); i++) {
String randomValue = generateRandomValue(column); String randomValue = generateRandomValue(column);
values.add(String.valueOf(randomValue)); values.add(String.valueOf(randomValue));
} }
} } else if (column.isKey() && column.getReferencesTo() != null && !valuesExist) {
else if (column.isKey() && column.getReferencesTo() != null && !valuesExist) {
HashMap<String, ArrayList<String>> x = getStringArrayListHashMap(columnValues, table, column, values); HashMap<String, ArrayList<String>> x = getStringArrayListHashMap(columnValues, table, column, values);
if (x != null) return x; if (x != null) return x;
} } else if (column.getReferencesTo() != null && !valuesExist) {
else if (column.getReferencesTo() != null && !valuesExist) {
getStringArrayListHashMap(columnValues, table, column, values); getStringArrayListHashMap(columnValues, table, column, values);
} } else if (!valuesExist) {
else if (!valuesExist) {
if (column.isUnique()) { if (column.isUnique()) {
int numberPossibleValues = getNumberValuesOfRandomData(column); int numberPossibleValues = getNumberValuesOfRandomData(column);
if (numberPossibleValues != -1) if (numberPossibleValues != -1) {
{
if (numberPossibleValues < table.getJdshfalkajsd677676()) { if (numberPossibleValues < table.getJdshfalkajsd677676()) {
throw new ZZ20("Column " + column.getColumnName() + " is defined as unique. \nNot enough values for generation mode\n" + throw new ZZ20("Column " + column.getColumnName() + " is defined as unique. \nNot enough values for generation mode\n" +
@ -750,11 +614,11 @@
private HashMap<String, ArrayList<String>> getStringArrayListHashMap(HashMap<String, ArrayList<String>> columnValues, T1 table, C3 column, ArrayList<String> values) { private HashMap<String, ArrayList<String>> getStringArrayListHashMap(HashMap<String, ArrayList<String>> columnValues, T1 table, C3 column, ArrayList<String> values) {
allDependentCreated(table, columnValues); allDependentCreated(table, columnValues);
for (int i = 0; i < table.getJdshfalkajsd677676(); i++) for (int i = 0; i < table.getJdshfalkajsd677676(); i++) {
{
ArrayList<String> valuesPK = columnValues.get(column.getReferencesTo().tablename() + "." + column.getReferencesTo().columnname()); ArrayList<String> valuesPK = columnValues.get(column.getReferencesTo().tablename() + "." + column.getReferencesTo().columnname());
if (valuesPK == null) if (valuesPK == null)
break; String randomValue = valuesPK.get(i % valuesPK.size()); break;
String randomValue = valuesPK.get(i % valuesPK.size());
values.add(String.valueOf(randomValue)); values.add(String.valueOf(randomValue));
} }
@ -767,7 +631,6 @@
HashMap<String, ArrayList<String>> holdPKValuesForFK = createColumnValues(); HashMap<String, ArrayList<String>> holdPKValuesForFK = createColumnValues();
for (T1 table : this.tables) { for (T1 table : this.tables) {
ArrayList<String> keyColumns = new ArrayList<>(); ArrayList<String> keyColumns = new ArrayList<>();
@ -788,22 +651,22 @@
concatKeyValue.append(valuesPK.get(i)); concatKeyValue.append(valuesPK.get(i));
} }
if (!concatKeyValues.contains(concatKeyValue.toString())) { concatKeyValues.add(concatKeyValue.toString()); } if (!concatKeyValues.contains(concatKeyValue.toString())) {
else concatKeyValues.add(concatKeyValue.toString());
} else {
{ for (C3 column : table.getSkjdfhgdskjf674534()) { for (C3 column : table.getSkjdfhgdskjf674534()) {
ArrayList<String> valuesPK = holdPKValuesForFK.get(table.getTablename() + "." + column.getColumnName()); ArrayList<String> valuesPK = holdPKValuesForFK.get(table.getTablename() + "." + column.getColumnName());
valuesPK.remove(i); valuesPK.remove(i);
holdPKValuesForFK.put(table.getTablename() + "." + column.getColumnName(), valuesPK); holdPKValuesForFK.put(table.getTablename() + "." + column.getColumnName(), valuesPK);
} }
i--; i--;
deleted++; } deleted++;
}
} }
} catch (IndexOutOfBoundsException ignored) {} } catch (IndexOutOfBoundsException ignored) {
}
table.setJdshfalkajsd677676(table.getJdshfalkajsd677676() - deleted); table.setJdshfalkajsd677676(table.getJdshfalkajsd677676() - deleted);
@ -843,8 +706,7 @@
valuespart = new StringBuilder(valuespart.substring(0, valuespart.length() - 1)); valuespart = new StringBuilder(valuespart.substring(0, valuespart.length() - 1));
valuespart.append(")"); valuespart.append(")");
sqlScript.append(valuespart).append((i < table.getJdshfalkajsd677676() - 1L) ? "," : ";").append("\n"); sqlScript.append(valuespart).append((i < table.getJdshfalkajsd677676() - 1L) ? "," : ";").append("\n");
} } else {
else {
addInsertTable(sqlScript, table); addInsertTable(sqlScript, table);
sqlScript.append("\t\t("); sqlScript.append("\t\t(");

View File

@ -8,8 +8,7 @@ import java.io.Serial;
public abstract class Graphic_ATTR_Elem public abstract class Graphic_ATTR_Elem
extends Graphic_Figure_Elem extends Graphic_Figure_Elem
implements U2 implements U2 {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
protected boolean createColumn; protected boolean createColumn;
@ -52,10 +51,6 @@ public abstract class Graphic_ATTR_Elem
} }
protected void changeName(String name) { protected void changeName(String name) {
super.changeName(name); super.changeName(name);
@ -76,318 +71,186 @@ public abstract class Graphic_ATTR_Elem
} }
public void dsfsdfsfd() { public void dsfsdfsfd() {
this.gc.clearRect(this.xPos - this.textWidth / 2.0D - 2.0D, this.yPos - this.textHeight / 2.0D - 2.0D, this.textWidth + 4.0D, this.textHeight + 4.0D); this.gc.clearRect(this.xPos - this.textWidth / 2.0D - 2.0D, this.yPos - this.textHeight / 2.0D - 2.0D, this.textWidth + 4.0D, this.textHeight + 4.0D);
} }
public char sdfsdfdsfdf() { public char sdfsdfdsfdf() {
return 'a'; return 'a';
} }
protected Color sefdsfdsf45() { protected Color sefdsfdsf45() {
return C2.ERMATTRColor; return C2.ERMATTRColor;
} }
protected Color getColorSelected() { protected Color getColorSelected() {
return C2.ERMSelectedColor; return C2.ERMSelectedColor;
} }
public boolean getCreateColumn() { public boolean getCreateColumn() {
return this.createColumn; return this.createColumn;
} }
public void setCreateColumn(boolean createColumn) { public void setCreateColumn(boolean createColumn) {
this.createColumn = createColumn; this.createColumn = createColumn;
} }
public String getColumnPostfix() { public String getColumnPostfix() {
return this.columnPostfix; return this.columnPostfix;
} }
public void setColumnPostfix(String columnPraefix) { public void setColumnPostfix(String columnPraefix) {
this.columnPostfix = columnPraefix; this.columnPostfix = columnPraefix;
} }
public String getColumnName() { public String getColumnName() {
return this.columnName; return this.columnName;
} }
public void setColumnName(String columnName) { public void setColumnName(String columnName) {
this.columnName = columnName; this.columnName = columnName;
} }
public String getDatatype() { public String getDatatype() {
return this.datatype; return this.datatype;
} }
public void setDatatype(String datatype) { public void setDatatype(String datatype) {
this.datatype = datatype; this.datatype = datatype;
} }
public boolean isKey() { public boolean isKey() {
return this.isKey; return this.isKey;
} }
public void setIsKey(boolean isKey) { public void setIsKey(boolean isKey) {
this.isKey = isKey; this.isKey = isKey;
} }
public boolean isAutoincrement() { public boolean isAutoincrement() {
return this.isAutoincrement; return this.isAutoincrement;
} }
public void setIsAutoincrement(boolean isAutoincrement) { public void setIsAutoincrement(boolean isAutoincrement) {
this.isAutoincrement = isAutoincrement; this.isAutoincrement = isAutoincrement;
} }
public long getAutoincrementStartAt() { public long getAutoincrementStartAt() {
return this.autoincrementStartAt; return this.autoincrementStartAt;
} }
public void setAutoincrementStartAt(long autoincrementStartAt) { public void setAutoincrementStartAt(long autoincrementStartAt) {
this.autoincrementStartAt = autoincrementStartAt; this.autoincrementStartAt = autoincrementStartAt;
} }
public boolean isUnique() { public boolean isUnique() {
return this.isUnique; return this.isUnique;
} }
public void setIsUnique(boolean isUnique) { public void setIsUnique(boolean isUnique) {
this.isUnique = isUnique; this.isUnique = isUnique;
} }
public boolean isNullable() { public boolean isNullable() {
return this.isNullable; return this.isNullable;
} }
public void setIsNullable(boolean isNullable) { public void setIsNullable(boolean isNullable) {
this.isNullable = isNullable; this.isNullable = isNullable;
} }
public String getMVRelationName() { public String getMVRelationName() {
return this.mvRelationname; return this.mvRelationname;
} }
public void setMVRelationName(String mvRelationname) { public void setMVRelationName(String mvRelationname) {
this.mvRelationname = mvRelationname; this.mvRelationname = mvRelationname;
} }
public String getMVRelationNamePraefix() { public String getMVRelationNamePraefix() {
return this.mvRelationnamePraefix; return this.mvRelationnamePraefix;
} }
public void setMVRelationNamePraefix(String mvRelationnamePraefix) { public void setMVRelationNamePraefix(String mvRelationnamePraefix) {
this.mvRelationnamePraefix = mvRelationnamePraefix; this.mvRelationnamePraefix = mvRelationnamePraefix;
} }
public String sdfsdfsd32234243() { public String sdfsdfsd32234243() {
return this.name + "@" + this.datatype; return this.name + "@" + this.datatype;
} }
public String getDataGenerationType() { public String getDataGenerationType() {
return this.dataGenerationType; return this.dataGenerationType;
} }
public void setDataGenerationType(String dataGenerationType) { public void setDataGenerationType(String dataGenerationType) {
this.dataGenerationType = dataGenerationType; this.dataGenerationType = dataGenerationType;
} }
public String getPar1() { public String getPar1() {
return this.par1; return this.par1;
} }
public void setPar1(String par1) { public void setPar1(String par1) {
this.par1 = par1; this.par1 = par1;
} }
public String getPar2() { public String getPar2() {
return this.par2; return this.par2;
} }
public void setPar2(String par2) { public void setPar2(String par2) {
this.par2 = par2; this.par2 = par2;
} }
public String getPar1_label() { public String getPar1_label() {
return this.par1_label; return this.par1_label;
} }
public void setPar1_label(String par1_label) { public void setPar1_label(String par1_label) {
this.par1_label = par1_label; this.par1_label = par1_label;
} }
public String getPar2_label() { public String getPar2_label() {
return this.par2_label; return this.par2_label;
} }
public void setPar2_label(String par2_label) { public void setPar2_label(String par2_label) {
this.par2_label = par2_label; this.par2_label = par2_label;
} }

View File

@ -7,8 +7,7 @@ import java.io.Serial;
public class Graphic_ATTR_Key_Elem public class Graphic_ATTR_Key_Elem
extends Graphic_ATTR_Elem extends Graphic_ATTR_Elem {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -17,11 +16,6 @@ public class Graphic_ATTR_Key_Elem
} }
protected void dsfdsfds6787686(Color c) { protected void dsfdsfds6787686(Color c) {
if (!this.isVisible) if (!this.isVisible)
return; return;
@ -39,13 +33,6 @@ public class Graphic_ATTR_Key_Elem
} }
public String safsafdsa456456456() { public String safsafdsa456456456() {
return "A-K"; return "A-K";
} }

View File

@ -7,8 +7,7 @@ import java.io.Serial;
public class Graphic_ATTR_Multi_Elem public class Graphic_ATTR_Multi_Elem
extends Graphic_ATTR_Elem extends Graphic_ATTR_Elem {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private final boolean derived; private final boolean derived;
@ -19,11 +18,6 @@ public class Graphic_ATTR_Multi_Elem
} }
protected void dsfdsfds6787686(Color c) { protected void dsfdsfds6787686(Color c) {
if (!this.isVisible) if (!this.isVisible)
return; return;
@ -45,10 +39,6 @@ public class Graphic_ATTR_Multi_Elem
} }
public String safsafdsa456456456() { public String safsafdsa456456456() {
return "A-M"; return "A-M";
} }

View File

@ -7,8 +7,7 @@ import java.io.Serial;
public class Graphic_ATTR_One_Elem public class Graphic_ATTR_One_Elem
extends Graphic_ATTR_Elem extends Graphic_ATTR_Elem {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private final boolean derived; private final boolean derived;
@ -19,11 +18,6 @@ public class Graphic_ATTR_One_Elem
} }
protected void dsfdsfds6787686(Color c) { protected void dsfdsfds6787686(Color c) {
if (!this.isVisible) { if (!this.isVisible) {
return; return;
@ -44,9 +38,6 @@ public class Graphic_ATTR_One_Elem
} }
public String safsafdsa456456456() { public String safsafdsa456456456() {
return "A"; return "A";
} }

View File

@ -7,8 +7,7 @@ import java.io.Serial;
public class Graphic_ATTR_Weak_Key_Elem public class Graphic_ATTR_Weak_Key_Elem
extends Graphic_ATTR_Elem extends Graphic_ATTR_Elem {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -17,11 +16,6 @@ public class Graphic_ATTR_Weak_Key_Elem
} }
protected void dsfdsfds6787686(Color c) { protected void dsfdsfds6787686(Color c) {
if (!this.isVisible) if (!this.isVisible)
return; return;
@ -43,10 +37,6 @@ public class Graphic_ATTR_Weak_Key_Elem
} }
public String safsafdsa456456456() { public String safsafdsa456456456() {
return "A-WK"; return "A-WK";
} }

View File

@ -7,8 +7,7 @@ import java.io.Serial;
public class Graphic_ES_Assoc_Elem public class Graphic_ES_Assoc_Elem
extends Graphic_ES_Main_Elem extends Graphic_ES_Main_Elem {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -20,20 +19,6 @@ public class Graphic_ES_Assoc_Elem
} }
protected void dsfdsfds6787686(Color c) { protected void dsfdsfds6787686(Color c) {
if (!this.isVisible) if (!this.isVisible)
return; return;
@ -59,24 +44,16 @@ public class Graphic_ES_Assoc_Elem
} }
public String safsafdsa456456456() { public String safsafdsa456456456() {
return "ES-A"; return "ES-A";
} }
public void dsfsdfsfd() { public void dsfsdfsfd() {
this.gc.clearRect(this.xPos - this.textWidth / 2.0D - 1.0D, this.yPos - this.textHeight / 2.0D - 1.0D, this.textWidth + 2.0D, this.textHeight + 2.0D); this.gc.clearRect(this.xPos - this.textWidth / 2.0D - 1.0D, this.yPos - this.textHeight / 2.0D - 1.0D, this.textWidth + 2.0D, this.textHeight + 2.0D);
} }
public char sdfsdfdsfdf() { public char sdfsdfdsfdf() {
return '@'; return '@';
} }

View File

@ -7,8 +7,7 @@ import java.io.Serial;
public class Graphic_ES_Elem public class Graphic_ES_Elem
extends Graphic_ES_Main_Elem extends Graphic_ES_Main_Elem {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -19,11 +18,6 @@ public class Graphic_ES_Elem
} }
protected void dsfdsfds6787686(Color c) { protected void dsfdsfds6787686(Color c) {
if (!this.isVisible) if (!this.isVisible)
return; return;
@ -40,24 +34,16 @@ public class Graphic_ES_Elem
} }
public String safsafdsa456456456() { public String safsafdsa456456456() {
return "ES"; return "ES";
} }
public void dsfsdfsfd() { public void dsfsdfsfd() {
this.gc.clearRect(this.xPos - this.textWidth / 2.0D - 1.0D, this.yPos - this.textHeight / 2.0D - 1.0D, this.textWidth + 2.0D, this.textHeight + 2.0D); this.gc.clearRect(this.xPos - this.textWidth / 2.0D - 1.0D, this.yPos - this.textHeight / 2.0D - 1.0D, this.textWidth + 2.0D, this.textHeight + 2.0D);
} }
public char sdfsdfdsfdf() { public char sdfsdfdsfdf() {
return 'e'; return 'e';
} }

View File

@ -7,8 +7,9 @@ import java.io.Serial;
public abstract class Graphic_ES_Main_Elem public abstract class Graphic_ES_Main_Elem
extends Graphic_Figure_Elem extends Graphic_Figure_Elem
implements U3 implements U3 {
{ @Serial
private static final long serialVersionUID = 1L;
protected boolean createRelation; protected boolean createRelation;
protected String relationPraefix; protected String relationPraefix;
protected String relationName; protected String relationName;
@ -16,19 +17,6 @@ public abstract class Graphic_ES_Main_Elem
protected long numberRowsToInsert = 1L; protected long numberRowsToInsert = 1L;
@Serial
private static final long serialVersionUID = 1L;
public Graphic_ES_Main_Elem(GraphicsContext gc, String name, long elementID) { public Graphic_ES_Main_Elem(GraphicsContext gc, String name, long elementID) {
super(gc, name, elementID); super(gc, name, elementID);
this.createRelation = true; this.createRelation = true;
@ -39,10 +27,6 @@ public abstract class Graphic_ES_Main_Elem
} }
protected void changeName(String name) { protected void changeName(String name) {
super.changeName(name); super.changeName(name);
@ -53,8 +37,6 @@ public abstract class Graphic_ES_Main_Elem
} }
public boolean getCreateRelation() { public boolean getCreateRelation() {
return this.createRelation; return this.createRelation;
} }
@ -65,7 +47,6 @@ public abstract class Graphic_ES_Main_Elem
} }
public String getRelationPraefix() { public String getRelationPraefix() {
return this.relationPraefix; return this.relationPraefix;
} }
@ -76,7 +57,6 @@ public abstract class Graphic_ES_Main_Elem
} }
public String getRelationName() { public String getRelationName() {
return this.relationName; return this.relationName;
} }
@ -92,13 +72,11 @@ public abstract class Graphic_ES_Main_Elem
} }
public void setCreateInserts(boolean createInserts) { public void setCreateInserts(boolean createInserts) {
this.createInserts = createInserts; this.createInserts = createInserts;
} }
public long getNumberRowsToInsert() { public long getNumberRowsToInsert() {
return this.numberRowsToInsert; return this.numberRowsToInsert;
} }
@ -109,8 +87,6 @@ public abstract class Graphic_ES_Main_Elem
} }
public String sdfsdfsd32234243() { public String sdfsdfsd32234243() {
return super.sdfsdfsd32234243(); return super.sdfsdfsd32234243();
} }

View File

@ -7,8 +7,7 @@ import java.io.Serial;
public class Graphic_ES_Weak_Elem public class Graphic_ES_Weak_Elem
extends Graphic_ES_Main_Elem extends Graphic_ES_Main_Elem {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -20,12 +19,6 @@ public class Graphic_ES_Weak_Elem
} }
protected void dsfdsfds6787686(Color c) { protected void dsfdsfds6787686(Color c) {
if (!this.isVisible) if (!this.isVisible)
return; return;
@ -41,29 +34,21 @@ public class Graphic_ES_Weak_Elem
} }
public String safsafdsa456456456() { public String safsafdsa456456456() {
return "ES-W"; return "ES-W";
} }
public void dsfsdfsfd() { public void dsfsdfsfd() {
this.gc.clearRect(this.xPos - this.textWidth / 2.0D - 1.0D, this.yPos - this.textHeight / 2.0D - 1.0D, this.textWidth + 2.0D, this.textHeight + 2.0D); this.gc.clearRect(this.xPos - this.textWidth / 2.0D - 1.0D, this.yPos - this.textHeight / 2.0D - 1.0D, this.textWidth + 2.0D, this.textHeight + 2.0D);
} }
public char sdfsdfdsfdf() { public char sdfsdfdsfdf() {
return 'e'; return 'e';
} }
protected Color sefdsfdsf45() { protected Color sefdsfdsf45() {
return C2.ERMESColor; return C2.ERMESColor;
} }

View File

@ -8,25 +8,12 @@ import java.io.Serial;
public abstract class Graphic_Figure_Elem public abstract class Graphic_Figure_Elem
extends Graphic_Main_Elem extends Graphic_Main_Elem {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
protected double textWidth; protected double textWidth;
protected double textHeight; protected double textHeight;
public abstract String safsafdsa456456456();
public double dsfsfsd456457657() {
return this.textWidth; } public double getHeight() {
return this.textHeight;
} protected void dockablePointsAtElem() {
drawDockablePoints(getColorDockable());
}
public Graphic_Figure_Elem(GraphicsContext gc, String name, long elementID) { public Graphic_Figure_Elem(GraphicsContext gc, String name, long elementID) {
super(gc, elementID); super(gc, elementID);
this.name = name; this.name = name;
@ -34,12 +21,19 @@ public abstract class Graphic_Figure_Elem
calculateTextWidthHeight(); calculateTextWidthHeight();
} }
public abstract String safsafdsa456456456();
public double dsfsfsd456457657() {
return this.textWidth;
}
public double getHeight() {
return this.textHeight;
}
protected void dockablePointsAtElem() {
drawDockablePoints(getColorDockable());
}
protected void changeName(String name) { protected void changeName(String name) {
this.name = name; this.name = name;
@ -52,18 +46,12 @@ public abstract class Graphic_Figure_Elem
} }
public boolean dsfsfds45645456(double mouseX, double mouseY) { public boolean dsfsfds45645456(double mouseX, double mouseY) {
return mouseX >= this.xPos - dsfsfsd456457657() / 2.0D && mouseX <= this.xPos + dsfsfsd456457657() / 2.0D && return mouseX >= this.xPos - dsfsfsd456457657() / 2.0D && mouseX <= this.xPos + dsfsfsd456457657() / 2.0D &&
mouseY >= this.yPos - getHeight() / 2.0D && mouseY <= this.yPos + getHeight() / 2.0D; mouseY >= this.yPos - getHeight() / 2.0D && mouseY <= this.yPos + getHeight() / 2.0D;
} }
public void calculateTextWidthHeight() { public void calculateTextWidthHeight() {
this.textWidth = C2.computeTextWidth(this.name, 2000.0D); this.textWidth = C2.computeTextWidth(this.name, 2000.0D);
this.textWidth += 20.0D; this.textWidth += 20.0D;
@ -74,20 +62,12 @@ public abstract class Graphic_Figure_Elem
} }
public String toString() { public String toString() {
return "Graphic_Figure_Elem [textWidth=" + this.textWidth + ", textHeight=" + this.textHeight + ", toString()=" + return "Graphic_Figure_Elem [textWidth=" + this.textWidth + ", textHeight=" + this.textHeight + ", toString()=" +
super.toString() + "]"; super.toString() + "]";
} }
protected void drawDockablePoints(Color c) { protected void drawDockablePoints(Color c) {
if (!this.isConnectable) if (!this.isConnectable)
return; return;
@ -118,22 +98,10 @@ public abstract class Graphic_Figure_Elem
} }
public double[] getDockablePoint(double mouseX, double mouseY) { public double[] getDockablePoint(double mouseX, double mouseY) {
double[] selected = null; double[] selected = null;
if (mouseX >= this.xPos - this.textWidth / 2.0D - 5.0D && mouseX <= this.xPos - this.textWidth / 2.0D + 5.0D && mouseY >= this.yPos - 5.0D && mouseY <= this.yPos + 5.0D) { if (mouseX >= this.xPos - this.textWidth / 2.0D - 5.0D && mouseX <= this.xPos - this.textWidth / 2.0D + 5.0D && mouseY >= this.yPos - 5.0D && mouseY <= this.yPos + 5.0D) {
selected = new double[3]; selected = new double[3];
selected[0] = this.xPos - this.textWidth / 2.0D; selected[0] = this.xPos - this.textWidth / 2.0D;
@ -165,10 +133,6 @@ public abstract class Graphic_Figure_Elem
} }
public double[] getXYForGivenPoint(byte dockedAt) { public double[] getXYForGivenPoint(byte dockedAt) {
double[] xyAtPoint = new double[2]; double[] xyAtPoint = new double[2];
switch (dockedAt) { switch (dockedAt) {
@ -198,7 +162,6 @@ public abstract class Graphic_Figure_Elem
} }
protected Color sefdsfdsf45() { protected Color sefdsfdsf45() {
return C2.ERMESColor; return C2.ERMESColor;
} }

View File

@ -7,8 +7,7 @@ import java.io.Serial;
public class Graphic_LINE_Attr_Attr_Elem public class Graphic_LINE_Attr_Attr_Elem
extends Graphic_LINE_Elem extends Graphic_LINE_Elem {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -17,8 +16,6 @@ public class Graphic_LINE_Attr_Attr_Elem
} }
protected Color sefdsfdsf45() { protected Color sefdsfdsf45() {
return C2.ERMLINEColor; return C2.ERMLINEColor;
} }

View File

@ -7,8 +7,7 @@ import java.io.Serial;
public class Graphic_LINE_Attr_ES_Elem public class Graphic_LINE_Attr_ES_Elem
extends Graphic_LINE_Elem extends Graphic_LINE_Elem {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -17,8 +16,6 @@ public class Graphic_LINE_Attr_ES_Elem
} }
protected Color sefdsfdsf45() { protected Color sefdsfdsf45() {
return C2.ERMLINEColor; return C2.ERMLINEColor;
} }

View File

@ -7,8 +7,7 @@ import java.io.Serial;
public class Graphic_LINE_Attr_RS_Elem public class Graphic_LINE_Attr_RS_Elem
extends Graphic_LINE_Elem extends Graphic_LINE_Elem {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -17,8 +16,6 @@ public class Graphic_LINE_Attr_RS_Elem
} }
protected Color sefdsfdsf45() { protected Color sefdsfdsf45() {
return C2.ERMLINEColor; return C2.ERMLINEColor;
} }

View File

@ -9,39 +9,19 @@ import javafx.scene.transform.Translate;
import java.io.Serial; import java.io.Serial;
public abstract class Graphic_LINE_Elem public abstract class Graphic_LINE_Elem
extends Graphic_Main_Elem extends Graphic_Main_Elem {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private final byte lineConnectedWithPointAtStart;
private double xEnd; private final byte lineConnectedWithPointAtEnd;
private double yEnd;
protected String minimum = "0"; protected String minimum = "0";
protected String maximum = "n"; protected String maximum = "n";
private double xEnd;
private double yEnd;
private Graphic_Figure_Elem connectedWithStart; private Graphic_Figure_Elem connectedWithStart;
private final byte lineConnectedWithPointAtStart;
private Graphic_Figure_Elem connectedWithEnd; private Graphic_Figure_Elem connectedWithEnd;
private final byte lineConnectedWithPointAtEnd;
public Graphic_LINE_Elem(GraphicsContext gc, double x, double y, double xEnd, double yEnd, byte lineConnectedWithPointAtStart, byte lineConnectedWithPointAtEnd, Graphic_Figure_Elem elemStart, Graphic_Figure_Elem elemEnd, long elementID) { public Graphic_LINE_Elem(GraphicsContext gc, double x, double y, double xEnd, double yEnd, byte lineConnectedWithPointAtStart, byte lineConnectedWithPointAtEnd, Graphic_Figure_Elem elemStart, Graphic_Figure_Elem elemEnd, long elementID) {
super(gc, elementID); super(gc, elementID);
@ -62,11 +42,6 @@ private static final long serialVersionUID = 1L;
} }
protected void changeMinMax(String minimum, String maximum) { protected void changeMinMax(String minimum, String maximum) {
this.minimum = minimum; this.minimum = minimum;
this.maximum = maximum; this.maximum = maximum;
@ -77,13 +52,6 @@ private static final long serialVersionUID = 1L;
} }
private void drawArrow(Color c, double x1, double y1, double x2, double y2) { private void drawArrow(Color c, double x1, double y1, double x2, double y2) {
this.gc.setStroke(c); this.gc.setStroke(c);
@ -102,9 +70,6 @@ private static final long serialVersionUID = 1L;
this.gc.setFill(C2.ERMBackgroundColor); this.gc.setFill(C2.ERMBackgroundColor);
this.gc.strokePolygon(new double[]{len, len - 8.0D, len - 8.0D this.gc.strokePolygon(new double[]{len, len - 8.0D, len - 8.0D
}, new double[]{0.0D, -8.0D, 8.0D }, new double[]{0.0D, -8.0D, 8.0D
}, 3); }, 3);
@ -114,12 +79,6 @@ private static final long serialVersionUID = 1L;
} }
protected void dsfdsfds6787686(Color c) { protected void dsfdsfds6787686(Color c) {
if (!this.isVisible) if (!this.isVisible)
return; return;
@ -140,9 +99,12 @@ private static final long serialVersionUID = 1L;
return; return;
} }
if (this instanceof Graphic_LINE_RSISAS_ES_Elem) if (this instanceof Graphic_LINE_RSISAS_ES_Elem)
return; if (this instanceof Graphic_LINE_Attr_Attr_Elem) return;
return; if (this instanceof Graphic_LINE_Attr_ES_Elem) if (this instanceof Graphic_LINE_Attr_Attr_Elem)
return; if (this instanceof Graphic_LINE_Attr_RS_Elem) { return;
if (this instanceof Graphic_LINE_Attr_ES_Elem)
return;
if (this instanceof Graphic_LINE_Attr_RS_Elem) {
return; return;
} }
double helpXStart = this.xPos; double helpXStart = this.xPos;
@ -150,16 +112,19 @@ private static final long serialVersionUID = 1L;
double helpYStart = this.yPos; double helpYStart = this.yPos;
double helpYEnd = this.yEnd; double helpYEnd = this.yEnd;
this.gc.setFill(C2.ERMTextColor); this.gc.setFill(C2.ERMTextColor);
if (this.xEnd < this.xPos) { helpXStart = this.xEnd; helpXEnd = this.xPos; } if (this.xEnd < this.xPos) {
if (this.yEnd < this.yPos) { helpYStart = this.yEnd; helpYEnd = this.yPos; } helpXStart = this.xEnd;
helpXEnd = this.xPos;
}
if (this.yEnd < this.yPos) {
helpYStart = this.yEnd;
helpYEnd = this.yPos;
}
this.gc.fillText("(" + this.minimum + "," + this.maximum + ")", helpXStart + (helpXEnd - helpXStart) / 2.0D, helpYStart + (helpYEnd - helpYStart) / 2.0D - 5.0D); this.gc.fillText("(" + this.minimum + "," + this.maximum + ")", helpXStart + (helpXEnd - helpXStart) / 2.0D, helpYStart + (helpYEnd - helpYStart) / 2.0D - 5.0D);
this.gc.closePath(); this.gc.closePath();
} }
public void dsfsdfsfd() { public void dsfsdfsfd() {
this.gc.beginPath(); this.gc.beginPath();
this.gc.setStroke(C2.ERMBackgroundColor); this.gc.setStroke(C2.ERMBackgroundColor);
@ -210,9 +175,12 @@ private static final long serialVersionUID = 1L;
return; return;
} }
if (this instanceof Graphic_LINE_RSISAS_ES_Elem) if (this instanceof Graphic_LINE_RSISAS_ES_Elem)
return; if (this instanceof Graphic_LINE_Attr_Attr_Elem) return;
return; if (this instanceof Graphic_LINE_Attr_ES_Elem) if (this instanceof Graphic_LINE_Attr_Attr_Elem)
return; if (this instanceof Graphic_LINE_Attr_RS_Elem) { return;
if (this instanceof Graphic_LINE_Attr_ES_Elem)
return;
if (this instanceof Graphic_LINE_Attr_RS_Elem) {
return; return;
} }
@ -220,8 +188,14 @@ private static final long serialVersionUID = 1L;
double helpXEnd = this.xEnd; double helpXEnd = this.xEnd;
double helpYStart = this.yPos; double helpYStart = this.yPos;
double helpYEnd = this.yEnd; double helpYEnd = this.yEnd;
if (this.xEnd < this.xPos) { helpXStart = this.xEnd; helpXEnd = this.xPos; } if (this.xEnd < this.xPos) {
if (this.yEnd < this.yPos) { helpYStart = this.yEnd; helpYEnd = this.yPos; } helpXStart = this.xEnd;
helpXEnd = this.xPos;
}
if (this.yEnd < this.yPos) {
helpYStart = this.yEnd;
helpYEnd = this.yPos;
}
this.gc.clearRect(helpXStart + (helpXEnd - helpXStart) / 2.0D - 6.0D, this.gc.clearRect(helpXStart + (helpXEnd - helpXStart) / 2.0D - 6.0D,
helpYStart + (helpYEnd - helpYStart) / 2.0D - 5.0D - 10.0D, helpYStart + (helpYEnd - helpYStart) / 2.0D - 5.0D - 10.0D,
C2.computeTextWidth("(" + this.minimum + "," + this.maximum + ")", 2000.0D) + 12.0D, C2.computeTextWidth("(" + this.minimum + "," + this.maximum + ")", 2000.0D) + 12.0D,
@ -230,30 +204,16 @@ private static final long serialVersionUID = 1L;
} }
public double dsfsfsd456457657() { public double dsfsfsd456457657() {
return this.xEnd; return this.xEnd;
} }
public double getHeight() { public double getHeight() {
return this.yEnd; return this.yEnd;
} }
public boolean dsfsfds45645456(double mouseX, double mouseY) { public boolean dsfsfds45645456(double mouseX, double mouseY) {
Graphic_Figure_Elem aHelp = getConnectedWithStart(); Graphic_Figure_Elem aHelp = getConnectedWithStart();
double[] dockablePointsAHelp = aHelp.getXYForGivenPoint(getLineConnectedWithPointAtStart()); double[] dockablePointsAHelp = aHelp.getXYForGivenPoint(getLineConnectedWithPointAtStart());
@ -270,73 +230,51 @@ private static final long serialVersionUID = 1L;
} }
public Graphic_Figure_Elem getConnectedWithStart() { public Graphic_Figure_Elem getConnectedWithStart() {
return this.connectedWithStart; return this.connectedWithStart;
} }
public void setConnectedWithStart(Graphic_Figure_Elem connectedWithStart) { public void setConnectedWithStart(Graphic_Figure_Elem connectedWithStart) {
this.connectedWithStart = connectedWithStart; this.connectedWithStart = connectedWithStart;
} }
public Graphic_Figure_Elem getConnectedWithEnd() { public Graphic_Figure_Elem getConnectedWithEnd() {
return this.connectedWithEnd; return this.connectedWithEnd;
} }
public void setConnectedWithEnd(Graphic_Figure_Elem connectedWithEnd) { public void setConnectedWithEnd(Graphic_Figure_Elem connectedWithEnd) {
this.connectedWithEnd = connectedWithEnd; this.connectedWithEnd = connectedWithEnd;
} }
public double getxEnd() { public double getxEnd() {
return this.xEnd; return this.xEnd;
} }
public void setxEnd(double xEnd) { public void setxEnd(double xEnd) {
this.xEnd = xEnd; this.xEnd = xEnd;
} }
public double getyEnd() { public double getyEnd() {
return this.yEnd; return this.yEnd;
} }
public void setyEnd(double yEnd) { public void setyEnd(double yEnd) {
this.yEnd = yEnd; this.yEnd = yEnd;
} }
public char sdfsdfdsfdf() { public char sdfsdfdsfdf() {
return 'l'; return 'l';
} }
public double distP1_P2(double xP1, double yP1, double xP2, double yP2) { public double distP1_P2(double xP1, double yP1, double xP2, double yP2) {
double dist; double dist;
dist = Math.sqrt((xP1 - xP2) * (xP1 - xP2) + (yP1 - yP2) * (yP1 - yP2)); dist = Math.sqrt((xP1 - xP2) * (xP1 - xP2) + (yP1 - yP2) * (yP1 - yP2));
@ -344,29 +282,21 @@ private static final long serialVersionUID = 1L;
} }
public String getMinimum() { public String getMinimum() {
return this.minimum; return this.minimum;
} }
public void setMinimum(String minimum) { public void setMinimum(String minimum) {
this.minimum = minimum; this.minimum = minimum;
} }
public String getMaximum() { public String getMaximum() {
return this.maximum; return this.maximum;
} }
public void setMaximum(String maximum) { public void setMaximum(String maximum) {
this.maximum = maximum; this.maximum = maximum;
} }
@ -380,9 +310,6 @@ private static final long serialVersionUID = 1L;
} }
public String toString() { public String toString() {
return "Graphic_LINE_Elem [xEnd=" + this.xEnd + ", yEnd=" + this.yEnd + ", minimum=" + this.minimum + ", maximum=" + this.maximum + return "Graphic_LINE_Elem [xEnd=" + this.xEnd + ", yEnd=" + this.yEnd + ", minimum=" + this.minimum + ", maximum=" + this.maximum +
", connectedWithStart=" + this.connectedWithStart + ", connectedWithEnd=" + this.connectedWithEnd + ", connectedWithStart=" + this.connectedWithStart + ", connectedWithEnd=" + this.connectedWithEnd +
@ -390,8 +317,6 @@ private static final long serialVersionUID = 1L;
} }
public byte getLineConnectedWithPointAtStart() { public byte getLineConnectedWithPointAtStart() {
return this.lineConnectedWithPointAtStart; return this.lineConnectedWithPointAtStart;
} }

View File

@ -7,8 +7,7 @@ import java.io.Serial;
public class Graphic_LINE_RSID_ESWEAK_Elem public class Graphic_LINE_RSID_ESWEAK_Elem
extends Graphic_LINE_Elem extends Graphic_LINE_Elem {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -17,8 +16,6 @@ public class Graphic_LINE_RSID_ESWEAK_Elem
} }
protected Color sefdsfdsf45() { protected Color sefdsfdsf45() {
return C2.ERMRSConnColor; return C2.ERMRSConnColor;
} }

View File

@ -6,35 +6,8 @@ import javafx.scene.paint.Color;
import java.io.Serial; import java.io.Serial;
public class Graphic_LINE_RSID_ES_Elem public class Graphic_LINE_RSID_ES_Elem
extends Graphic_LINE_Elem extends Graphic_LINE_Elem {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -43,8 +16,6 @@ private static final long serialVersionUID = 1L;
} }
protected Color sefdsfdsf45() { protected Color sefdsfdsf45() {
return C2.ERMRSConnColor; return C2.ERMRSConnColor;
} }

View File

@ -7,8 +7,7 @@ import java.io.Serial;
public class Graphic_LINE_RSISAG_ES_Elem public class Graphic_LINE_RSISAG_ES_Elem
extends Graphic_LINE_Elem extends Graphic_LINE_Elem {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -17,8 +16,6 @@ public class Graphic_LINE_RSISAG_ES_Elem
} }
protected Color sefdsfdsf45() { protected Color sefdsfdsf45() {
return C2.ERMISAConnGENERAL; return C2.ERMISAConnGENERAL;
} }

View File

@ -7,8 +7,7 @@ import java.io.Serial;
public class Graphic_LINE_RSISAS_ES_Elem public class Graphic_LINE_RSISAS_ES_Elem
extends Graphic_LINE_Elem extends Graphic_LINE_Elem {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -17,8 +16,6 @@ public class Graphic_LINE_RSISAS_ES_Elem
} }
protected Color sefdsfdsf45() { protected Color sefdsfdsf45() {
return C2.ERMISAConnSPEC; return C2.ERMISAConnSPEC;
} }

View File

@ -7,8 +7,7 @@ import java.io.Serial;
public class Graphic_LINE_RS_ES_Elem public class Graphic_LINE_RS_ES_Elem
extends Graphic_LINE_Elem extends Graphic_LINE_Elem {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -17,8 +16,6 @@ public class Graphic_LINE_RS_ES_Elem
} }
protected Color sefdsfdsf45() { protected Color sefdsfdsf45() {
return C2.ERMRSConnColor; return C2.ERMRSConnColor;
} }

View File

@ -1,13 +1,13 @@
package at.fos.ermodel.gui; package at.fos.ermodel.gui;
import java.io.Serial;
import java.io.Serializable;
import javafx.scene.canvas.GraphicsContext; import javafx.scene.canvas.GraphicsContext;
import javafx.scene.paint.Color; import javafx.scene.paint.Color;
import java.io.Serial;
import java.io.Serializable;
public abstract class Graphic_Main_Elem public abstract class Graphic_Main_Elem
implements Serializable, Comparable<Graphic_Main_Elem> implements Serializable, Comparable<Graphic_Main_Elem> {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
protected long graphicMainElemID; protected long graphicMainElemID;
@ -26,84 +26,53 @@ public abstract class Graphic_Main_Elem
} }
public GraphicsContext getGc() { public GraphicsContext getGc() {
return this.gc; return this.gc;
} }
public void setGc(GraphicsContext gc) { public void setGc(GraphicsContext gc) {
this.gc = gc; this.gc = gc;
} }
public void setxPos(double xPos) {
this.xPos = xPos;
}
public void setyPos(double yPos) {
this.yPos = yPos;
}
public void safdsadasds32432456456() { public void safdsadasds32432456456() {
dsfdsfds6787686(sefdsfdsf45()); } dsfdsfds6787686(sefdsfdsf45());
}
protected Color getColorSelected() { protected Color getColorSelected() {
return C2.ERMSelectedColor; return C2.ERMSelectedColor;
} }
protected Color getColorDockable() { protected Color getColorDockable() {
return C2.ERMDockablePointColor; return C2.ERMDockablePointColor;
} }
public void dfsdfssdf456456() { public void dfsdfssdf456456() {
dsfsdfsfd(); dsfdsfds6787686(sefdsfdsf45()); dsfsdfsfd();
dsfdsfds6787686(sefdsfdsf45());
} }
public double getxPos() { public double getxPos() {
return this.xPos; return this.xPos;
} }
public void setxPos(double xPos) {
this.xPos = xPos;
}
public double getyPos() { public double getyPos() {
return this.yPos; return this.yPos;
} }
public void setyPos(double yPos) {
this.yPos = yPos;
}
public void dgfdsfdssfd43534456() { public void dgfdsfdssfd43534456() {
selectElem(); selectElem();
} }
public void sdffdsfsdf4354357656(double newX, double newY) { public void sdffdsfsdf4354357656(double newX, double newY) {
dsfsdfsfd(); dsfsdfsfd();
this.xPos = newX; this.xPos = newX;
@ -112,17 +81,11 @@ public abstract class Graphic_Main_Elem
} }
public void selectElem() { public void selectElem() {
dsfdsfds6787686(getColorSelected()); dsfdsfds6787686(getColorSelected());
} }
public int hashCode() { public int hashCode() {
int result = 1; int result = 1;
result = 31 * result + (int) (this.graphicMainElemID ^ this.graphicMainElemID >>> 32L); result = 31 * result + (int) (this.graphicMainElemID ^ this.graphicMainElemID >>> 32L);
@ -130,8 +93,6 @@ public abstract class Graphic_Main_Elem
} }
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (this == obj) if (this == obj)
return true; return true;
@ -144,54 +105,37 @@ public abstract class Graphic_Main_Elem
} }
public String toString() { public String toString() {
return "Graphic_Main_Elem [graphicMainElemID=" + this.graphicMainElemID + ", xPos=" + this.xPos + ", yPos=" + this.yPos + return "Graphic_Main_Elem [graphicMainElemID=" + this.graphicMainElemID + ", xPos=" + this.xPos + ", yPos=" + this.yPos +
", name=" + this.name + "]"; ", name=" + this.name + "]";
} }
public long sdfsdfsdfd() { public long sdfsdfsdfd() {
return this.graphicMainElemID; return this.graphicMainElemID;
} }
public void dsdasadsasd32423432(long graphicMainElemID) { public void dsdasadsasd32423432(long graphicMainElemID) {
this.graphicMainElemID = graphicMainElemID; this.graphicMainElemID = graphicMainElemID;
} }
public String sdfsdfsd32234243() { public String sdfsdfsd32234243() {
return this.name; return this.name;
} }
public U4 adsadadsa4354353() { public U4 adsadadsa4354353() {
return this.undoRedoAction; return this.undoRedoAction;
} }
public void sfdsfsfsddf123234435(U4 undoRedoAction) { public void sfdsfsfsddf123234435(U4 undoRedoAction) {
this.undoRedoAction = undoRedoAction; this.undoRedoAction = undoRedoAction;
} }
public int compareTo(Graphic_Main_Elem arg0) { public int compareTo(Graphic_Main_Elem arg0) {
return Long.compare(this.graphicMainElemID, arg0.graphicMainElemID); return Long.compare(this.graphicMainElemID, arg0.graphicMainElemID);
} }

View File

@ -6,8 +6,7 @@ import javafx.scene.paint.Color;
import java.io.Serial; import java.io.Serial;
public class Graphic_RS_Elem public class Graphic_RS_Elem
extends Graphic_RS_Main_Elem extends Graphic_RS_Main_Elem {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -20,12 +19,6 @@ private static final long serialVersionUID = 1L;
} }
protected void dsfdsfds6787686(Color c) { protected void dsfdsfds6787686(Color c) {
if (!this.isVisible) if (!this.isVisible)
return; return;
@ -46,39 +39,31 @@ private static final long serialVersionUID = 1L;
} }
public String safsafdsa456456456() { public String safsafdsa456456456() {
return "RS"; return "RS";
} }
public void dsfsdfsfd() { public void dsfsdfsfd() {
this.gc.clearRect(this.xPos - this.textWidth / 2.0D - 2.0D, this.yPos - this.textHeight / 2.0D - 2.0D, this.textWidth + 4.0D, this.textHeight + 4.0D); this.gc.clearRect(this.xPos - this.textWidth / 2.0D - 2.0D, this.yPos - this.textHeight / 2.0D - 2.0D, this.textWidth + 4.0D, this.textHeight + 4.0D);
} }
public double dsfsfsd456457657() { public double dsfsfsd456457657() {
return this.textWidth; return this.textWidth;
} }
public double getHeight() { public double getHeight() {
return this.textHeight; return this.textHeight;
} }
public char sdfsdfdsfdf() { public char sdfsdfdsfdf() {
return 'r'; return 'r';
} }
protected Color sefdsfdsf45() { protected Color sefdsfdsf45() {
return C2.ERMRSColor; return C2.ERMRSColor;
} }

View File

@ -7,8 +7,7 @@ import java.io.Serial;
public class Graphic_RS_ISA_Elem public class Graphic_RS_ISA_Elem
extends Graphic_RS_Main_Elem extends Graphic_RS_Main_Elem {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private String partial_or_total; private String partial_or_total;
@ -25,11 +24,6 @@ public class Graphic_RS_ISA_Elem
} }
protected void dsfdsfds6787686(Color c) { protected void dsfdsfds6787686(Color c) {
if (!this.isVisible) if (!this.isVisible)
return; return;
@ -54,15 +48,11 @@ public class Graphic_RS_ISA_Elem
} }
public String safsafdsa456456456() { public String safsafdsa456456456() {
return "ISA"; return "ISA";
} }
public void dsfsdfsfd() { public void dsfsdfsfd() {
this.gc.clearRect(this.xPos - this.textWidth / 2.0D - 1.0D, this.yPos - this.textHeight / 2.0D - 1.0D, this.textWidth + 2.0D, this.textHeight + 2.0D); this.gc.clearRect(this.xPos - this.textWidth / 2.0D - 1.0D, this.yPos - this.textHeight / 2.0D - 1.0D, this.textWidth + 2.0D, this.textHeight + 2.0D);
@ -73,63 +63,46 @@ public class Graphic_RS_ISA_Elem
} }
public double dsfsfsd456457657() { public double dsfsfsd456457657() {
return this.textWidth; return this.textWidth;
} }
public double getHeight() { public double getHeight() {
return this.textHeight; return this.textHeight;
} }
public char sdfsdfdsfdf() { public char sdfsdfdsfdf() {
return 'r'; return 'r';
} }
protected Color sefdsfdsf45() { protected Color sefdsfdsf45() {
return C2.ERMRSISAColor; return C2.ERMRSISAColor;
} }
public String getPartial_or_total() { public String getPartial_or_total() {
return this.partial_or_total; return this.partial_or_total;
} }
public void setPartial_or_total(String partial_or_total) { public void setPartial_or_total(String partial_or_total) {
this.partial_or_total = partial_or_total; this.partial_or_total = partial_or_total;
} }
public String getDisjunct_or_notdisjunct() { public String getDisjunct_or_notdisjunct() {
return this.disjunct_or_notdisjunct; return this.disjunct_or_notdisjunct;
} }
public void setDisjunct_or_notdisjunct(String disjunct_or_notdisjunct) { public void setDisjunct_or_notdisjunct(String disjunct_or_notdisjunct) {
this.disjunct_or_notdisjunct = disjunct_or_notdisjunct; this.disjunct_or_notdisjunct = disjunct_or_notdisjunct;
} }
protected void changeP_T_D_ND(String partial_or_total, String disjunct_or_notdisjunct) { protected void changeP_T_D_ND(String partial_or_total, String disjunct_or_notdisjunct) {
this.partial_or_total = partial_or_total; this.partial_or_total = partial_or_total;
this.disjunct_or_notdisjunct = disjunct_or_notdisjunct; this.disjunct_or_notdisjunct = disjunct_or_notdisjunct;
@ -148,8 +121,6 @@ public class Graphic_RS_ISA_Elem
} }
public String sdfsdfsd32234243() { public String sdfsdfsd32234243() {
return safsafdsa456456456() + "(" + this.partial_or_total + "," + this.disjunct_or_notdisjunct + ")"; return safsafdsa456456456() + "(" + this.partial_or_total + "," + this.disjunct_or_notdisjunct + ")";
} }

View File

@ -7,8 +7,7 @@ import java.io.Serial;
public class Graphic_RS_Identifying_Elem public class Graphic_RS_Identifying_Elem
extends Graphic_RS_Main_Elem extends Graphic_RS_Main_Elem {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -23,12 +22,6 @@ public class Graphic_RS_Identifying_Elem
} }
protected void dsfdsfds6787686(Color c) { protected void dsfdsfds6787686(Color c) {
if (!this.isVisible) if (!this.isVisible)
return; return;
@ -58,41 +51,31 @@ public class Graphic_RS_Identifying_Elem
} }
public String safsafdsa456456456() { public String safsafdsa456456456() {
return "RS-ID"; return "RS-ID";
} }
public void dsfsdfsfd() { public void dsfsdfsfd() {
this.gc.clearRect(this.xPos - this.textWidth / 2.0D - 1.0D, this.yPos - this.textHeight / 2.0D - 1.0D, this.textWidth + 2.0D, this.textHeight + 2.0D); this.gc.clearRect(this.xPos - this.textWidth / 2.0D - 1.0D, this.yPos - this.textHeight / 2.0D - 1.0D, this.textWidth + 2.0D, this.textHeight + 2.0D);
} }
public double dsfsfsd456457657() { public double dsfsfsd456457657() {
return this.textWidth; return this.textWidth;
} }
public double getHeight() { public double getHeight() {
return this.textHeight; return this.textHeight;
} }
public char sdfsdfdsfdf() { public char sdfsdfdsfdf() {
return 'r'; return 'r';
} }
protected Color sefdsfdsf45() { protected Color sefdsfdsf45() {
return C2.ERMRSColor; return C2.ERMRSColor;
} }

View File

@ -7,8 +7,7 @@ import java.io.Serial;
public abstract class Graphic_RS_Main_Elem public abstract class Graphic_RS_Main_Elem
extends Graphic_Figure_Elem extends Graphic_Figure_Elem
implements U3 implements U3 {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
protected boolean createRelation; protected boolean createRelation;
@ -18,13 +17,6 @@ public abstract class Graphic_RS_Main_Elem
protected long numberRowsToInsert = 1L; protected long numberRowsToInsert = 1L;
public Graphic_RS_Main_Elem(GraphicsContext gc, String name, long elementID) { public Graphic_RS_Main_Elem(GraphicsContext gc, String name, long elementID) {
super(gc, name, elementID); super(gc, name, elementID);
this.relationName = this.name.toLowerCase(); this.relationName = this.name.toLowerCase();
@ -34,10 +26,6 @@ public abstract class Graphic_RS_Main_Elem
} }
protected void changeName(String name) { protected void changeName(String name) {
super.changeName(name); super.changeName(name);
@ -46,7 +34,6 @@ public abstract class Graphic_RS_Main_Elem
} }
public boolean getCreateRelation() { public boolean getCreateRelation() {
return this.createRelation; return this.createRelation;
} }
@ -57,7 +44,6 @@ public abstract class Graphic_RS_Main_Elem
} }
public String getRelationPraefix() { public String getRelationPraefix() {
return this.relationPraefix; return this.relationPraefix;
} }
@ -68,7 +54,6 @@ public abstract class Graphic_RS_Main_Elem
} }
public String getRelationName() { public String getRelationName() {
return this.relationName; return this.relationName;
} }
@ -79,32 +64,26 @@ public abstract class Graphic_RS_Main_Elem
} }
public boolean getCreateInserts() { public boolean getCreateInserts() {
return this.createInserts; return this.createInserts;
} }
public void setCreateInserts(boolean createInserts) { public void setCreateInserts(boolean createInserts) {
this.createInserts = createInserts; this.createInserts = createInserts;
} }
public long getNumberRowsToInsert() { public long getNumberRowsToInsert() {
return this.numberRowsToInsert; return this.numberRowsToInsert;
} }
public void setNumberRowsToInsert(long numberRowsToInsert) { public void setNumberRowsToInsert(long numberRowsToInsert) {
this.numberRowsToInsert = numberRowsToInsert; this.numberRowsToInsert = numberRowsToInsert;
} }
public String sdfsdfsd32234243() { public String sdfsdfsd32234243() {
return super.sdfsdfsd32234243(); return super.sdfsdfsd32234243();
} }

View File

@ -8,8 +8,7 @@ import java.io.Serial;
public class Graphic_Text_Elem public class Graphic_Text_Elem
extends Graphic_Main_Elem extends Graphic_Main_Elem {
{
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
protected double textWidth; protected double textWidth;
@ -17,13 +16,6 @@ public class Graphic_Text_Elem
protected boolean hasBorder; protected boolean hasBorder;
private int numberLines; private int numberLines;
public double dsfsfsd456457657() {
return this.textWidth; } public double getHeight() {
return this.textHeight;
}
public Graphic_Text_Elem(GraphicsContext gc, double x, double y, String name, boolean hasBorder, long elementID) { public Graphic_Text_Elem(GraphicsContext gc, double x, double y, String name, boolean hasBorder, long elementID) {
super(gc, elementID); super(gc, elementID);
this.name = name; this.name = name;
@ -36,11 +28,13 @@ public class Graphic_Text_Elem
calculateTextWidthHeight(); calculateTextWidthHeight();
} }
public double dsfsfsd456457657() {
return this.textWidth;
}
public double getHeight() {
return this.textHeight;
}
protected void changeName(String name) { protected void changeName(String name) {
this.name = name; this.name = name;
@ -54,18 +48,12 @@ public class Graphic_Text_Elem
} }
public boolean dsfsfds45645456(double mouseX, double mouseY) { public boolean dsfsfds45645456(double mouseX, double mouseY) {
return mouseX >= this.xPos - dsfsfsd456457657() / 2.0D && mouseX <= this.xPos + dsfsfsd456457657() / 2.0D && return mouseX >= this.xPos - dsfsfsd456457657() / 2.0D && mouseX <= this.xPos + dsfsfsd456457657() / 2.0D &&
mouseY >= this.yPos - getHeight() / 2.0D && mouseY <= this.yPos + getHeight() / 2.0D; mouseY >= this.yPos - getHeight() / 2.0D && mouseY <= this.yPos + getHeight() / 2.0D;
} }
public void calculateTextWidthHeight() { public void calculateTextWidthHeight() {
this.textWidth = C2.computeTextWidth(this.name, 2000.0D); this.textWidth = C2.computeTextWidth(this.name, 2000.0D);
this.textWidth += 20.0D; this.textWidth += 20.0D;
@ -76,10 +64,6 @@ public class Graphic_Text_Elem
} }
public String toString() { public String toString() {
return "Graphic_Figure_Elem [textWidth=" + this.textWidth + ", textHeight=" + this.textHeight + ", toString()=" + return "Graphic_Figure_Elem [textWidth=" + this.textWidth + ", textHeight=" + this.textHeight + ", toString()=" +
super.toString() + "]"; super.toString() + "]";
@ -91,14 +75,11 @@ public class Graphic_Text_Elem
} }
public void dsfsdfsfd() { public void dsfsdfsfd() {
this.gc.clearRect(this.xPos - this.textWidth / 2.0D - 1.0D, this.yPos - this.textHeight / 2.0D - 1.0D, this.textWidth + 2.0D, this.textHeight + 2.0D); this.gc.clearRect(this.xPos - this.textWidth / 2.0D - 1.0D, this.yPos - this.textHeight / 2.0D - 1.0D, this.textWidth + 2.0D, this.textHeight + 2.0D);
} }
protected void dsfdsfds6787686(Color c) { protected void dsfdsfds6787686(Color c) {
if (!this.isVisible) { if (!this.isVisible) {
return; return;
@ -113,22 +94,21 @@ public class Graphic_Text_Elem
this.gc.setFill(C2.ERMTextColor); this.gc.setFill(C2.ERMTextColor);
if (this.numberLines == 1) { this.gc.fillText(this.name, this.xPos - this.textWidth / 2.0D + 10.0D, this.yPos + this.textHeight / 2.0D - 15.0D); } if (this.numberLines == 1) {
else { this.gc.fillText(this.name, this.xPos - this.textWidth / 2.0D + 10.0D, this.yPos - this.textHeight / 2.0D + this.textHeight / this.numberLines); } this.gc.fillText(this.name, this.xPos - this.textWidth / 2.0D + 10.0D, this.yPos + this.textHeight / 2.0D - 15.0D);
} else {
this.gc.fillText(this.name, this.xPos - this.textWidth / 2.0D + 10.0D, this.yPos - this.textHeight / 2.0D + this.textHeight / this.numberLines);
}
this.gc.closePath(); this.gc.closePath();
} }
public char sdfsdfdsfdf() { public char sdfsdfdsfdf() {
return 't'; return 't';
} }
public String getDefaultName() { public String getDefaultName() {
return "Text"; return "Text";
} }

View File

@ -5,32 +5,15 @@ import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
public class T1 public class T1
implements Comparable<T1> implements Comparable<T1> {
{
private String tablename;
private final String tablenamePraefix; private final String tablenamePraefix;
private final long referstoGraphicalElement; private final long referstoGraphicalElement;
private final ArrayList<C3> skjdfhgdskjf674534; private final ArrayList<C3> skjdfhgdskjf674534;
private final ArrayList<T1> dependsOnTable; private final ArrayList<T1> dependsOnTable;
private final HashMap<T1, ArrayList<C3>> columnsOfDependentOnTable; private final HashMap<T1, ArrayList<C3>> columnsOfDependentOnTable;
private final boolean createInserts; private final boolean createInserts;
private String tablename;
private long jdshfalkajsd677676; private long jdshfalkajsd677676;
public T1(String tablename, String tablenamePraefix, long referstoGraphicalElement, boolean createInserts, long numberValues) { public T1(String tablename, String tablenamePraefix, long referstoGraphicalElement, boolean createInserts, long numberValues) {
@ -45,10 +28,6 @@ public class T1
} }
public void addColumn(C3 column) { public void addColumn(C3 column) {
this.skjdfhgdskjf674534.add(column); this.skjdfhgdskjf674534.add(column);
@ -56,10 +35,6 @@ public class T1
} }
public void addTableDepdendentOn(T1 table) { public void addTableDepdendentOn(T1 table) {
this.dependsOnTable.add(table); this.dependsOnTable.add(table);
} }
@ -70,21 +45,16 @@ public class T1
} }
public void setTablename(String tablename) { public void setTablename(String tablename) {
this.tablename = tablename; this.tablename = tablename;
} }
public ArrayList<C3> getSkjdfhgdskjf674534() { public ArrayList<C3> getSkjdfhgdskjf674534() {
return this.skjdfhgdskjf674534; return this.skjdfhgdskjf674534;
} }
public int hashCode() { public int hashCode() {
int result = 1; int result = 1;
result = 31 * result + ((this.tablename == null) ? 0 : this.tablename.hashCode()); result = 31 * result + ((this.tablename == null) ? 0 : this.tablename.hashCode());
@ -92,9 +62,6 @@ public class T1
} }
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (this == obj) if (this == obj)
return true; return true;
@ -109,18 +76,12 @@ public class T1
} }
public String toString() { public String toString() {
return "RM_Table [tablename=" + this.tablename + ", tablenamePraefix=" + this.tablenamePraefix + return "RM_Table [tablename=" + this.tablename + ", tablenamePraefix=" + this.tablenamePraefix +
", referstoGraphicalElement=" + this.referstoGraphicalElement + ", columns=" + this.skjdfhgdskjf674534 + "]"; ", referstoGraphicalElement=" + this.referstoGraphicalElement + ", columns=" + this.skjdfhgdskjf674534 + "]";
} }
public String getTablenamePraefix() { public String getTablenamePraefix() {
return this.tablenamePraefix; return this.tablenamePraefix;
} }
@ -131,8 +92,6 @@ public class T1
} }
public long getReferstoGraphicalElement() { public long getReferstoGraphicalElement() {
return this.referstoGraphicalElement; return this.referstoGraphicalElement;
} }
@ -159,46 +118,31 @@ public class T1
} }
public boolean columnExist(String colName) { public boolean columnExist(String colName) {
return this.skjdfhgdskjf674534.contains(new C3(colName)); return this.skjdfhgdskjf674534.contains(new C3(colName));
} }
public boolean isCreateInserts() { public boolean isCreateInserts() {
return this.createInserts; return this.createInserts;
} }
public long getJdshfalkajsd677676() { public long getJdshfalkajsd677676() {
return this.jdshfalkajsd677676; return this.jdshfalkajsd677676;
} }
public void setJdshfalkajsd677676(long numberValues) { public void setJdshfalkajsd677676(long numberValues) {
this.jdshfalkajsd677676 = numberValues; this.jdshfalkajsd677676 = numberValues;
} }
public ArrayList<T1> getDependsOnTable() { public ArrayList<T1> getDependsOnTable() {
return this.dependsOnTable; return this.dependsOnTable;
} }
public HashMap<T1, ArrayList<C3>> getColumnsOfDependentOnTable() { public HashMap<T1, ArrayList<C3>> getColumnsOfDependentOnTable() {
return this.columnsOfDependentOnTable; return this.columnsOfDependentOnTable;
} }

View File

@ -14,8 +14,7 @@ import java.util.HashMap;
import java.util.Random; import java.util.Random;
public class T3 public class T3 {
{
public static HashMap<String, ArrayList<String>> randomData = new HashMap<>(); public static HashMap<String, ArrayList<String>> randomData = new HashMap<>();
@ -68,10 +67,6 @@ public class T3
} }
public static void asdasda345435ertretr(Node node, double yScale, double xScale, double contrast, double hue, double brightness, double saturation) { public static void asdasda345435ertretr(Node node, double yScale, double xScale, double contrast, double hue, double brightness, double saturation) {
ImageView iv = (ImageView) node; ImageView iv = (ImageView) node;
@ -86,10 +81,6 @@ public class T3
} }
public static void buttonMouseExited(Node node) { public static void buttonMouseExited(Node node) {
ImageView iv = (ImageView) node; ImageView iv = (ImageView) node;
@ -110,11 +101,6 @@ public class T3
} }
public static String replaceSpecialChars(String text) { public static String replaceSpecialChars(String text) {
text = text.replaceAll("ä", "ae"); text = text.replaceAll("ä", "ae");
text = text.replaceAll("ö", "oe"); text = text.replaceAll("ö", "oe");
@ -125,24 +111,12 @@ public class T3
} }
public static String getRandomInteger(int valuesVon, int valuesBis) { public static String getRandomInteger(int valuesVon, int valuesBis) {
int randomValue = valuesVon + (new Random()).nextInt(valuesBis - valuesVon) + 1; int randomValue = valuesVon + (new Random()).nextInt(valuesBis - valuesVon) + 1;
return String.valueOf(randomValue); return String.valueOf(randomValue);
} }
public static String getRandomBoolean() { public static String getRandomBoolean() {
boolean randomValue = (new Random()).nextBoolean(); boolean randomValue = (new Random()).nextBoolean();
String booleanAsString; String booleanAsString;
@ -152,19 +126,6 @@ public class T3
} }
public static String getRandomDecimal(int digitsBeforeComma, int digitsAfterComma) { public static String getRandomDecimal(int digitsBeforeComma, int digitsAfterComma) {
StringBuilder digitsAfterCommaAsString = new StringBuilder(); StringBuilder digitsAfterCommaAsString = new StringBuilder();
@ -183,13 +144,6 @@ public class T3
} }
public static String getRandomTextGivenLength(int textLength) { public static String getRandomTextGivenLength(int textLength) {
String str = "abcdefghijklmnopqrstuvwxyz"; String str = "abcdefghijklmnopqrstuvwxyz";
StringBuilder randomText = new StringBuilder(); StringBuilder randomText = new StringBuilder();
@ -197,19 +151,14 @@ public class T3
for (int j = 0; j < textLength; j++) { for (int j = 0; j < textLength; j++) {
charactersAsList.add(str.charAt((new Random()).nextInt(26))); charactersAsList.add(str.charAt((new Random()).nextInt(26)));
} }
for (int k = 0; k < charactersAsList.size(); ) { randomText.append(charactersAsList.get(k)); k++; } for (int k = 0; k < charactersAsList.size(); ) {
randomText.append(charactersAsList.get(k));
k++;
}
return randomText.toString(); return randomText.toString();
} }
public static String getRandomDate(LocalDate from, LocalDate till) { public static String getRandomDate(LocalDate from, LocalDate till) {
Random random = new Random(); Random random = new Random();
int minDay = (int) LocalDate.of(from.getYear(), from.getMonth(), from.getDayOfMonth()).toEpochDay(); int minDay = (int) LocalDate.of(from.getYear(), from.getMonth(), from.getDayOfMonth()).toEpochDay();
@ -223,18 +172,16 @@ public class T3
} }
public static void readRandomData(String which, String keyExtern) { public static void readRandomData(String which, String keyExtern) {
ArrayList<String> randomDataAsList; ArrayList<String> randomDataAsList;
try { try {
BufferedReader fr; BufferedReader fr;
if (which.equals("Extern")) { fr = C2.randomDataFilesExtern.get(keyExtern); } if (which.equals("Extern")) {
else { fr = new BufferedReader(new InputStreamReader(C2.randomDataFiles.get(which))); } fr = C2.randomDataFilesExtern.get(keyExtern);
} else {
fr = new BufferedReader(new InputStreamReader(C2.randomDataFiles.get(which)));
}
randomDataAsList = new ArrayList<>(); randomDataAsList = new ArrayList<>();
String next = fr.readLine(); String next = fr.readLine();
while (next != null) { while (next != null) {
@ -242,8 +189,11 @@ public class T3
next = fr.readLine(); next = fr.readLine();
} }
fr.close(); fr.close();
if (which.equals("Extern")) { randomData.put(keyExtern, randomDataAsList); } if (which.equals("Extern")) {
else { randomData.put(which, randomDataAsList); } randomData.put(keyExtern, randomDataAsList);
} else {
randomData.put(which, randomDataAsList);
}
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
@ -251,23 +201,23 @@ public class T3
} }
public static String getRandomData(String which, String keyExtern) { public static String getRandomData(String which, String keyExtern) {
ArrayList<String> randomDataAsList; ArrayList<String> randomDataAsList;
if (which.equals("Extern")) { randomDataAsList = randomData.get(keyExtern); } if (which.equals("Extern")) {
else { randomDataAsList = randomData.get(which); } randomDataAsList = randomData.get(keyExtern);
} else {
randomDataAsList = randomData.get(which);
}
if (randomDataAsList == null) { if (randomDataAsList == null) {
readRandomData(which, keyExtern); readRandomData(which, keyExtern);
} }
if (which.equals("Extern")) { randomDataAsList = randomData.get(keyExtern); } if (which.equals("Extern")) {
else { randomDataAsList = randomData.get(which); } randomDataAsList = randomData.get(keyExtern);
} else {
randomDataAsList = randomData.get(which);
}
return randomDataAsList.get((new Random()).nextInt(randomDataAsList.size())); return randomDataAsList.get((new Random()).nextInt(randomDataAsList.size()));
} }

View File

@ -11,25 +11,8 @@
import java.util.Optional; import java.util.Optional;
public class U1 public class U1
extends Tab extends Tab {
{
public final A3 canvas; public final A3 canvas;
public final StackPane stackpane; public final StackPane stackpane;
public final ScrollPane scrollpane; public final ScrollPane scrollpane;
@ -68,8 +51,6 @@
}); });
this.scrollpane.setOnKeyPressed(U1.this.canvas::sdfdsfd567657rrt); this.scrollpane.setOnKeyPressed(U1.this.canvas::sdfdsfd567657rrt);
this.stackpane.setOnKeyPressed(U1.this.canvas::sdfdsfd567657rrt); this.stackpane.setOnKeyPressed(U1.this.canvas::sdfdsfd567657rrt);

View File

@ -1,7 +1,6 @@
package at.fos.ermodel.gui; package at.fos.ermodel.gui;
public enum U4 public enum U4 {
{
ADD, REMOVE ADD, REMOVE
} }

View File

@ -12,38 +12,8 @@ import javafx.scene.layout.VBox;
import javafx.stage.Stage; import javafx.stage.Stage;
public class V1 public class V1
extends Stage extends Stage {
{
public static V1 thisActionMessageDialog; public static V1 thisActionMessageDialog;
private final Label showFilename; private final Label showFilename;
private Thread th; private Thread th;
@ -53,7 +23,6 @@ public class V1
setTitle("Generate/Save SQL-Script"); setTitle("Generate/Save SQL-Script");
getIcons().add(C2.applicationImageIconAsICO); getIcons().add(C2.applicationImageIconAsICO);
ProgressBar progress = new ProgressBar(); ProgressBar progress = new ProgressBar();
progress.setPrefWidth(200.0D); progress.setPrefWidth(200.0D);
@ -73,10 +42,6 @@ public class V1
} }
sizeToScene(); sizeToScene();
setResizable(false); setResizable(false);
} }
@ -88,9 +53,6 @@ public class V1
} }
public void setThread(Thread th) { public void setThread(Thread th) {
this.th = th; this.th = th;
startTimer(); startTimer();
@ -98,9 +60,6 @@ public class V1
} }
public Label getShowFilename() { public Label getShowFilename() {
return this.showFilename; return this.showFilename;
} }

View File

@ -2,8 +2,7 @@ package at.fos.ermodel.gui;
public class ZZ20 public class ZZ20
extends Exception extends Exception {
{
public ZZ20(String arg0) { public ZZ20(String arg0) {
super(arg0); super(arg0);
} }

View File

@ -1,13 +1,13 @@
package at.fos.ermodel.gui; package at.fos.ermodel.gui;
import javafx.scene.control.Tab;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.ObjectInputStream; import java.io.ObjectInputStream;
import java.util.ArrayList; import java.util.ArrayList;
import javafx.scene.control.Tab;
public class ZZ30 public class ZZ30 {
{
private final B3 view; private final B3 view;
private ArrayList<Graphic_Main_Elem> graphicElements; private ArrayList<Graphic_Main_Elem> graphicElements;
private C4 relationalModel; private C4 relationalModel;
@ -20,11 +20,6 @@ public class ZZ30
} }
public ZZ30(B3 view) { public ZZ30(B3 view) {
this.view = view; this.view = view;
this.graphicElements = new ArrayList<>(); this.graphicElements = new ArrayList<>();
@ -38,23 +33,20 @@ public class ZZ30
ArrayList<Long> esTraversed = new ArrayList<>(); ArrayList<Long> esTraversed = new ArrayList<>();
for (Graphic_Main_Elem gme : this.graphicElements) { for (Graphic_Main_Elem gme : this.graphicElements) {
T1 table = null; T1 table = null;
String relationName; String relationName;
Graphic_ES_Main_Elem entitySet = null; Graphic_ES_Main_Elem entitySet = null;
if (gme instanceof Graphic_ES_Main_Elem) { if (gme instanceof Graphic_ES_Main_Elem) {
entitySet = (Graphic_ES_Main_Elem) gme; entitySet = (Graphic_ES_Main_Elem) gme;
if (entitySet.getCreateRelation()) { if (entitySet.getCreateRelation()) {
relationName = entitySet.getRelationName(); relationName = entitySet.getRelationName();
if (entitySet.getRelationPraefix().length() > 0) relationName = entitySet.getRelationPraefix() + entitySet.getRelationName(); if (entitySet.getRelationPraefix().length() > 0)
relationName = entitySet.getRelationPraefix() + entitySet.getRelationName();
table = new T1(relationName, entitySet.getRelationPraefix(), gme.sdfsdfsdfd(), table = new T1(relationName, entitySet.getRelationPraefix(), gme.sdfsdfsdfd(),
entitySet.getCreateInserts(), entitySet.getNumberRowsToInsert()); entitySet.getCreateInserts(), entitySet.getNumberRowsToInsert());
@ -62,17 +54,6 @@ public class ZZ30
if (keyAttributes.size() > 1) { if (keyAttributes.size() > 1) {
this.view.verticalBox.getChildren().clear(); this.view.verticalBox.getChildren().clear();
this.view.generateRelationalModelCB.setSelected(false); this.view.generateRelationalModelCB.setSelected(false);
return false; return false;
@ -82,17 +63,6 @@ public class ZZ30
if (!(gme instanceof Graphic_ES_Weak_Elem) && !(gme instanceof Graphic_ES_Assoc_Elem) && weakkeyAttributes.size() == 1) { if (!(gme instanceof Graphic_ES_Weak_Elem) && !(gme instanceof Graphic_ES_Assoc_Elem) && weakkeyAttributes.size() == 1) {
this.view.verticalBox.getChildren().clear(); this.view.verticalBox.getChildren().clear();
this.view.generateRelationalModelCB.setSelected(false); this.view.generateRelationalModelCB.setSelected(false);
return false; return false;
@ -101,16 +71,6 @@ public class ZZ30
if (weakkeyAttributes.size() > 0 && keyAttributes.size() > 0) { if (weakkeyAttributes.size() > 0 && keyAttributes.size() > 0) {
this.view.verticalBox.getChildren().clear(); this.view.verticalBox.getChildren().clear();
this.view.generateRelationalModelCB.setSelected(false); this.view.generateRelationalModelCB.setSelected(false);
return false; return false;
@ -127,7 +87,8 @@ public class ZZ30
if (this.relationalModel.addTable(table)) { if (this.relationalModel.addTable(table)) {
entitySet.setRelationName(entitySet.getRelationName() + "_1"); entitySet.setRelationName(entitySet.getRelationName() + "_1");
relationName = entitySet.getRelationPraefix() + entitySet.getRelationName(); relationName = entitySet.getRelationPraefix() + entitySet.getRelationName();
table.setTablename(relationName); continue; table.setTablename(relationName);
continue;
} }
tableAdded = true; tableAdded = true;
} }
@ -135,18 +96,10 @@ public class ZZ30
} }
ArrayList<Graphic_ES_Elem> topESets = new ArrayList<>(); ArrayList<Graphic_ES_Elem> topESets = new ArrayList<>();
for (Graphic_Main_Elem gme : this.graphicElements) { for (Graphic_Main_Elem gme : this.graphicElements) {
if (gme instanceof Graphic_RS_ISA_Elem grsisae) { if (gme instanceof Graphic_RS_ISA_Elem grsisae) {
@ -159,21 +112,17 @@ public class ZZ30
topESets.add(this.topES); topESets.add(this.topES);
} }
} catch (StackOverflowError ignored) {} } catch (StackOverflowError ignored) {
}
} }
} }
for (Graphic_ES_Elem gme : topESets) {
for (Graphic_ES_Elem gme : topESets)
{
traverseThroughISA(gme); traverseThroughISA(gme);
} }
for (Graphic_Main_Elem gme : this.graphicElements) { for (Graphic_Main_Elem gme : this.graphicElements) {
T1 table = null; T1 table = null;
String relationName; String relationName;
@ -185,7 +134,8 @@ public class ZZ30
if (relationshipType.getCreateRelation()) { if (relationshipType.getCreateRelation()) {
relationName = relationshipType.getRelationName(); relationName = relationshipType.getRelationName();
if (relationshipType.getRelationPraefix().length() > 0) relationName = relationshipType.getRelationPraefix() + relationshipType.getRelationName(); if (relationshipType.getRelationPraefix().length() > 0)
relationName = relationshipType.getRelationPraefix() + relationshipType.getRelationName();
table = new T1(relationName, relationshipType.getRelationPraefix(), gme.sdfsdfsdfd(), table = new T1(relationName, relationshipType.getRelationPraefix(), gme.sdfsdfsdfd(),
relationshipType.getCreateInserts(), relationshipType.getNumberRowsToInsert()); relationshipType.getCreateInserts(), relationshipType.getNumberRowsToInsert());
ArrayList<Graphic_Main_Elem> attributes = getAttributes(gme); ArrayList<Graphic_Main_Elem> attributes = getAttributes(gme);
@ -198,20 +148,10 @@ public class ZZ30
if (this.relationalModel.addTable(table)) { if (this.relationalModel.addTable(table)) {
relationshipType.setRelationName(relationshipType.getRelationName() + "_1"); relationshipType.setRelationName(relationshipType.getRelationName() + "_1");
relationName = relationshipType.getRelationPraefix() + relationshipType.getRelationName(); relationName = relationshipType.getRelationPraefix() + relationshipType.getRelationName();
table.setTablename(relationName); continue; table.setTablename(relationName);
continue;
} }
tableAdded = true; tableAdded = true;
} }
@ -219,21 +159,17 @@ public class ZZ30
} }
for (Graphic_Main_Elem gme : this.graphicElements) { for (Graphic_Main_Elem gme : this.graphicElements) {
T1 table = null; T1 table = null;
String relationName; String relationName;
Graphic_ATTR_Multi_Elem mvAttribute = null; Graphic_ATTR_Multi_Elem mvAttribute = null;
if (gme instanceof Graphic_ATTR_Multi_Elem) { if (gme instanceof Graphic_ATTR_Multi_Elem) {
mvAttribute = (Graphic_ATTR_Multi_Elem) gme; mvAttribute = (Graphic_ATTR_Multi_Elem) gme;
relationName = mvAttribute.getMVRelationName(); relationName = mvAttribute.getMVRelationName();
if (mvAttribute.getMVRelationNamePraefix().length() > 0) relationName = mvAttribute.getMVRelationNamePraefix() + mvAttribute.getMVRelationName(); if (mvAttribute.getMVRelationNamePraefix().length() > 0)
relationName = mvAttribute.getMVRelationNamePraefix() + mvAttribute.getMVRelationName();
table = new T1(relationName, mvAttribute.getMVRelationNamePraefix(), gme.sdfsdfsdfd(), false, 0L); table = new T1(relationName, mvAttribute.getMVRelationNamePraefix(), gme.sdfsdfsdfd(), false, 0L);
C3 column = new C3(mvAttribute.getMVRelationNamePraefix() + mvAttribute.getColumnName() + (( C3 column = new C3(mvAttribute.getMVRelationNamePraefix() + mvAttribute.getColumnName() + ((
@ -269,20 +205,10 @@ public class ZZ30
if (this.relationalModel.addTable(table)) { if (this.relationalModel.addTable(table)) {
mvAttribute.setMVRelationName(mvAttribute.getMVRelationName() + "_1"); mvAttribute.setMVRelationName(mvAttribute.getMVRelationName() + "_1");
relationName = mvAttribute.getMVRelationNamePraefix() + mvAttribute.getMVRelationName(); relationName = mvAttribute.getMVRelationNamePraefix() + mvAttribute.getMVRelationName();
table.setTablename(relationName); continue; table.setTablename(relationName);
continue;
} }
tableAdded = true; tableAdded = true;
} }
@ -290,9 +216,6 @@ public class ZZ30
} }
for (Graphic_Main_Elem gme : this.graphicElements) { for (Graphic_Main_Elem gme : this.graphicElements) {
if (gme instanceof Graphic_ES_Assoc_Elem grsem) { if (gme instanceof Graphic_ES_Assoc_Elem grsem) {
@ -307,17 +230,6 @@ public class ZZ30
if (!partPrimary && keys.size() > 0) { if (!partPrimary && keys.size() > 0) {
this.view.verticalBox.getChildren().clear(); this.view.verticalBox.getChildren().clear();
this.view.generateRelationalModelCB.setSelected(false); this.view.generateRelationalModelCB.setSelected(false);
return false; return false;
@ -355,10 +267,6 @@ public class ZZ30
} }
ArrayList<Graphic_Main_Elem> doneWeakElements = new ArrayList<>(); ArrayList<Graphic_Main_Elem> doneWeakElements = new ArrayList<>();
for (Graphic_Main_Elem gme : this.graphicElements) { for (Graphic_Main_Elem gme : this.graphicElements) {
@ -372,16 +280,6 @@ public class ZZ30
if (connectedES.size() != 2) { if (connectedES.size() != 2) {
this.view.verticalBox.getChildren().clear(); this.view.verticalBox.getChildren().clear();
this.view.generateRelationalModelCB.setSelected(false); this.view.generateRelationalModelCB.setSelected(false);
return false; return false;
@ -421,7 +319,6 @@ public class ZZ30
doneWeakElements.add(gw_es); doneWeakElements.add(gw_es);
boolean partPrimary = true; boolean partPrimary = true;
ArrayList<Graphic_Main_Elem> keys = getKeyAttributes(gw_es); ArrayList<Graphic_Main_Elem> keys = getKeyAttributes(gw_es);
@ -430,16 +327,6 @@ public class ZZ30
if (!partPrimary && keys.size() > 0) { if (!partPrimary && keys.size() > 0) {
this.view.verticalBox.getChildren().clear(); this.view.verticalBox.getChildren().clear();
this.view.generateRelationalModelCB.setSelected(false); this.view.generateRelationalModelCB.setSelected(false);
return false; return false;
@ -471,10 +358,6 @@ public class ZZ30
} }
int countNotTransformedWeakES = 0; int countNotTransformedWeakES = 0;
for (Graphic_Main_Elem gme : this.graphicElements) { for (Graphic_Main_Elem gme : this.graphicElements) {
@ -488,16 +371,6 @@ public class ZZ30
if (connectedES.size() != 2) { if (connectedES.size() != 2) {
this.view.verticalBox.getChildren().clear(); this.view.verticalBox.getChildren().clear();
this.view.generateRelationalModelCB.setSelected(false); this.view.generateRelationalModelCB.setSelected(false);
return false; return false;
@ -523,16 +396,6 @@ public class ZZ30
if (connectedES.size() != 2) { if (connectedES.size() != 2) {
this.view.verticalBox.getChildren().clear(); this.view.verticalBox.getChildren().clear();
this.view.generateRelationalModelCB.setSelected(false); this.view.generateRelationalModelCB.setSelected(false);
return false; return false;
@ -546,14 +409,12 @@ public class ZZ30
if (doneWeakElements.contains(connectedES.get(0))) { if (doneWeakElements.contains(connectedES.get(0))) {
ges = (Graphic_ES_Weak_Elem) connectedES.get(0); ges = (Graphic_ES_Weak_Elem) connectedES.get(0);
gw_es = (Graphic_ES_Weak_Elem) connectedES.get(1); gw_es = (Graphic_ES_Weak_Elem) connectedES.get(1);
} } else if (doneWeakElements.contains(connectedES.get(1))) {
else if (doneWeakElements.contains(connectedES.get(1))) {
gw_es = (Graphic_ES_Weak_Elem) connectedES.get(0); gw_es = (Graphic_ES_Weak_Elem) connectedES.get(0);
ges = (Graphic_ES_Weak_Elem) connectedES.get(1); ges = (Graphic_ES_Weak_Elem) connectedES.get(1);
} }
countNotTransformedWeakES--; countNotTransformedWeakES--;
doneWeakElements.add(gw_es); doneWeakElements.add(gw_es);
@ -566,16 +427,6 @@ public class ZZ30
if (!partPrimary && keys.size() > 0) { if (!partPrimary && keys.size() > 0) {
this.view.verticalBox.getChildren().clear(); this.view.verticalBox.getChildren().clear();
this.view.generateRelationalModelCB.setSelected(false); this.view.generateRelationalModelCB.setSelected(false);
return false; return false;
@ -609,14 +460,6 @@ public class ZZ30
} }
for (Graphic_Main_Elem gme : this.graphicElements) { for (Graphic_Main_Elem gme : this.graphicElements) {
if (gme instanceof Graphic_RS_Main_Elem grsem) { if (gme instanceof Graphic_RS_Main_Elem grsem) {
@ -630,16 +473,6 @@ public class ZZ30
if (gesme.size() < 2) { if (gesme.size() < 2) {
this.view.verticalBox.getChildren().clear(); this.view.verticalBox.getChildren().clear();
this.view.generateRelationalModelCB.setSelected(false); this.view.generateRelationalModelCB.setSelected(false);
return false; return false;
@ -664,8 +497,7 @@ public class ZZ30
max0 = minMaxRecursive[1]; max0 = minMaxRecursive[1];
min1 = minMaxRecursive[2]; min1 = minMaxRecursive[2];
max1 = minMaxRecursive[3]; max1 = minMaxRecursive[3];
} } else {
else {
minMax0 = getMinMaxForGivenESRS(grsem.sdfsdfsdfd(), gesme.get(0).sdfsdfsdfd()); minMax0 = getMinMaxForGivenESRS(grsem.sdfsdfsdfd(), gesme.get(0).sdfsdfsdfd());
minMax1 = getMinMaxForGivenESRS(grsem.sdfsdfsdfd(), gesme.get(1).sdfsdfsdfd()); minMax1 = getMinMaxForGivenESRS(grsem.sdfsdfsdfd(), gesme.get(1).sdfsdfsdfd());
@ -695,36 +527,29 @@ public class ZZ30
if (!keyCorrect) { if (!keyCorrect) {
this.view.verticalBox.getChildren().clear(); this.view.verticalBox.getChildren().clear();
this.view.generateRelationalModelCB.setSelected(false); this.view.generateRelationalModelCB.setSelected(false);
return false; return false;
} }
Graphic_ES_Main_Elem es_min_1_side; Graphic_ES_Main_Elem es_min_1_side;
Graphic_ES_Main_Elem es_min_0_side; Graphic_ES_Main_Elem es_min_0_side;
boolean bothSides_min_1 = false; boolean bothSides_min_1 = false;
if (min0.equals("1") && min1.equals("0")) { es_min_1_side = gesme.get(0); es_min_0_side = gesme.get(1); } if (min0.equals("1") && min1.equals("0")) {
else if (min1.equals("1") && min0.equals("0")) { es_min_1_side = gesme.get(1); es_min_0_side = gesme.get(0); } es_min_1_side = gesme.get(0);
es_min_0_side = gesme.get(1);
else if (min1.equals("1") && min0.equals("1")) } else if (min1.equals("1") && min0.equals("0")) {
{ es_min_1_side = gesme.get(1); es_min_0_side = gesme.get(0); bothSides_min_1 = true; } es_min_1_side = gesme.get(1);
es_min_0_side = gesme.get(0);
else } else if (min1.equals("1") && min0.equals("1")) {
es_min_1_side = gesme.get(1);
{ es_min_1_side = gesme.get(0); es_min_0_side = gesme.get(1); } es_min_0_side = gesme.get(0);
bothSides_min_1 = true;
} else {
es_min_1_side = gesme.get(0);
es_min_0_side = gesme.get(1);
}
T1 tableRS = this.relationalModel.getTableGivenNumber(grsem.sdfsdfsdfd()); T1 tableRS = this.relationalModel.getTableGivenNumber(grsem.sdfsdfsdfd());
@ -782,7 +607,6 @@ public class ZZ30
} }
if (oneToMany) { if (oneToMany) {
boolean keyCorrect = true; boolean keyCorrect = true;
@ -796,29 +620,22 @@ public class ZZ30
if (!keyCorrect) { if (!keyCorrect) {
this.view.verticalBox.getChildren().clear(); this.view.verticalBox.getChildren().clear();
this.view.generateRelationalModelCB.setSelected(false); this.view.generateRelationalModelCB.setSelected(false);
return false; return false;
} }
T1 tableRS = this.relationalModel.getTableGivenNumber(grsem.sdfsdfsdfd()); T1 tableRS = this.relationalModel.getTableGivenNumber(grsem.sdfsdfsdfd());
Graphic_ES_Main_Elem es_n_side; Graphic_ES_Main_Elem es_n_side;
Graphic_ES_Main_Elem es_1_side; Graphic_ES_Main_Elem es_1_side;
if (max0.equals("1")) { es_n_side = gesme.get(1); es_1_side = gesme.get(0); } if (max0.equals("1")) {
else { es_n_side = gesme.get(0); es_1_side = gesme.get(1); } es_n_side = gesme.get(1);
es_1_side = gesme.get(0);
} else {
es_n_side = gesme.get(0);
es_1_side = gesme.get(1);
}
T1 tableES = this.relationalModel.getTableGivenNumber(es_n_side.sdfsdfsdfd()); T1 tableES = this.relationalModel.getTableGivenNumber(es_n_side.sdfsdfsdfd());
ArrayList<C3> keyColumns = this.relationalModel.getKeyColumnsGivenRelation(es_n_side.sdfsdfsdfd()); ArrayList<C3> keyColumns = this.relationalModel.getKeyColumnsGivenRelation(es_n_side.sdfsdfsdfd());
@ -848,9 +665,6 @@ public class ZZ30
} }
if (manyToMany) { if (manyToMany) {
@ -862,17 +676,6 @@ public class ZZ30
if (!partPrimary && keys.size() > 0) { if (!partPrimary && keys.size() > 0) {
this.view.verticalBox.getChildren().clear(); this.view.verticalBox.getChildren().clear();
this.view.generateRelationalModelCB.setSelected(false); this.view.generateRelationalModelCB.setSelected(false);
return false; return false;
@ -925,11 +728,6 @@ public class ZZ30
} }
if (gesme.size() > 2) { if (gesme.size() > 2) {
boolean partPrimary = true; boolean partPrimary = true;
@ -940,17 +738,6 @@ public class ZZ30
if (!partPrimary && keys.size() > 0) { if (!partPrimary && keys.size() > 0) {
this.view.verticalBox.getChildren().clear(); this.view.verticalBox.getChildren().clear();
this.view.generateRelationalModelCB.setSelected(false); this.view.generateRelationalModelCB.setSelected(false);
return false; return false;
@ -992,27 +779,12 @@ public class ZZ30
} }
this.relationalModel.sortByTableName(); this.relationalModel.sortByTableName();
return true; return true;
} }
private ArrayList<Graphic_Main_Elem> getAttributes(Graphic_Main_Elem gme) { private ArrayList<Graphic_Main_Elem> getAttributes(Graphic_Main_Elem gme) {
ArrayList<Graphic_Main_Elem> attributes = new ArrayList<>(); ArrayList<Graphic_Main_Elem> attributes = new ArrayList<>();
for (Graphic_Main_Elem gmLooking : this.graphicElements) { for (Graphic_Main_Elem gmLooking : this.graphicElements) {
@ -1024,20 +796,22 @@ public class ZZ30
if (((Graphic_LINE_Elem) gmLooking).getConnectedWithEnd().sdfsdfsdfd() == gme.sdfsdfsdfd() && ( if (((Graphic_LINE_Elem) gmLooking).getConnectedWithEnd().sdfsdfsdfd() == gme.sdfsdfsdfd() && (
(Graphic_LINE_Elem) gmLooking).getConnectedWithStart() instanceof Graphic_ATTR_Elem gae) { (Graphic_LINE_Elem) gmLooking).getConnectedWithStart() instanceof Graphic_ATTR_Elem gae) {
if (gae.getCreateColumn()) { attributes.add(gae); } if (gae.getCreateColumn()) {
attributes.add(gae);
else } else {
attributes.addAll(getAttributes(gae));
{ attributes.addAll(getAttributes(gae)); } }
} }
if (((Graphic_LINE_Elem) gmLooking).getConnectedWithStart().sdfsdfsdfd() == gme.sdfsdfsdfd() && ( if (((Graphic_LINE_Elem) gmLooking).getConnectedWithStart().sdfsdfsdfd() == gme.sdfsdfsdfd() && (
(Graphic_LINE_Elem) gmLooking).getConnectedWithEnd() instanceof Graphic_ATTR_Elem gae) { (Graphic_LINE_Elem) gmLooking).getConnectedWithEnd() instanceof Graphic_ATTR_Elem gae) {
if (gae.getCreateColumn()) { attributes.add(gae); if (gae.getCreateColumn()) {
attributes.add(gae);
continue; } continue;
}
attributes.addAll(getAttributes(gae)); attributes.addAll(getAttributes(gae));
} }
@ -1048,13 +822,6 @@ public class ZZ30
} }
private void addColumnsToTable(T1 table, ArrayList<Graphic_Main_Elem> attributes) { private void addColumnsToTable(T1 table, ArrayList<Graphic_Main_Elem> attributes) {
for (Graphic_Main_Elem gme : attributes) { for (Graphic_Main_Elem gme : attributes) {
Graphic_ATTR_Elem gae = (Graphic_ATTR_Elem) gme; Graphic_ATTR_Elem gae = (Graphic_ATTR_Elem) gme;
@ -1077,11 +844,6 @@ public class ZZ30
} }
private Graphic_ES_Elem getTopES(Graphic_RS_ISA_Elem grsisae) { private Graphic_ES_Elem getTopES(Graphic_RS_ISA_Elem grsisae) {
for (Graphic_Main_Elem gme : this.graphicElements) { for (Graphic_Main_Elem gme : this.graphicElements) {
@ -1112,10 +874,6 @@ public class ZZ30
} }
private void traverseThroughISA(Graphic_ES_Elem topES) { private void traverseThroughISA(Graphic_ES_Elem topES) {
Graphic_RS_ISA_Elem topESConnectedWithISA = getISAOfTop(topES); Graphic_RS_ISA_Elem topESConnectedWithISA = getISAOfTop(topES);
@ -1128,18 +886,6 @@ public class ZZ30
} }
for (Graphic_ES_Elem specialization : specializationsOfTopES) { for (Graphic_ES_Elem specialization : specializationsOfTopES) {
boolean partPrimary = true; boolean partPrimary = true;
ArrayList<Graphic_Main_Elem> keys = getKeyAttributes(specialization); ArrayList<Graphic_Main_Elem> keys = getKeyAttributes(specialization);
@ -1152,17 +898,6 @@ public class ZZ30
} }
if (weakKeys.size() > 1) partPrimary = false; if (weakKeys.size() > 1) partPrimary = false;
T1 tableES = this.relationalModel.getTableGivenNumber(topES.sdfsdfsdfd()); T1 tableES = this.relationalModel.getTableGivenNumber(topES.sdfsdfsdfd());
@ -1193,49 +928,37 @@ public class ZZ30
} }
public Graphic_ES_Main_Elem getESGivenNumber(long elementNr) { public Graphic_ES_Main_Elem getESGivenNumber(long elementNr) {
for (Graphic_Main_Elem gme : this.graphicElements) { for (Graphic_Main_Elem gme : this.graphicElements) {
if (gme instanceof Graphic_LINE_Attr_ES_Elem glaese) { if (gme instanceof Graphic_LINE_Attr_ES_Elem glaese) {
if (glaese.getConnectedWithEnd().sdfsdfsdfd() == elementNr) return (Graphic_ES_Main_Elem)glaese.getConnectedWithStart(); if (glaese.getConnectedWithEnd().sdfsdfsdfd() == elementNr)
if (glaese.getConnectedWithStart().sdfsdfsdfd() == elementNr) return (Graphic_ES_Main_Elem)glaese.getConnectedWithEnd(); return (Graphic_ES_Main_Elem) glaese.getConnectedWithStart();
if (glaese.getConnectedWithStart().sdfsdfsdfd() == elementNr)
return (Graphic_ES_Main_Elem) glaese.getConnectedWithEnd();
} }
} }
return null; return null;
} }
private ArrayList<Graphic_ES_Main_Elem> getConnectedESToRelationshipGivenElemNumber(long elementNr) { private ArrayList<Graphic_ES_Main_Elem> getConnectedESToRelationshipGivenElemNumber(long elementNr) {
ArrayList<Graphic_ES_Main_Elem> connections = new ArrayList<>(); ArrayList<Graphic_ES_Main_Elem> connections = new ArrayList<>();
for (Graphic_Main_Elem gme : this.graphicElements) { for (Graphic_Main_Elem gme : this.graphicElements) {
if (gme instanceof Graphic_LINE_Attr_Attr_Elem || gme instanceof Graphic_LINE_Attr_ES_Elem || gme instanceof Graphic_LINE_Attr_RS_Elem) if (gme instanceof Graphic_LINE_Attr_Attr_Elem || gme instanceof Graphic_LINE_Attr_ES_Elem || gme instanceof Graphic_LINE_Attr_RS_Elem)
continue; continue;
if (gme instanceof Graphic_LINE_Elem gle) { if (gme instanceof Graphic_LINE_Elem gle) {
if (gle.getConnectedWithEnd().sdfsdfsdfd() == elementNr) connections.add((Graphic_ES_Main_Elem)gle.getConnectedWithStart()); if (gle.getConnectedWithEnd().sdfsdfsdfd() == elementNr)
if (gle.getConnectedWithStart().sdfsdfsdfd() == elementNr) connections.add((Graphic_ES_Main_Elem)gle.getConnectedWithEnd()); connections.add((Graphic_ES_Main_Elem) gle.getConnectedWithStart());
if (gle.getConnectedWithStart().sdfsdfsdfd() == elementNr)
connections.add((Graphic_ES_Main_Elem) gle.getConnectedWithEnd());
} }
} }
return connections; return connections;
} }
private ArrayList<Graphic_Main_Elem> getWeakKeyAttributes(Graphic_Main_Elem gme) { private ArrayList<Graphic_Main_Elem> getWeakKeyAttributes(Graphic_Main_Elem gme) {
ArrayList<Graphic_Main_Elem> attributes = new ArrayList<>(); ArrayList<Graphic_Main_Elem> attributes = new ArrayList<>();
for (Graphic_Main_Elem gmLooking : this.graphicElements) { for (Graphic_Main_Elem gmLooking : this.graphicElements) {
@ -1262,12 +985,6 @@ public class ZZ30
} }
private ArrayList<Graphic_Main_Elem> getKeyAttributes(Graphic_Main_Elem gme) { private ArrayList<Graphic_Main_Elem> getKeyAttributes(Graphic_Main_Elem gme) {
ArrayList<Graphic_Main_Elem> attributes = new ArrayList<>(); ArrayList<Graphic_Main_Elem> attributes = new ArrayList<>();
for (Graphic_Main_Elem gmLooking : this.graphicElements) { for (Graphic_Main_Elem gmLooking : this.graphicElements) {
@ -1294,10 +1011,6 @@ public class ZZ30
} }
private ArrayList<Graphic_ES_Main_Elem> getConnectedESToAssociativeESGivenElemNumber(long elementNr) { private ArrayList<Graphic_ES_Main_Elem> getConnectedESToAssociativeESGivenElemNumber(long elementNr) {
ArrayList<Graphic_ES_Main_Elem> connections = new ArrayList<>(); ArrayList<Graphic_ES_Main_Elem> connections = new ArrayList<>();
for (Graphic_Main_Elem gme : this.graphicElements) { for (Graphic_Main_Elem gme : this.graphicElements) {
@ -1318,13 +1031,6 @@ public class ZZ30
} }
private String[] getMinMaxForGivenESRSIfRecursive(long rs, long es) { private String[] getMinMaxForGivenESRSIfRecursive(long rs, long es) {
String[] minMax = new String[100]; String[] minMax = new String[100];
int counter = 0; int counter = 0;
@ -1342,12 +1048,6 @@ public class ZZ30
} }
private String[] getMinMaxForGivenESRS(long rs, long es) { private String[] getMinMaxForGivenESRS(long rs, long es) {
String[] minMax = null; String[] minMax = null;
for (Graphic_Main_Elem gme : this.graphicElements) { for (Graphic_Main_Elem gme : this.graphicElements) {
@ -1380,12 +1080,6 @@ public class ZZ30
} }
private ArrayList<Graphic_ES_Elem> getSpecializationsOfTopES(Graphic_RS_ISA_Elem topESISA) { private ArrayList<Graphic_ES_Elem> getSpecializationsOfTopES(Graphic_RS_ISA_Elem topESISA) {
ArrayList<Graphic_ES_Elem> connectedES = new ArrayList<>(); ArrayList<Graphic_ES_Elem> connectedES = new ArrayList<>();
for (Graphic_Main_Elem gme : this.graphicElements) { for (Graphic_Main_Elem gme : this.graphicElements) {
@ -1402,11 +1096,6 @@ public class ZZ30
} }
private Graphic_ATTR_Elem getAttrElemGivenColumnName(String columnName) { private Graphic_ATTR_Elem getAttrElemGivenColumnName(String columnName) {
Graphic_ATTR_Elem gattre = null; Graphic_ATTR_Elem gattre = null;
for (Graphic_Main_Elem gme : this.graphicElements) { for (Graphic_Main_Elem gme : this.graphicElements) {
@ -1419,26 +1108,11 @@ public class ZZ30
} }
public C4 getRelationalModel() { public C4 getRelationalModel() {
return this.relationalModel; return this.relationalModel;
} }
public boolean mergeAllModelsInPanes() throws IOException, ClassNotFoundException { public boolean mergeAllModelsInPanes() throws IOException, ClassNotFoundException {
ArrayList<Graphic_Main_Elem> graphicElements = new ArrayList<>(); ArrayList<Graphic_Main_Elem> graphicElements = new ArrayList<>();
@ -1447,9 +1121,9 @@ public class ZZ30
A3 canvas = currentTab.canvas; A3 canvas = currentTab.canvas;
if (canvas.sddsfsfsdf45645645().size() == 0 || canvas.getSaveFile() == null) if (canvas.sddsfsfsdf45645645().size() == 0 || canvas.getSaveFile() == null)
continue; ObjectInputStream ro = new ObjectInputStream(new FileInputStream(canvas.getSaveFile())); continue;
ObjectInputStream ro = new ObjectInputStream(new FileInputStream(canvas.getSaveFile()));
@SuppressWarnings("unchecked") ArrayList<Graphic_Main_Elem> readModel = (ArrayList<Graphic_Main_Elem>) ro.readObject(); @SuppressWarnings("unchecked") ArrayList<Graphic_Main_Elem> readModel = (ArrayList<Graphic_Main_Elem>) ro.readObject();
@ -1509,10 +1183,6 @@ public class ZZ30
} }
public ArrayList<Graphic_Main_Elem> getGraphicElements() { public ArrayList<Graphic_Main_Elem> getGraphicElements() {
return this.graphicElements; return this.graphicElements;
} }

View File

@ -9,6 +9,5 @@
</content> </content>
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="soot.oss" level="project" />
</component> </component>
</module> </module>

3
obfuscate.bat Normal file
View File

@ -0,0 +1,3 @@
java -jar C:\Users\code0\javaObfuscation/SkidObfuscator.jar obfuscate out/artifacts/noEasyDB/noEasyDB.jar
mv out/artifacts/noEasyDB/noEasyDB.jar-out.jar ./
mv out/artifacts/noEasyDB/noEasyDB.jar ./