optimize a bit
This commit is contained in:
parent
a08dae9ad9
commit
82bc8f70ab
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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_19" default="true" project-jdk-name="zulu-19" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -7,12 +7,12 @@ public class A1 extends Application {
|
||||
public A1() {
|
||||
}
|
||||
|
||||
public void start(Stage stage) {
|
||||
new B3();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
launch(args);
|
||||
}
|
||||
|
||||
public void start(Stage stage) {
|
||||
new B3();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,12 +1,11 @@
|
||||
package at.fos.ermodel.gui;
|
||||
package at.fos.ermodel.gui;
|
||||
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.event.EventHandler;
|
||||
import javafx.scene.control.RadioButton;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.event.EventHandler;
|
||||
import javafx.scene.control.RadioButton;
|
||||
|
||||
public class A2
|
||||
implements EventHandler<ActionEvent>
|
||||
{
|
||||
public class A2
|
||||
implements EventHandler<ActionEvent> {
|
||||
private final B3 view;
|
||||
|
||||
public A2(B3 simpleFrame) {
|
||||
@ -14,11 +13,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void handle(ActionEvent arg0) {
|
||||
Object source = arg0.getSource();
|
||||
|
||||
@ -37,61 +31,37 @@
|
||||
this.view.menuVisibility.setDisable(true);
|
||||
|
||||
|
||||
|
||||
this.view.showAttributeCB.setSelected(false);
|
||||
this.view.graphicElemLV.getItems().clear();
|
||||
this.view.graphicElemLV.getItems().addAll((this.view.getCurrentTab()).canvas.sddsfsfsdf45645645());
|
||||
|
||||
this.view.selectModeBTN.setStyle("-fx-text-fill:white");
|
||||
this.view.creationModelabel.setStyle("-fx-text-fill:red");
|
||||
this.view.lastCreationSelected = (RadioButton)source;
|
||||
this.view.lastCreationSelected = (RadioButton) source;
|
||||
if (this.view.getCurrentTab() == null) {
|
||||
this.view.selectModeBTN.setSelected(true);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (this.view.generateRelationalModelCB.isSelected()) {
|
||||
this.view.selectModeBTN.setStyle("-fx-text-fill:red");
|
||||
this.view.creationModelabel.setStyle("-fx-text-fill:white");
|
||||
this.view.selectModeBTN.setSelected(true);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (source == this.view.menuExitMI) {
|
||||
this.view.close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (source == this.view.menuNewMI) {
|
||||
this.view.setCurrentTab(this.view.addNewTab(null));
|
||||
(this.view.getCurrentTab()).canvas.requestFocus();
|
||||
@ -132,8 +102,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (source == this.view.textElemBTN) {
|
||||
(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");
|
||||
@ -252,7 +220,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (this.view.getCurrentTab() != null) {
|
||||
(this.view.getCurrentTab()).canvas.dsfdsdfssdf45645re();
|
||||
}
|
||||
@ -263,6 +230,6 @@
|
||||
(this.view.getCurrentTab()).canvas.sdfsdfds3465er(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,23 +1,22 @@
|
||||
package at.fos.ermodel.gui;
|
||||
package at.fos.ermodel.gui;
|
||||
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.StageStyle;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.StageStyle;
|
||||
|
||||
public class A4
|
||||
extends Stage
|
||||
{
|
||||
public class A4
|
||||
extends Stage {
|
||||
private final A4 thisActionMessageDialog;
|
||||
private final TextField minTF;
|
||||
private final TextField maxTF;
|
||||
private boolean doNothing;
|
||||
private final String holdminimum;
|
||||
private final String holdmaximum;
|
||||
private boolean doNothing;
|
||||
|
||||
public A4(final A3 canvas, double xPos, double yPos, String minimum, String maximum) {
|
||||
|
||||
@ -33,9 +32,6 @@
|
||||
initModality(Modality.APPLICATION_MODAL);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.minTF = new TextField(minimum);
|
||||
this.minTF.textProperty().addListener((observable, oldValue, newValue) -> {
|
||||
if (newValue.length() > 1 && newValue.charAt(0) == '0') {
|
||||
@ -111,8 +107,6 @@
|
||||
gPane.add(this.maxTF, 1, 2);
|
||||
|
||||
|
||||
|
||||
|
||||
initStyle(StageStyle.UNDECORATED);
|
||||
Scene scene = new Scene(gPane, 130.0D, 90.0D);
|
||||
|
||||
@ -135,8 +129,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void setDataAndLeave() {
|
||||
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");
|
||||
@ -144,9 +136,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void setNothingAndLeave() {
|
||||
this.minTF.setText(this.holdminimum);
|
||||
this.maxTF.setText(this.holdmaximum);
|
||||
@ -156,25 +145,19 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public TextField getMinTF() {
|
||||
return this.minTF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public TextField getMaxTF() {
|
||||
return this.maxTF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean isDoNothing() {
|
||||
return this.doNothing;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,21 +1,20 @@
|
||||
package at.fos.ermodel.gui;
|
||||
package at.fos.ermodel.gui;
|
||||
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.StageStyle;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.StageStyle;
|
||||
|
||||
public class A5
|
||||
extends Stage
|
||||
{
|
||||
public class A5
|
||||
extends Stage {
|
||||
private final A5 thisActionMessageDialog;
|
||||
private final TextField nameTF;
|
||||
private boolean doNothing;
|
||||
private final String holdName;
|
||||
private boolean doNothing;
|
||||
|
||||
public A5(final A3 canvas, double xPos, double yPos, String name) {
|
||||
|
||||
@ -30,9 +29,6 @@
|
||||
initModality(Modality.APPLICATION_MODAL);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.nameTF = new TextField(name);
|
||||
this.nameTF.setOnMouseEntered(event -> T3.fdssdf4354(A5.this.nameTF, C2.MouseSelectedColor));
|
||||
this.nameTF.setOnMouseExited(event -> A5.this.nameTF.setEffect(null));
|
||||
@ -58,9 +54,6 @@
|
||||
fPane.add(this.nameTF, 1, 1);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Scene scene = new Scene(fPane, 220.0D, 75.0D);
|
||||
|
||||
setX(xPos);
|
||||
@ -83,16 +76,13 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void setDataAndLeave() {
|
||||
if (this.nameTF.getText() == null || this.nameTF.getText().length() == 0)
|
||||
return; this.thisActionMessageDialog.close();
|
||||
return;
|
||||
this.thisActionMessageDialog.close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void setNothingAndLeave() {
|
||||
this.nameTF.setText(this.holdName);
|
||||
this.doNothing = true;
|
||||
@ -100,18 +90,14 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public TextField getNameTF() {
|
||||
return this.nameTF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean isDoNothing() {
|
||||
return this.doNothing;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,45 +1,25 @@
|
||||
package at.fos.ermodel.gui;
|
||||
package at.fos.ermodel.gui;
|
||||
|
||||
import javafx.event.EventHandler;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.input.KeyEvent;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.StageStyle;
|
||||
import javafx.event.EventHandler;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.input.KeyEvent;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.StageStyle;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public class A6
|
||||
extends Stage
|
||||
{
|
||||
public class A6
|
||||
extends Stage {
|
||||
private final A6 thisActionMessageDialog;
|
||||
private final TextField p_tTF;
|
||||
private final TextField d_ndTF;
|
||||
private boolean doNothing;
|
||||
private final String holdpartial_or_total;
|
||||
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) {
|
||||
|
||||
@ -57,9 +37,6 @@
|
||||
initModality(Modality.APPLICATION_MODAL);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.p_tTF = new TextField(partial_or_total);
|
||||
this.p_tTF.setPrefWidth(50.0D);
|
||||
this.p_tTF.textProperty().addListener((observable, oldValue, newValue) -> {
|
||||
@ -139,8 +116,6 @@
|
||||
gPane.add(this.d_ndTF, 1, 2);
|
||||
|
||||
|
||||
|
||||
|
||||
initStyle(StageStyle.UNDECORATED);
|
||||
Scene scene = new Scene(gPane, 230.0D, 90.0D);
|
||||
|
||||
@ -164,8 +139,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void setDataAndLeave() {
|
||||
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");
|
||||
@ -173,8 +146,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void setNothingAndLeave() {
|
||||
this.p_tTF.setText(this.holdpartial_or_total);
|
||||
this.d_ndTF.setText(this.holddisjunct_or_notdisjunct);
|
||||
@ -184,23 +155,17 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public TextField getP_tTF() {
|
||||
return this.p_tTF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public TextField getD_ndTF() {
|
||||
return this.d_ndTF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean isDoNothing() {
|
||||
return this.doNothing;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,51 +1,25 @@
|
||||
package at.fos.ermodel.gui;
|
||||
package at.fos.ermodel.gui;
|
||||
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.TextArea;
|
||||
import javafx.scene.input.KeyCode;
|
||||
import javafx.scene.input.KeyCodeCombination;
|
||||
import javafx.scene.input.KeyCombination;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.StageStyle;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.TextArea;
|
||||
import javafx.scene.input.KeyCode;
|
||||
import javafx.scene.input.KeyCodeCombination;
|
||||
import javafx.scene.input.KeyCombination;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.StageStyle;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public class A7
|
||||
extends Stage
|
||||
{
|
||||
public class A7
|
||||
extends Stage {
|
||||
final KeyCombination keyCombinationALT_ENTER = new KeyCodeCombination(KeyCode.ENTER, KeyCombination.ALT_DOWN);
|
||||
private final A7 thisActionMessageDialog;
|
||||
private final TextArea textTA;
|
||||
private boolean doNothing;
|
||||
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) {
|
||||
@ -62,8 +36,6 @@
|
||||
initModality(Modality.APPLICATION_MODAL);
|
||||
|
||||
|
||||
|
||||
|
||||
this.textTA = new TextArea(name);
|
||||
this.textTA.setPrefWidth(350.0D);
|
||||
this.textTA.setPrefHeight(100.0D);
|
||||
@ -96,7 +68,6 @@
|
||||
fPane.add(this.textTA, 0, 1);
|
||||
|
||||
|
||||
|
||||
initStyle(StageStyle.UNDECORATED);
|
||||
Scene scene = new Scene(fPane, 370.0D, 150.0D);
|
||||
|
||||
@ -119,9 +90,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void setDataAndLeave() {
|
||||
if (this.textTA.getText() == null || this.textTA.getText().length() == 0) {
|
||||
this.textTA.setText("");
|
||||
@ -134,8 +102,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void setNothingAndLeave() {
|
||||
this.textTA.setText(this.holdName);
|
||||
this.doNothing = true;
|
||||
@ -143,18 +109,14 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public TextArea getTextTA() {
|
||||
return this.textTA;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean isDoNothing() {
|
||||
return this.doNothing;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -19,48 +19,8 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public class A8
|
||||
extends Stage
|
||||
{
|
||||
extends Stage {
|
||||
private final A8 thisActionMessageDialog;
|
||||
private final TextField nameTF;
|
||||
private final CheckBox createColumnCB;
|
||||
@ -78,7 +38,6 @@ public class A8
|
||||
private final Label par2LBL;
|
||||
private final TextField par2TF;
|
||||
private final Button okBTN;
|
||||
private Button cancelBTN;
|
||||
private final String holdName;
|
||||
private final boolean holdcreateColumn;
|
||||
private final String holdcolumnName;
|
||||
@ -94,6 +53,7 @@ public class A8
|
||||
private final String holdpar1;
|
||||
private final String holdpar2_label;
|
||||
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) {
|
||||
String title = "Attribute Transformation";
|
||||
@ -121,17 +81,12 @@ public class A8
|
||||
initModality(Modality.APPLICATION_MODAL);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.nameTF = new TextField(name);
|
||||
this.nameTF.setPrefWidth(150.0D);
|
||||
this.nameTF.setMaxWidth(150.0D);
|
||||
this.nameTF.setDisable(true);
|
||||
|
||||
|
||||
|
||||
this.createColumnCB = new CheckBox();
|
||||
this.createColumnCB.setSelected(false);
|
||||
if (createColumn) this.createColumnCB.setSelected(true);
|
||||
@ -211,8 +166,6 @@ public class A8
|
||||
this.isUniqueCB.setOnMouseExited(event -> A8.this.isUniqueCB.setEffect(null));
|
||||
|
||||
|
||||
|
||||
|
||||
ObservableList<String> possibleGenerations =
|
||||
FXCollections.observableArrayList(T3.dsfsdfsdf4353534);
|
||||
this.dataGenerationTypeCoB = new ComboBox<>(possibleGenerations);
|
||||
@ -220,23 +173,28 @@ public class A8
|
||||
|
||||
if (dataGenerationType == null) {
|
||||
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.par2TF = new TextField(""); this.par2TF.setDisable(true);
|
||||
this.par2TF = new TextField("");
|
||||
this.par2TF.setDisable(true);
|
||||
this.par2LBL = new Label("");
|
||||
} else {
|
||||
|
||||
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.par2TF = new TextField(par2); this.par2TF.setDisable(true);
|
||||
this.par2TF = new TextField(par2);
|
||||
this.par2TF.setDisable(true);
|
||||
this.par2LBL = new Label(par2_label);
|
||||
setVisibilityForGenerationtype();
|
||||
}
|
||||
|
||||
this.par2TF.setOnMousePressed(event -> {
|
||||
if (!A8.this.dataGenerationTypeCoB.getSelectionModel().getSelectedItem().equals("Extern"))
|
||||
return; if (event.getButton() == MouseButton.SECONDARY) {
|
||||
return;
|
||||
if (event.getButton() == MouseButton.SECONDARY) {
|
||||
event.consume();
|
||||
FileChooser fc = new FileChooser();
|
||||
fc.setInitialDirectory(new File(System.getProperty("user.home")));
|
||||
@ -278,7 +236,8 @@ public class A8
|
||||
this.okBTN.setOnAction(event -> {
|
||||
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 -> {
|
||||
if (Objects.requireNonNull(event.getCode()) == KeyCode.ENTER) {
|
||||
@ -288,7 +247,6 @@ public class A8
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
this.cancelBTN = new Button("Cancel");
|
||||
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.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);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Scene scene = new Scene(gridPane, 280.0D, 355.0D);
|
||||
setScene(scene);
|
||||
|
||||
@ -430,8 +384,6 @@ public class A8
|
||||
this.columnNameTF.requestFocus();
|
||||
|
||||
|
||||
|
||||
|
||||
if (isAutoincrement) {
|
||||
this.dataGenerationTypeCoB.setDisable(true);
|
||||
this.par1TF.setDisable(true);
|
||||
@ -441,8 +393,6 @@ public class A8
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void setDataAndLeave() {
|
||||
if (this.createColumnCB.isSelected()) {
|
||||
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) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (this.dataGenerationTypeCoB.getSelectionModel().getSelectedItem().equals("Extern")) {
|
||||
BufferedReader br = C2.randomDataFilesExtern.get(this.par1TF.getText());
|
||||
|
||||
if (br == null)
|
||||
{
|
||||
if (br == null) {
|
||||
try {
|
||||
BufferedReader fr = new BufferedReader(new InputStreamReader(new FileInputStream(this.par2TF.getText()), StandardCharsets.UTF_8));
|
||||
|
||||
C2.randomDataFilesExtern.put(this.par1TF.getText(), fr);
|
||||
this.thisActionMessageDialog.close();
|
||||
} catch (FileNotFoundException ignored) {}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (FileNotFoundException ignored) {
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
C1 alert = new C1(null,
|
||||
@ -523,8 +438,7 @@ public class A8
|
||||
Optional<ButtonType> result = alert.getResult();
|
||||
|
||||
|
||||
if (result.isPresent() && result.get() == ButtonType.OK)
|
||||
{
|
||||
if (result.isPresent() && result.get() == ButtonType.OK) {
|
||||
this.thisActionMessageDialog.close();
|
||||
}
|
||||
}
|
||||
@ -536,7 +450,6 @@ public class A8
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void setNothingAndLeave() {
|
||||
this.nameTF.setText(this.holdName);
|
||||
this.createColumnCB.setSelected(this.holdcreateColumn);
|
||||
@ -564,85 +477,61 @@ public class A8
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public TextField getColumnNameTF() {
|
||||
return this.columnNameTF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public TextField getColumnPostfixTF() {
|
||||
return this.columnPostfixTF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public TextField getDatatypeTF() {
|
||||
return this.datatypeTF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public CheckBox getIsAutoincrementCB() {
|
||||
return this.isAutoincrementCB;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public CheckBox getIsKeyCB() {
|
||||
return this.isKeyCB;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public CheckBox getIsNullableCB() {
|
||||
return this.isNullableCB;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public CheckBox getIsUniqueCB() {
|
||||
return this.isUniqueCB;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public ComboBox<String> getDataGenerationTypeCoB() {
|
||||
return this.dataGenerationTypeCoB;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Label getPar1LBL() {
|
||||
return this.par1LBL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public TextField getPar1TF() {
|
||||
return this.par1TF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Label getPar2LBL() {
|
||||
return this.par2LBL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public TextField getPar2TF() {
|
||||
return this.par2TF;
|
||||
}
|
||||
@ -654,7 +543,8 @@ public class A8
|
||||
|
||||
private void setSelectionForGenerationtype() {
|
||||
if (this.dataGenerationTypeCoB.getSelectionModel().getSelectedItem() == null)
|
||||
return; String str;
|
||||
return;
|
||||
String str;
|
||||
switch ((str = this.dataGenerationTypeCoB.getSelectionModel().getSelectedItem()).hashCode()) {
|
||||
case -1601184309 -> {
|
||||
if (!str.equals("Random Boolean")) {
|
||||
@ -752,8 +642,12 @@ public class A8
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.par1TF.setText(""); this.par1LBL.setText(""); this.par1TF.setDisable(true);
|
||||
this.par2TF.setText(""); this.par2LBL.setText(""); this.par2TF.setDisable(true);
|
||||
this.par1TF.setText("");
|
||||
this.par1LBL.setText("");
|
||||
this.par1TF.setDisable(true);
|
||||
this.par2TF.setText("");
|
||||
this.par2LBL.setText("");
|
||||
this.par2TF.setDisable(true);
|
||||
}
|
||||
|
||||
private void setVisibilityForGenerationtype() {
|
||||
@ -822,8 +716,12 @@ public class A8
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.par1TF.setText(""); this.par1LBL.setText(""); this.par1TF.setDisable(true);
|
||||
this.par2TF.setText(""); this.par2LBL.setText(""); this.par2TF.setDisable(true);
|
||||
this.par1TF.setText("");
|
||||
this.par1LBL.setText("");
|
||||
this.par1TF.setDisable(true);
|
||||
this.par2TF.setText("");
|
||||
this.par2LBL.setText("");
|
||||
this.par2TF.setDisable(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,25 +1,24 @@
|
||||
package at.fos.ermodel.gui;
|
||||
package at.fos.ermodel.gui;
|
||||
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.event.EventHandler;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.Cursor;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.CheckBox;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.input.KeyCode;
|
||||
import javafx.scene.layout.*;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.event.EventHandler;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.Cursor;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.CheckBox;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.input.KeyCode;
|
||||
import javafx.scene.layout.*;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
public class A9
|
||||
extends Stage
|
||||
{
|
||||
public class A9
|
||||
extends Stage {
|
||||
private final A9 thisActionMessageDialog;
|
||||
private final TextField nameTF;
|
||||
private final CheckBox createRelationCB;
|
||||
@ -28,8 +27,8 @@
|
||||
private final CheckBox createInsertStatementsCB;
|
||||
private final TextField numberRowsToInsertTF;
|
||||
private final Button okBTN;
|
||||
private Button cancelBTN;
|
||||
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) {
|
||||
|
||||
@ -43,9 +42,6 @@
|
||||
initModality(Modality.APPLICATION_MODAL);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.nameTF = new TextField(name);
|
||||
this.nameTF.setDisable(true);
|
||||
|
||||
@ -102,7 +98,8 @@
|
||||
this.okBTN.setOnAction(event -> {
|
||||
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 -> {
|
||||
if (Objects.requireNonNull(event.getCode()) == KeyCode.ENTER) {
|
||||
@ -113,7 +110,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
this.cancelBTN = new Button("Cancel");
|
||||
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);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Scene scene = new Scene(gridPane, 300.0D, 205.0D);
|
||||
|
||||
setScene(scene);
|
||||
@ -190,22 +183,18 @@
|
||||
this.relationNameTF.requestFocus();
|
||||
|
||||
|
||||
|
||||
sizeToScene();
|
||||
showAndWait();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void setDataAndLeave() {
|
||||
if (this.nameTF.getText() == null || this.nameTF.getText().length() == 0)
|
||||
return; this.thisActionMessageDialog.close();
|
||||
return;
|
||||
this.thisActionMessageDialog.close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void setNothingAndLeave() {
|
||||
this.nameTF.setText(this.holdName);
|
||||
this.thisActionMessageDialog.close();
|
||||
@ -217,32 +206,24 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public TextField getRelationNameTF() {
|
||||
return this.relationNameTF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public TextField getRelationPraefixTF() {
|
||||
return this.relationPraefixTF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public CheckBox getCreateInsertStatementsCB() {
|
||||
return this.createInsertStatementsCB;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public TextField getNumberRowsToInsertTF() {
|
||||
return this.numberRowsToInsertTF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,23 +1,22 @@
|
||||
package at.fos.ermodel.gui;
|
||||
package at.fos.ermodel.gui;
|
||||
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.Cursor;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.CheckBox;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.input.KeyCode;
|
||||
import javafx.scene.layout.*;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.Cursor;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.CheckBox;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.input.KeyCode;
|
||||
import javafx.scene.layout.*;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
public class B1
|
||||
extends Stage
|
||||
{
|
||||
public class B1
|
||||
extends Stage {
|
||||
private final B1 thisActionMessageDialog;
|
||||
private final TextField nameTF;
|
||||
private final CheckBox createColumnCB;
|
||||
@ -31,8 +30,8 @@
|
||||
private final CheckBox isNullableCB;
|
||||
private final CheckBox isUniqueCB;
|
||||
private final Button okBTN;
|
||||
private Button cancelBTN;
|
||||
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) {
|
||||
String title = "Multivalue Attribute Transformation";
|
||||
@ -45,15 +44,10 @@
|
||||
initModality(Modality.APPLICATION_MODAL);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.nameTF = new TextField(name);
|
||||
this.nameTF.setDisable(true);
|
||||
|
||||
|
||||
|
||||
this.createColumnCB = new CheckBox();
|
||||
this.createColumnCB.setSelected(false);
|
||||
|
||||
@ -129,7 +123,8 @@
|
||||
}
|
||||
});
|
||||
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();
|
||||
});
|
||||
@ -142,7 +137,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
this.cancelBTN = new Button("Cancel");
|
||||
this.cancelBTN.setBackground(new Background(new BackgroundFill(C2.ButtonBackgroundColor, new CornerRadii(5.0D), Insets.EMPTY)));
|
||||
@ -185,7 +179,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
GridPane gridPane = new GridPane();
|
||||
gridPane.setPadding(new Insets(10.0D, 10.0D, 10.0D, 10.0D));
|
||||
gridPane.setVgap(4.0D);
|
||||
@ -215,16 +208,12 @@
|
||||
gridPane.add(this.isUniqueCB, 1, 10);
|
||||
|
||||
|
||||
|
||||
FlowPane fp = new FlowPane();
|
||||
fp.setHgap(10.0D);
|
||||
fp.getChildren().addAll(this.okBTN, this.cancelBTN);
|
||||
gridPane.add(fp, 0, 11, 2, 1);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Scene scene = new Scene(gridPane, 300.0D, 325.0D);
|
||||
setScene(scene);
|
||||
|
||||
@ -240,23 +229,19 @@
|
||||
this.columnNameTF.requestFocus();
|
||||
|
||||
|
||||
|
||||
sizeToScene();
|
||||
|
||||
showAndWait();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void setDataAndLeave() {
|
||||
if (this.nameTF.getText() == null || this.nameTF.getText().length() == 0)
|
||||
return; this.thisActionMessageDialog.close();
|
||||
return;
|
||||
this.thisActionMessageDialog.close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void setNothingAndLeave() {
|
||||
this.nameTF.setText(this.holdName);
|
||||
this.thisActionMessageDialog.close();
|
||||
@ -268,67 +253,49 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public TextField getColumnNameTF() {
|
||||
return this.columnNameTF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public TextField getColumnPostfixTF() {
|
||||
return this.columnPostfixTF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public TextField getDatatypeTF() {
|
||||
return this.datatypeTF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public CheckBox getIsAutoincrementCB() {
|
||||
return this.isAutoincrementCB;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public CheckBox getIsKeyCB() {
|
||||
return this.isKeyCB;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public CheckBox getIsNullableCB() {
|
||||
return this.isNullableCB;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public CheckBox getIsUniqueCB() {
|
||||
return this.isUniqueCB;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public TextField getRelationNameTF() {
|
||||
return this.relationNameTF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public TextField getRelationNamePraefixTF() {
|
||||
return this.relationNamePraefixTF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -42,10 +42,7 @@ import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
|
||||
public class B3
|
||||
extends Stage
|
||||
{
|
||||
B3 thisERMViewFX;
|
||||
BorderPane borderPane;
|
||||
extends Stage {
|
||||
public final TabPane tabPane;
|
||||
public final TabPane infoTabPane;
|
||||
public final CheckBox showAttributeCB;
|
||||
@ -77,7 +74,6 @@ public class B3
|
||||
public final RadioButton rsidToESBTN;
|
||||
public final RadioButton rsisaGeToESBTN;
|
||||
public final RadioButton rsisaSpToESBTN;
|
||||
public RadioButton lastCreationSelected;
|
||||
public final ToggleGroup sqlStyleGroup;
|
||||
public final RadioButton mySqlStyle;
|
||||
public final RadioButton msSqlStyle;
|
||||
@ -86,13 +82,6 @@ public class B3
|
||||
public final CheckBox generateInsertsCB;
|
||||
public final CheckBox singleInsertStatementCB;
|
||||
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 MenuItem menuCutMI;
|
||||
public final MenuItem menuCopyMI;
|
||||
@ -116,6 +105,16 @@ public class B3
|
||||
public final MenuItem mergeModelsMI;
|
||||
public final A2 controller;
|
||||
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 ArrayList<Graphic_Main_Elem> toCopyElements;
|
||||
private V1 progress;
|
||||
@ -131,18 +130,14 @@ public class B3
|
||||
treeBorderPane.setBackground(C2.AppBackground);
|
||||
|
||||
|
||||
|
||||
this.verticalBox = new VBox();
|
||||
|
||||
verticalBox.setBackground(C2.AppBackground);
|
||||
|
||||
|
||||
|
||||
|
||||
this.controller = new A2(this);
|
||||
|
||||
|
||||
|
||||
this.tabPane = new TabPane();
|
||||
|
||||
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));
|
||||
|
||||
|
||||
@ -213,7 +207,6 @@ public class B3
|
||||
});
|
||||
|
||||
|
||||
|
||||
VBox vBox = new VBox();
|
||||
|
||||
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)));
|
||||
|
||||
|
||||
@ -285,7 +277,6 @@ public class B3
|
||||
this.treeBorderPane.setTop(this.fptree);
|
||||
|
||||
|
||||
|
||||
this.graphicElemLV = new ListView<>();
|
||||
graphicElemLV.setBackground(C2.AppBackground);
|
||||
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("R-Model", this.verticalBox));
|
||||
|
||||
|
||||
|
||||
this.treeBorderPane.setCenter(this.infoTabPane);
|
||||
|
||||
|
||||
|
||||
this.selectModeBTN = new RadioButton("Selection Mode");
|
||||
this.selectModeBTN.setFont(Font.font(null, FontWeight.BOLD, 11.0D));
|
||||
this.selectModeBTN.setStyle("-fx-text-fill:white");
|
||||
@ -454,7 +441,6 @@ public class B3
|
||||
setMouseHandler(this.textWithoutBorderElemBTN);
|
||||
|
||||
|
||||
|
||||
imageView = new ImageView(C2.esImage);
|
||||
imageView.setFitHeight(C2.imageHeight);
|
||||
imageView.setFitWidth(C2.imageWidth);
|
||||
@ -470,7 +456,6 @@ public class B3
|
||||
this.esBTN.setTooltip(new Tooltip("Entity set"));
|
||||
|
||||
|
||||
|
||||
imageView = new ImageView(C2.es_weakImage);
|
||||
imageView.setFitHeight(C2.imageHeight);
|
||||
imageView.setFitWidth(C2.imageWidth);
|
||||
@ -510,7 +495,6 @@ public class B3
|
||||
this.rsBTN.setTooltip(new Tooltip("Relationship"));
|
||||
|
||||
|
||||
|
||||
imageView = new ImageView(C2.rs_idImage);
|
||||
imageView.setFitHeight(C2.imageHeight);
|
||||
imageView.setFitWidth(C2.imageWidth);
|
||||
@ -615,7 +599,6 @@ public class B3
|
||||
this.attrDerivedMultiBTN.setTooltip(new Tooltip("Derived multi-value-attribute"));
|
||||
|
||||
|
||||
|
||||
imageView = new ImageView(C2.attr_conn_attrImage);
|
||||
imageView.setFitHeight(C2.imageHeight);
|
||||
imageView.setFitWidth(C2.imageWidth);
|
||||
@ -730,7 +713,8 @@ public class B3
|
||||
B3.this.generateRelationalModelCB.setSelected(false);
|
||||
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 {
|
||||
|
||||
@ -756,34 +740,6 @@ public class B3
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.generateInsertsCB = new CheckBox("Generate insert statement");
|
||||
this.generateInsertsCB.setTooltip(new Tooltip("If selected, insert statements are generated in the ddl-script"));
|
||||
setMouseHandler(this.generateInsertsCB);
|
||||
@ -802,7 +758,6 @@ public class B3
|
||||
this.addCurrentDateToDatabaseNameCB.setSelected(false);
|
||||
|
||||
|
||||
|
||||
this.sqlStyleGroup = new ToggleGroup();
|
||||
this.mySqlStyle = new RadioButton("MySQL");
|
||||
this.mySqlStyle.setTooltip(new Tooltip("Creates a MySQL style script"));
|
||||
@ -822,7 +777,6 @@ public class B3
|
||||
int ci = 0, ri = 0;
|
||||
|
||||
|
||||
|
||||
this.buttonPane.add(this.selectModeBTN, ci, ri++, 2, 1);
|
||||
|
||||
|
||||
@ -848,23 +802,6 @@ public class B3
|
||||
this.buttonPane.add(labeledSeparator, 0, ri++, 2, 1);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
VBox vbox0 = new VBox(10.0D);
|
||||
HBox hbox0 = new HBox(10.0D);
|
||||
hbox0.getChildren().addAll(this.textElemBTN, this.textWithoutBorderElemBTN);
|
||||
@ -933,8 +870,6 @@ public class B3
|
||||
this.buttonPane.add(this.generateRelationalModelCB, 0, ri++, 2, 1);
|
||||
|
||||
|
||||
|
||||
|
||||
VBox box = new VBox(10.0D);
|
||||
box.getChildren().addAll(this.addCurrentDateToDatabaseNameCB, this.generateInsertsCB, this.singleInsertStatementCB, this.saveSQLScriptBTN);
|
||||
TitledPane createddl = new TitledPane("Create DDL", box);
|
||||
@ -1066,76 +1001,29 @@ public class B3
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
for (Tab tab : B3.this.tabPane.getTabs()) {
|
||||
U1 runningTab = (U1)tab;
|
||||
U1 runningTab = (U1) tab;
|
||||
if (runningTab.getText().contains("*")) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ZZ30 mergedModel = new ZZ30(B3.this.thisERMViewFX);
|
||||
try {
|
||||
boolean merged = mergedModel.mergeAllModelsInPanes();
|
||||
if (!merged)
|
||||
{
|
||||
if (!merged) {
|
||||
return;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
catch (ClassNotFoundException|IOException e) {
|
||||
} catch (ClassNotFoundException | IOException e) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
B3.this.currentTab = B3.this.addNewTab(null);
|
||||
|
||||
for (Graphic_Main_Elem gme : mergedModel.getGraphicElements()) {
|
||||
@ -1157,9 +1045,6 @@ public class B3
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.menuVisibility = new Menu("_Visibility");
|
||||
this.menuVisibility.setDisable(true);
|
||||
this.menuVisibilityAllRMI = new RadioMenuItem("All");
|
||||
@ -1180,8 +1065,6 @@ public class B3
|
||||
tggroup.getToggles().addAll(this.menuVisibilityAllRMI, this.menuVisibilityES_RSRMI, this.menuVisibilityES_RS_KEYRMI);
|
||||
|
||||
|
||||
|
||||
|
||||
Menu menuHelp = new Menu("_Help");
|
||||
this.menuVersionMI = new MenuItem("Version");
|
||||
this.menuVersionMI.addEventHandler(ActionEvent.ACTION, this.controller);
|
||||
@ -1220,8 +1103,6 @@ public class B3
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void exportModel() {
|
||||
FileChooser fc = new FileChooser();
|
||||
fc.setInitialDirectory(new File("/"));
|
||||
@ -1230,7 +1111,8 @@ public class B3
|
||||
File file = fc.showSaveDialog(this);
|
||||
if (file != null) {
|
||||
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();
|
||||
sp.setFill(Paint.valueOf("rgb(27, 27, 30)"));
|
||||
ImageIO.write(SwingFXUtils.fromFXImage(this.currentTab.canvas.snapshot(sp, wi), null), "png", file);
|
||||
@ -1241,8 +1123,6 @@ public class B3
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean saveModelAs() {
|
||||
if (this.currentTab == null || this.currentTab.canvas == null) return false;
|
||||
|
||||
@ -1278,10 +1158,6 @@ public class B3
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void saveSQLScript() throws ZZ20 {
|
||||
if (this.currentTab == null || this.currentTab.canvas == null)
|
||||
return;
|
||||
@ -1290,9 +1166,9 @@ public class B3
|
||||
|
||||
LocalDate today = LocalDate.now();
|
||||
String currentDate = "";
|
||||
if (this.addCurrentDateToDatabaseNameCB.isSelected())
|
||||
{
|
||||
currentDate = today.getYear() + ((today.getMonthValue() < 10) ? ("0" + today.getMonthValue()) : ""+ today.getMonthValue()) + ((today.getDayOfMonth() < 10) ? ("0" + today.getDayOfMonth()) : ""+ today.getDayOfMonth()); }
|
||||
if (this.addCurrentDateToDatabaseNameCB.isSelected()) {
|
||||
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.getExtensionFilters().add(new FileChooser.ExtensionFilter("*.SQL", "*.sql"));
|
||||
fc.setTitle("Save sql script as ...");
|
||||
@ -1312,23 +1188,27 @@ public class B3
|
||||
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.singleInsertStatementCB.isSelected()); }
|
||||
|
||||
else if (B3.this.msSqlStyle.isSelected()) { sb = B3.this.currentTab.canvas.dsfdsfd45645zr().create_MS_SQL_Script(B3.this.generateInsertsCB.isSelected(),
|
||||
B3.this.singleInsertStatementCB.isSelected());
|
||||
} else if (B3.this.msSqlStyle.isSelected()) {
|
||||
sb = B3.this.currentTab.canvas.dsfdsfd45645zr().create_MS_SQL_Script(B3.this.generateInsertsCB.isSelected(),
|
||||
B3.this.addCurrentDateToDatabaseNameCB.isSelected(),
|
||||
B3.this.singleInsertStatementCB.isSelected()); }
|
||||
B3.this.singleInsertStatementCB.isSelected());
|
||||
}
|
||||
|
||||
assert sb != null;
|
||||
fw.write(sb.toString());
|
||||
fw.close();
|
||||
|
||||
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(() -> {
|
||||
@ -1337,13 +1217,15 @@ public class B3
|
||||
});
|
||||
});
|
||||
this.progress.setThread(t);
|
||||
try { t.join(); } catch (InterruptedException ignored) {}
|
||||
try {
|
||||
t.join();
|
||||
} catch (InterruptedException ignored) {
|
||||
}
|
||||
|
||||
this.borderPane.setDisable(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
String databaseName = this.currentTab.getText().replace(".erm", "") + "db";
|
||||
this.currentTab.canvas.dsfdsfd45645zr().setDatabaseName(databaseName);
|
||||
}
|
||||
@ -1377,15 +1259,14 @@ public class B3
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void readModel() {
|
||||
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())); }
|
||||
else { fc.setInitialDirectory(new File("/")); }
|
||||
if (this.currentTab != null && this.currentTab.canvas != null && this.currentTab.canvas.getInitialDirectory() != null) {
|
||||
fc.setInitialDirectory(new File(this.currentTab.canvas.getSaveFile().getParentFile().getAbsolutePath()));
|
||||
} else {
|
||||
fc.setInitialDirectory(new File("/"));
|
||||
}
|
||||
fc.getExtensionFilters().add(new FileChooser.ExtensionFilter("ERM", "*.erm"));
|
||||
fc.setTitle("Open model");
|
||||
File file = fc.showOpenDialog(this);
|
||||
@ -1397,7 +1278,7 @@ public class B3
|
||||
this.currentTab.canvas.setInitialDirectory(file.getParentFile().getAbsolutePath());
|
||||
try {
|
||||
ObjectInputStream ro = new ObjectInputStream(new FileInputStream(file));
|
||||
@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();
|
||||
|
||||
|
||||
for (Graphic_Main_Elem gme : readModel) {
|
||||
@ -1413,8 +1294,6 @@ public class B3
|
||||
this.currentTab.canvas.sdfsdfds3465er(true);
|
||||
|
||||
|
||||
|
||||
|
||||
this.currentTab.canvas.setSaveFile(file);
|
||||
this.currentTab.setText(file.getName());
|
||||
this.tabPane.getSelectionModel().select(this.currentTab);
|
||||
@ -1443,16 +1322,11 @@ public class B3
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setCurrentTab(U1 currentTab) {
|
||||
this.currentTab = currentTab;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public U1 addNewTab(File modelFromFile) {
|
||||
int number = this.tabPane.getTabs().size();
|
||||
|
||||
@ -1462,24 +1336,16 @@ public class B3
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public ArrayList<Graphic_Main_Elem> getToCopyElements() {
|
||||
return this.toCopyElements;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setToCopyElements(ArrayList<Graphic_Main_Elem> toCopyElements) {
|
||||
this.toCopyElements = toCopyElements;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void setMouseHandler(final Labeled node) {
|
||||
node.setOnMouseEntered(event -> {
|
||||
B3.this.getScene().getRoot().setCursor(Cursor.HAND);
|
||||
|
@ -1,57 +1,58 @@
|
||||
package at.fos.ermodel.gui;
|
||||
package at.fos.ermodel.gui;
|
||||
|
||||
import javafx.event.Event;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.Cursor;
|
||||
import javafx.scene.control.Alert;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.ButtonType;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.layout.Background;
|
||||
import javafx.scene.layout.BackgroundFill;
|
||||
import javafx.scene.layout.CornerRadii;
|
||||
import javafx.scene.layout.StackPane;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.StageStyle;
|
||||
import javafx.stage.Window;
|
||||
import java.util.Optional;
|
||||
import javafx.event.Event;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.Cursor;
|
||||
import javafx.scene.control.Alert;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.ButtonType;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.layout.Background;
|
||||
import javafx.scene.layout.BackgroundFill;
|
||||
import javafx.scene.layout.CornerRadii;
|
||||
import javafx.scene.layout.StackPane;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.StageStyle;
|
||||
import javafx.stage.Window;
|
||||
|
||||
public class C1
|
||||
{
|
||||
import java.util.Optional;
|
||||
|
||||
public class C1 {
|
||||
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) {
|
||||
Alert alert = setAlert(window, alertType, title, header, contentText, image);
|
||||
|
||||
Button button = (Button)alert.getDialogPane().lookupButton(ButtonType.OK);
|
||||
Button button = (Button) alert.getDialogPane().lookupButton(ButtonType.OK);
|
||||
if (button != null) {
|
||||
setButtonLookAndFeel(button, okBtnText, btnBackgroundColor, btnSelectedColor, btnFocusColor);
|
||||
}
|
||||
|
||||
button = (Button)alert.getDialogPane().lookupButton(ButtonType.CANCEL);
|
||||
if (button != null) setButtonLookAndFeel(button, cancelBtnText, btnBackgroundColor, btnSelectedColor, btnFocusColor);
|
||||
button = (Button) alert.getDialogPane().lookupButton(ButtonType.CANCEL);
|
||||
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);
|
||||
|
||||
button = (Button)alert.getDialogPane().lookupButton(ButtonType.CLOSE);
|
||||
button = (Button) alert.getDialogPane().lookupButton(ButtonType.CLOSE);
|
||||
if (button != null) setButtonLookAndFeel(button, null, btnBackgroundColor, btnSelectedColor, btnFocusColor);
|
||||
|
||||
button = (Button)alert.getDialogPane().lookupButton(ButtonType.FINISH);
|
||||
button = (Button) alert.getDialogPane().lookupButton(ButtonType.FINISH);
|
||||
if (button != null) setButtonLookAndFeel(button, null, btnBackgroundColor, btnSelectedColor, btnFocusColor);
|
||||
|
||||
button = (Button)alert.getDialogPane().lookupButton(ButtonType.NEXT);
|
||||
button = (Button) alert.getDialogPane().lookupButton(ButtonType.NEXT);
|
||||
if (button != null) setButtonLookAndFeel(button, null, btnBackgroundColor, btnSelectedColor, btnFocusColor);
|
||||
|
||||
button = (Button)alert.getDialogPane().lookupButton(ButtonType.NO);
|
||||
button = (Button) alert.getDialogPane().lookupButton(ButtonType.NO);
|
||||
if (button != null) setButtonLookAndFeel(button, null, btnBackgroundColor, btnSelectedColor, btnFocusColor);
|
||||
|
||||
button = (Button)alert.getDialogPane().lookupButton(ButtonType.PREVIOUS);
|
||||
button = (Button) alert.getDialogPane().lookupButton(ButtonType.PREVIOUS);
|
||||
if (button != null) setButtonLookAndFeel(button, null, btnBackgroundColor, btnSelectedColor, btnFocusColor);
|
||||
|
||||
button = (Button)alert.getDialogPane().lookupButton(ButtonType.YES);
|
||||
button = (Button) alert.getDialogPane().lookupButton(ButtonType.YES);
|
||||
if (button != null) setButtonLookAndFeel(button, null, btnBackgroundColor, btnSelectedColor, btnFocusColor);
|
||||
|
||||
if (showAndWait) {
|
||||
@ -91,18 +92,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private Alert setAlert(Window window, Alert.AlertType alertType, String title, String header, String contentText, Image image) {
|
||||
Alert alert = new Alert(alertType);
|
||||
alert.setTitle(title);
|
||||
@ -113,22 +102,19 @@
|
||||
|
||||
|
||||
StackPane iv = switch (alertType) {
|
||||
case ERROR ->
|
||||
C2.alerterror;
|
||||
case INFORMATION ->
|
||||
C2.alertinformation;
|
||||
default ->
|
||||
C2.alertconfirmation;
|
||||
case ERROR -> C2.alerterror;
|
||||
case INFORMATION -> C2.alertinformation;
|
||||
default -> C2.alertconfirmation;
|
||||
};
|
||||
alert.setGraphic(iv);
|
||||
|
||||
alert.getDialogPane().getChildren().stream().filter(node -> node instanceof Label).forEach(node -> ((Label)node).setMinHeight(Double.NEGATIVE_INFINITY));
|
||||
alert.getDialogPane().getChildren().stream().filter(node -> node instanceof Label).forEach(node -> ((Label)node).setMinWidth(Double.NEGATIVE_INFINITY));
|
||||
alert.getDialogPane().getChildren().stream().filter(node -> node instanceof Label).forEach(node -> ((Label)node).setMaxWidth(Double.NEGATIVE_INFINITY));
|
||||
alert.getDialogPane().getChildren().stream().filter(node -> node instanceof Label).forEach(node -> ((Label) node).setMinHeight(Double.NEGATIVE_INFINITY));
|
||||
alert.getDialogPane().getChildren().stream().filter(node -> node instanceof Label).forEach(node -> ((Label) node).setMinWidth(Double.NEGATIVE_INFINITY));
|
||||
alert.getDialogPane().getChildren().stream().filter(node -> node instanceof Label).forEach(node -> ((Label) node).setMaxWidth(Double.NEGATIVE_INFINITY));
|
||||
|
||||
alert.getDialogPane().setBackground(new Background(new BackgroundFill(Color.GAINSBORO, CornerRadii.EMPTY, Insets.EMPTY)));
|
||||
|
||||
Stage stage = (Stage)alert.getDialogPane().getScene().getWindow();
|
||||
Stage stage = (Stage) alert.getDialogPane().getScene().getWindow();
|
||||
|
||||
|
||||
if (image != null) {
|
||||
@ -147,11 +133,9 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Optional<ButtonType> getResult() {
|
||||
return this.result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,26 +1,25 @@
|
||||
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.scene.image.Image;
|
||||
import javafx.scene.layout.Background;
|
||||
import javafx.scene.layout.BackgroundFill;
|
||||
import javafx.scene.layout.CornerRadii;
|
||||
import javafx.scene.layout.StackPane;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.scene.text.Font;
|
||||
import javafx.scene.text.FontWeight;
|
||||
import javafx.scene.text.Text;
|
||||
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.layout.Background;
|
||||
import javafx.scene.layout.BackgroundFill;
|
||||
import javafx.scene.layout.CornerRadii;
|
||||
import javafx.scene.layout.StackPane;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.scene.text.Font;
|
||||
import javafx.scene.text.FontWeight;
|
||||
import javafx.scene.text.Text;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.Objects;
|
||||
|
||||
public class C2
|
||||
{
|
||||
public class C2 {
|
||||
public static final Color MouseSelectedColor = Color.RED;
|
||||
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);
|
||||
|
||||
public static final Color ERMDockablePointColor = Color.rgb(236, 234, 241);
|
||||
public static final Color ERMTextBorderColor = Color.GREY;
|
||||
@ -42,7 +41,7 @@
|
||||
|
||||
public static Color ERMSelectedColor = Color.RED;
|
||||
|
||||
public static Color ERMESColor = Color.rgb(0,255,0);
|
||||
public static Color ERMESColor = Color.rgb(0, 255, 0);
|
||||
|
||||
public static Color ERMRSColor = Color.AQUA;
|
||||
public static Color ERMRSConnColor = Color.AQUA;
|
||||
@ -94,9 +93,6 @@
|
||||
public static HashMap<String, BufferedReader> randomDataFilesExtern = new HashMap<>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public C2() {
|
||||
|
||||
alerterror.getStyleClass().add("alert.error.dialog-pane");
|
||||
@ -108,48 +104,48 @@
|
||||
String appData = "/data/";
|
||||
|
||||
|
||||
randomDataFiles.put("Random Color", getClass().getResourceAsStream(appData+"colors.txt"));
|
||||
randomDataFiles.put("Random Company", getClass().getResourceAsStream(appData+"companies.txt"));
|
||||
randomDataFiles.put("Random Country", getClass().getResourceAsStream(appData+"countries.txt"));
|
||||
randomDataFiles.put("Random Departmentname", getClass().getResourceAsStream(appData+"departmentnames.txt"));
|
||||
randomDataFiles.put("Random Firstname", getClass().getResourceAsStream(appData+"firstnames.txt"));
|
||||
randomDataFiles.put("Random Jobname", getClass().getResourceAsStream(appData+"jobnames.txt"));
|
||||
randomDataFiles.put("Random Language", getClass().getResourceAsStream(appData+"languages.txt"));
|
||||
randomDataFiles.put("Random Lastname", getClass().getResourceAsStream(appData+"lastnames.txt"));
|
||||
randomDataFiles.put("Random Mediacategory", getClass().getResourceAsStream(appData+"mediacategories.txt"));
|
||||
randomDataFiles.put("Random Mediapublisher", getClass().getResourceAsStream(appData+"mediapublishers.txt"));
|
||||
randomDataFiles.put("Random Mediatitle", getClass().getResourceAsStream(appData+"mediatitles.txt"));
|
||||
randomDataFiles.put("Random Mediatype", getClass().getResourceAsStream(appData+"mediatypes.txt"));
|
||||
randomDataFiles.put("Random Place", getClass().getResourceAsStream(appData+"places.txt"));
|
||||
randomDataFiles.put("Random Profession", getClass().getResourceAsStream(appData+"professions.txt"));
|
||||
randomDataFiles.put("Random Rentalequipment", getClass().getResourceAsStream(appData+"rentalequipment.txt"));
|
||||
randomDataFiles.put("Random Street", getClass().getResourceAsStream(appData+"streets.txt"));
|
||||
randomDataFiles.put("Random Color", getClass().getResourceAsStream(appData + "colors.txt"));
|
||||
randomDataFiles.put("Random Company", getClass().getResourceAsStream(appData + "companies.txt"));
|
||||
randomDataFiles.put("Random Country", getClass().getResourceAsStream(appData + "countries.txt"));
|
||||
randomDataFiles.put("Random Departmentname", getClass().getResourceAsStream(appData + "departmentnames.txt"));
|
||||
randomDataFiles.put("Random Firstname", getClass().getResourceAsStream(appData + "firstnames.txt"));
|
||||
randomDataFiles.put("Random Jobname", getClass().getResourceAsStream(appData + "jobnames.txt"));
|
||||
randomDataFiles.put("Random Language", getClass().getResourceAsStream(appData + "languages.txt"));
|
||||
randomDataFiles.put("Random Lastname", getClass().getResourceAsStream(appData + "lastnames.txt"));
|
||||
randomDataFiles.put("Random Mediacategory", getClass().getResourceAsStream(appData + "mediacategories.txt"));
|
||||
randomDataFiles.put("Random Mediapublisher", getClass().getResourceAsStream(appData + "mediapublishers.txt"));
|
||||
randomDataFiles.put("Random Mediatitle", getClass().getResourceAsStream(appData + "mediatitles.txt"));
|
||||
randomDataFiles.put("Random Mediatype", getClass().getResourceAsStream(appData + "mediatypes.txt"));
|
||||
randomDataFiles.put("Random Place", getClass().getResourceAsStream(appData + "places.txt"));
|
||||
randomDataFiles.put("Random Profession", getClass().getResourceAsStream(appData + "professions.txt"));
|
||||
randomDataFiles.put("Random Rentalequipment", getClass().getResourceAsStream(appData + "rentalequipment.txt"));
|
||||
randomDataFiles.put("Random Street", getClass().getResourceAsStream(appData + "streets.txt"));
|
||||
|
||||
applicationImageIconAsICO = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"erdlogo.png")));
|
||||
attr_conn_attrImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"attr_conn_attr.png")));
|
||||
attr_conn_esImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"attr_conn_es.png")));
|
||||
attr_conn_rsImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"attr_conn_rs.png")));
|
||||
attr_derived_multi_valueImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"attr_derived_multi_value.png")));
|
||||
attr_derived_one_valueImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"attr_derived_one_value.png")));
|
||||
attr_key_valueImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"attr_key_value.png")));
|
||||
attr_multi_valueImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"attr_multi_value.png")));
|
||||
attr_one_valueImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"attr_one_value.png")));
|
||||
attr_weak_key_valueImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"attr_weak_key_value.png")));
|
||||
es_associativeImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"es_associative.png")));
|
||||
es_weakImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"es_weak.png")));
|
||||
esImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"es.png")));
|
||||
rs_conn_esImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"rs_conn_es.png")));
|
||||
rs_id_conn_es_weakImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"rs_id_conn_es_weak.png")));
|
||||
rs_id_conn_esImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"rs_id_conn_es.png")));
|
||||
rs_idImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"rs_id.png")));
|
||||
rs_isa_conn_general_esImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"rs_isa_conn_general_es.png")));
|
||||
rs_isa_conn_special_esImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"rs_isa_conn_special_es.png")));
|
||||
rs_isaImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"rs_isa.png")));
|
||||
rsImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"rs.png")));
|
||||
textImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"text.png")));
|
||||
textWithoutBorderImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"text_without_border.png")));
|
||||
treeOpenImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"tree_open.png")));
|
||||
treeCloseImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages+"tree_close.png")));
|
||||
applicationImageIconAsICO = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "erdlogo.png")));
|
||||
attr_conn_attrImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "attr_conn_attr.png")));
|
||||
attr_conn_esImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "attr_conn_es.png")));
|
||||
attr_conn_rsImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "attr_conn_rs.png")));
|
||||
attr_derived_multi_valueImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "attr_derived_multi_value.png")));
|
||||
attr_derived_one_valueImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "attr_derived_one_value.png")));
|
||||
attr_key_valueImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "attr_key_value.png")));
|
||||
attr_multi_valueImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "attr_multi_value.png")));
|
||||
attr_one_valueImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "attr_one_value.png")));
|
||||
attr_weak_key_valueImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "attr_weak_key_value.png")));
|
||||
es_associativeImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "es_associative.png")));
|
||||
es_weakImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "es_weak.png")));
|
||||
esImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "es.png")));
|
||||
rs_conn_esImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "rs_conn_es.png")));
|
||||
rs_id_conn_es_weakImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "rs_id_conn_es_weak.png")));
|
||||
rs_id_conn_esImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "rs_id_conn_es.png")));
|
||||
rs_idImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "rs_id.png")));
|
||||
rs_isa_conn_general_esImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "rs_isa_conn_general_es.png")));
|
||||
rs_isa_conn_special_esImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "rs_isa_conn_special_es.png")));
|
||||
rs_isaImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "rs_isa.png")));
|
||||
rsImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "rs.png")));
|
||||
textImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "text.png")));
|
||||
textWithoutBorderImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "text_without_border.png")));
|
||||
treeOpenImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "tree_open.png")));
|
||||
treeCloseImage = new Image(Objects.requireNonNull(getClass().getResourceAsStream(appImages + "tree_close.png")));
|
||||
}
|
||||
|
||||
public static double computeTextWidth(String text, double wrappingWidth) {
|
||||
@ -167,4 +163,4 @@
|
||||
public static double computeTextHeight() {
|
||||
return ERMFont.getSize();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,8 +1,11 @@
|
||||
package at.fos.ermodel.gui;
|
||||
public class C3
|
||||
implements Comparable<C3>
|
||||
{
|
||||
package at.fos.ermodel.gui;
|
||||
|
||||
public class C3
|
||||
implements Comparable<C3> {
|
||||
private final String columnName;
|
||||
protected String dataGenerationType;
|
||||
protected String par1;
|
||||
protected String par2;
|
||||
private String datatype;
|
||||
private boolean isKey;
|
||||
private boolean isNullable;
|
||||
@ -11,9 +14,6 @@
|
||||
private long autoincrementStartAt;
|
||||
private T2 referencesTo;
|
||||
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) {
|
||||
this.columnName = columnName;
|
||||
@ -29,25 +29,6 @@
|
||||
this.par1 = par1;
|
||||
this.par2 = par2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public C3(String columnName) {
|
||||
@ -55,9 +36,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String getColumnName() {
|
||||
return this.columnName;
|
||||
}
|
||||
@ -105,8 +83,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
@ -114,15 +90,13 @@
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
C3 other = (C3)obj;
|
||||
C3 other = (C3) obj;
|
||||
if (this.columnName == null) {
|
||||
return other.columnName == null;
|
||||
} else return this.columnName.equals(other.columnName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public String toString() {
|
||||
return "RM_Column [columnName=" + this.columnName + ", datatype=" + this.datatype + ", isKey=" + this.isKey + ", isNullable=" +
|
||||
this.isNullable + ", isUnique=" + this.isUnique + ", isAutoincrement=" + this.isAutoincrement + ", referencesTo=" +
|
||||
@ -131,8 +105,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public int compareTo(C3 o) {
|
||||
if (this.isKey && !o.isKey) return -1;
|
||||
if (!this.isKey && o.isKey) return 1;
|
||||
@ -140,12 +112,9 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public long getReferstoGraphicalElement() {
|
||||
return this.referstoGraphicalElement;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,38 +1,20 @@
|
||||
package at.fos.ermodel.gui;
|
||||
package at.fos.ermodel.gui;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import javafx.application.Platform;
|
||||
import javafx.application.Platform;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public class C4
|
||||
{
|
||||
public class C4 {
|
||||
private String databaseName;
|
||||
private ArrayList<T1> tables;
|
||||
private StringBuffer sqlScript;
|
||||
@ -43,95 +25,57 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean addTable(T1 table) {
|
||||
if (this.tables.contains(table)) return true;
|
||||
return !this.tables.add(table);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void removeTable(T1 table) {
|
||||
this.tables.remove(table);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public String getDatabaseName() {
|
||||
return this.databaseName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setDatabaseName(String databaseName) {
|
||||
this.databaseName = databaseName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String toString() {
|
||||
return "RM_Database [databaseName=" + this.databaseName + ", tables=" + this.tables + "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public ArrayList<T1> getTables() {
|
||||
return this.tables;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setTables(ArrayList<T1> tables) {
|
||||
this.tables = tables;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void sortByTableName() {
|
||||
Collections.sort(this.tables);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private String addChars() {
|
||||
return String.valueOf(' ').repeat(5);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public StringBuffer create_MS_SQL_Script(boolean createInsertStatements, boolean addCDToDBName, boolean singeInserts) throws ZZ20 {
|
||||
LocalDate today = LocalDate.now();
|
||||
String currentDate = today.getYear() + (
|
||||
(today.getMonthValue() < 10) ? ("0" + today.getMonthValue()) : ""+ today.getMonthValue()) + (
|
||||
(today.getDayOfMonth() < 10) ? ("0" + today.getDayOfMonth()) : ""+ today.getDayOfMonth());
|
||||
(today.getMonthValue() < 10) ? ("0" + today.getMonthValue()) : "" + today.getMonthValue()) + (
|
||||
(today.getDayOfMonth() < 10) ? ("0" + today.getDayOfMonth()) : "" + today.getDayOfMonth());
|
||||
|
||||
|
||||
if (addCDToDBName) this.databaseName = this.databaseName + currentDate;
|
||||
@ -178,8 +122,7 @@
|
||||
keypart.append(")").append("\n");
|
||||
this.sqlScript = this.sqlScript.append(addChars()).append(keypart).append(")");
|
||||
this.sqlScript.append(";\n\n");
|
||||
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());
|
||||
@ -215,8 +158,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
ArrayList<C3> equalColumnsBecauseRecursive = new ArrayList<>();
|
||||
for (int i = 0; i < fkColumns.size(); i++) {
|
||||
for (int j = i + 1; j < fkColumns.size(); j++) {
|
||||
@ -263,27 +204,11 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public StringBuffer create_MySQL_Script(boolean createInsertStatements, boolean addCDToDBName, boolean singeInserts) throws ZZ20 {
|
||||
LocalDate today = LocalDate.now();
|
||||
String currentDate = today.getYear() + (
|
||||
(today.getMonthValue() < 10) ? ("0" + today.getMonthValue()) : ""+ today.getMonthValue()) + (
|
||||
(today.getDayOfMonth() < 10) ? ("0" + today.getDayOfMonth()) : ""+ today.getDayOfMonth());
|
||||
(today.getMonthValue() < 10) ? ("0" + today.getMonthValue()) : "" + today.getMonthValue()) + (
|
||||
(today.getDayOfMonth() < 10) ? ("0" + today.getDayOfMonth()) : "" + today.getDayOfMonth());
|
||||
|
||||
|
||||
if (addCDToDBName) this.databaseName = currentDate + this.databaseName;
|
||||
@ -329,8 +254,7 @@
|
||||
this.sqlScript = this.sqlScript.append(addChars()).append(keypart).append(")");
|
||||
if (autoincrementCounter == 1) {
|
||||
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());
|
||||
}
|
||||
this.sqlScript.append(";\n\n");
|
||||
@ -357,7 +281,8 @@
|
||||
if (column.getReferencesTo() != null) fkColumns.add(column);
|
||||
}
|
||||
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<>();
|
||||
@ -366,8 +291,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
ArrayList<C3> equalColumnsBecauseRecursive = new ArrayList<>();
|
||||
for (int i = 0; i < fkColumns.size(); i++) {
|
||||
for (int j = i + 1; j < fkColumns.size(); j++) {
|
||||
@ -412,12 +335,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void allColumnsSetForGeneration() throws ZZ20 {
|
||||
for (T1 table : this.tables) {
|
||||
for (C3 column : table.getSkjdfhgdskjf674534()) {
|
||||
@ -432,10 +349,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void allTablesSetForGeneration() throws ZZ20 {
|
||||
for (T1 table : this.tables) {
|
||||
if (!table.isCreateInserts()) {
|
||||
@ -445,15 +358,12 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private String generateRandomValue(C3 column) throws ZZ20 {
|
||||
String randomValue;
|
||||
try { String[] datumteil; LocalDate from, till; String str;
|
||||
try {
|
||||
String[] datumteil;
|
||||
LocalDate from, till;
|
||||
String str;
|
||||
switch ((str = column.dataGenerationType).hashCode()) {
|
||||
case -1601184309 -> {
|
||||
if (!str.equals("Random Boolean")) {
|
||||
@ -494,12 +404,12 @@
|
||||
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) {
|
||||
@ -512,19 +422,19 @@
|
||||
}
|
||||
} else {
|
||||
randomDataAsList = T3.randomData.get(column.dataGenerationType);
|
||||
} if (randomDataAsList != null) return randomDataAsList.size();
|
||||
}
|
||||
if (randomDataAsList != null) return randomDataAsList.size();
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void createFilehandleForExternalDataSources() throws ZZ20 {
|
||||
for (T1 table : this.tables) {
|
||||
for (C3 column : table.getSkjdfhgdskjf674534()) {
|
||||
if (column.dataGenerationType == null ||
|
||||
!column.dataGenerationType.equals("Extern"))
|
||||
continue; BufferedReader br = C2.randomDataFilesExtern.get(column.par1);
|
||||
continue;
|
||||
BufferedReader br = C2.randomDataFilesExtern.get(column.par1);
|
||||
if (br == null) {
|
||||
|
||||
BufferedReader fr;
|
||||
@ -542,12 +452,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void createDependency() {
|
||||
for (T1 table : this.tables) {
|
||||
for (C3 column : table.getSkjdfhgdskjf674534()) {
|
||||
@ -567,31 +471,24 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private HashMap<String, ArrayList<String>> initializeColumns() {
|
||||
HashMap<String, ArrayList<String>> holdValues = new HashMap<>();
|
||||
for (T1 table : this.tables) {
|
||||
|
||||
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())
|
||||
continue; holdValues.put(table.getTablename() + "." + column.getColumnName(), null);
|
||||
continue;
|
||||
holdValues.put(table.getTablename() + "." + column.getColumnName(), null);
|
||||
}
|
||||
}
|
||||
return holdValues;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private T1 getTableGivenTablename(String tablename) {
|
||||
for (T1 table : this.tables) {
|
||||
if (table.getTablename().equals(tablename)) return table;
|
||||
@ -600,17 +497,13 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private boolean allColumnValuesCreated(HashMap<String, ArrayList<String>> columnValues) {
|
||||
int counter = 0;
|
||||
for (T1 table : this.tables) {
|
||||
|
||||
if (!table.isCreateInserts())
|
||||
continue; for (C3 column : table.getSkjdfhgdskjf674534()) {
|
||||
continue;
|
||||
for (C3 column : table.getSkjdfhgdskjf674534()) {
|
||||
ArrayList<String> values = columnValues.get(table.getTablename() + "." + column.getColumnName());
|
||||
if (values != null && values.size() > 0) counter++;
|
||||
}
|
||||
@ -619,13 +512,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void allDependentCreated(T1 table, HashMap<String, ArrayList<String>> createdColumns) {
|
||||
for (T1 dependsOn : table.getDependsOnTable()) {
|
||||
for (C3 column : dependsOn.getSkjdfhgdskjf674534()) {
|
||||
@ -638,16 +524,10 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private HashMap<String, ArrayList<String>> createColumnValues() throws ZZ20 {
|
||||
Platform.runLater(() -> V1.thisActionMessageDialog.getShowFilename().setText("create column values"));
|
||||
|
||||
|
||||
|
||||
HashMap<String, ArrayList<String>> columnValues = initializeColumns();
|
||||
|
||||
createFilehandleForExternalDataSources();
|
||||
@ -659,17 +539,6 @@
|
||||
createDependency();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
while (!done) {
|
||||
for (T1 table : this.tables) {
|
||||
for (C3 column : table.getSkjdfhgdskjf674534()) {
|
||||
@ -688,33 +557,28 @@
|
||||
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++) {
|
||||
String randomValue = generateRandomValue(column);
|
||||
|
||||
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);
|
||||
if (x != null) return x;
|
||||
|
||||
}
|
||||
else if (column.getReferencesTo() != null && !valuesExist) {
|
||||
} else if (column.getReferencesTo() != null && !valuesExist) {
|
||||
|
||||
getStringArrayListHashMap(columnValues, table, column, values);
|
||||
|
||||
}
|
||||
else if (!valuesExist) {
|
||||
} else if (!valuesExist) {
|
||||
|
||||
if (column.isUnique()) {
|
||||
|
||||
int numberPossibleValues = getNumberValuesOfRandomData(column);
|
||||
if (numberPossibleValues != -1)
|
||||
{
|
||||
if (numberPossibleValues != -1) {
|
||||
|
||||
if (numberPossibleValues < table.getJdshfalkajsd677676()) {
|
||||
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) {
|
||||
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());
|
||||
if (valuesPK == null)
|
||||
break; String randomValue = valuesPK.get(i % valuesPK.size());
|
||||
break;
|
||||
String randomValue = valuesPK.get(i % valuesPK.size());
|
||||
|
||||
values.add(String.valueOf(randomValue));
|
||||
}
|
||||
@ -767,7 +631,6 @@
|
||||
HashMap<String, ArrayList<String>> holdPKValuesForFK = createColumnValues();
|
||||
|
||||
|
||||
|
||||
for (T1 table : this.tables) {
|
||||
|
||||
ArrayList<String> keyColumns = new ArrayList<>();
|
||||
@ -788,22 +651,22 @@
|
||||
concatKeyValue.append(valuesPK.get(i));
|
||||
}
|
||||
|
||||
if (!concatKeyValues.contains(concatKeyValue.toString())) { concatKeyValues.add(concatKeyValue.toString()); }
|
||||
else
|
||||
|
||||
{ for (C3 column : table.getSkjdfhgdskjf674534()) {
|
||||
if (!concatKeyValues.contains(concatKeyValue.toString())) {
|
||||
concatKeyValues.add(concatKeyValue.toString());
|
||||
} else {
|
||||
for (C3 column : table.getSkjdfhgdskjf674534()) {
|
||||
ArrayList<String> valuesPK = holdPKValuesForFK.get(table.getTablename() + "." + column.getColumnName());
|
||||
valuesPK.remove(i);
|
||||
holdPKValuesForFK.put(table.getTablename() + "." + column.getColumnName(), valuesPK);
|
||||
}
|
||||
i--;
|
||||
deleted++; }
|
||||
deleted++;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
} catch (IndexOutOfBoundsException ignored) {}
|
||||
|
||||
|
||||
} catch (IndexOutOfBoundsException ignored) {
|
||||
}
|
||||
|
||||
|
||||
table.setJdshfalkajsd677676(table.getJdshfalkajsd677676() - deleted);
|
||||
@ -843,8 +706,7 @@
|
||||
valuespart = new StringBuilder(valuespart.substring(0, valuespart.length() - 1));
|
||||
valuespart.append(")");
|
||||
sqlScript.append(valuespart).append((i < table.getJdshfalkajsd677676() - 1L) ? "," : ";").append("\n");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
addInsertTable(sqlScript, table);
|
||||
sqlScript.append("\t\t(");
|
||||
@ -914,4 +776,4 @@
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -8,8 +8,7 @@ import java.io.Serial;
|
||||
|
||||
public abstract class Graphic_ATTR_Elem
|
||||
extends Graphic_Figure_Elem
|
||||
implements U2
|
||||
{
|
||||
implements U2 {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
protected boolean createColumn;
|
||||
@ -52,10 +51,6 @@ public abstract class Graphic_ATTR_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void changeName(String name) {
|
||||
super.changeName(name);
|
||||
|
||||
@ -76,318 +71,186 @@ public abstract class Graphic_ATTR_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public char sdfsdfdsfdf() {
|
||||
return 'a';
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected Color sefdsfdsf45() {
|
||||
return C2.ERMATTRColor;
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected Color getColorSelected() {
|
||||
return C2.ERMSelectedColor;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean getCreateColumn() {
|
||||
return this.createColumn;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void setCreateColumn(boolean createColumn) {
|
||||
this.createColumn = createColumn;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String getColumnPostfix() {
|
||||
return this.columnPostfix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void setColumnPostfix(String columnPraefix) {
|
||||
this.columnPostfix = columnPraefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String getColumnName() {
|
||||
return this.columnName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void setColumnName(String columnName) {
|
||||
this.columnName = columnName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String getDatatype() {
|
||||
return this.datatype;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void setDatatype(String datatype) {
|
||||
this.datatype = datatype;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean isKey() {
|
||||
return this.isKey;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void setIsKey(boolean isKey) {
|
||||
this.isKey = isKey;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean isAutoincrement() {
|
||||
return this.isAutoincrement;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void setIsAutoincrement(boolean isAutoincrement) {
|
||||
this.isAutoincrement = isAutoincrement;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public long getAutoincrementStartAt() {
|
||||
return this.autoincrementStartAt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void setAutoincrementStartAt(long autoincrementStartAt) {
|
||||
this.autoincrementStartAt = autoincrementStartAt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean isUnique() {
|
||||
return this.isUnique;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void setIsUnique(boolean isUnique) {
|
||||
this.isUnique = isUnique;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean isNullable() {
|
||||
return this.isNullable;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void setIsNullable(boolean isNullable) {
|
||||
this.isNullable = isNullable;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String getMVRelationName() {
|
||||
return this.mvRelationname;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void setMVRelationName(String mvRelationname) {
|
||||
this.mvRelationname = mvRelationname;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String getMVRelationNamePraefix() {
|
||||
return this.mvRelationnamePraefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void setMVRelationNamePraefix(String mvRelationnamePraefix) {
|
||||
this.mvRelationnamePraefix = mvRelationnamePraefix;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public String sdfsdfsd32234243() {
|
||||
return this.name + "@" + this.datatype;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getDataGenerationType() {
|
||||
return this.dataGenerationType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setDataGenerationType(String dataGenerationType) {
|
||||
this.dataGenerationType = dataGenerationType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getPar1() {
|
||||
return this.par1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setPar1(String par1) {
|
||||
this.par1 = par1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getPar2() {
|
||||
return this.par2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setPar2(String par2) {
|
||||
this.par2 = par2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String getPar1_label() {
|
||||
return this.par1_label;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void setPar1_label(String par1_label) {
|
||||
this.par1_label = par1_label;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String getPar2_label() {
|
||||
return this.par2_label;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void setPar2_label(String par2_label) {
|
||||
this.par2_label = par2_label;
|
||||
}
|
||||
|
@ -7,8 +7,7 @@ import java.io.Serial;
|
||||
|
||||
|
||||
public class Graphic_ATTR_Key_Elem
|
||||
extends Graphic_ATTR_Elem
|
||||
{
|
||||
extends Graphic_ATTR_Elem {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -17,11 +16,6 @@ public class Graphic_ATTR_Key_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void dsfdsfds6787686(Color c) {
|
||||
if (!this.isVisible)
|
||||
return;
|
||||
@ -31,7 +25,7 @@ public class Graphic_ATTR_Key_Elem
|
||||
|
||||
this.gc.setFill(C2.ERMTextColor);
|
||||
|
||||
this.gc.setStroke(Color.BLACK);
|
||||
this.gc.setStroke(Color.WHITE);
|
||||
this.gc.fillText(this.name, this.xPos - this.textWidth / 2.0D + 10.0D, this.yPos + this.textHeight / 2.0D - 15.0D);
|
||||
this.gc.strokeLine(this.xPos - this.textWidth / 2.0D + 10.0D,
|
||||
this.yPos + this.textHeight / 2.0D - 13.0D, this.xPos + this.textWidth / 2.0D - 10.0D, this.yPos + this.textHeight / 2.0D - 13.0D);
|
||||
@ -39,13 +33,6 @@ public class Graphic_ATTR_Key_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String safsafdsa456456456() {
|
||||
return "A-K";
|
||||
}
|
||||
|
@ -7,8 +7,7 @@ import java.io.Serial;
|
||||
|
||||
|
||||
public class Graphic_ATTR_Multi_Elem
|
||||
extends Graphic_ATTR_Elem
|
||||
{
|
||||
extends Graphic_ATTR_Elem {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final boolean derived;
|
||||
@ -19,11 +18,6 @@ public class Graphic_ATTR_Multi_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void dsfdsfds6787686(Color c) {
|
||||
if (!this.isVisible)
|
||||
return;
|
||||
@ -45,10 +39,6 @@ public class Graphic_ATTR_Multi_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String safsafdsa456456456() {
|
||||
return "A-M";
|
||||
}
|
||||
|
@ -7,8 +7,7 @@ import java.io.Serial;
|
||||
|
||||
|
||||
public class Graphic_ATTR_One_Elem
|
||||
extends Graphic_ATTR_Elem
|
||||
{
|
||||
extends Graphic_ATTR_Elem {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final boolean derived;
|
||||
@ -19,11 +18,6 @@ public class Graphic_ATTR_One_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void dsfdsfds6787686(Color c) {
|
||||
if (!this.isVisible) {
|
||||
return;
|
||||
@ -44,9 +38,6 @@ public class Graphic_ATTR_One_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String safsafdsa456456456() {
|
||||
return "A";
|
||||
}
|
||||
|
@ -7,8 +7,7 @@ import java.io.Serial;
|
||||
|
||||
|
||||
public class Graphic_ATTR_Weak_Key_Elem
|
||||
extends Graphic_ATTR_Elem
|
||||
{
|
||||
extends Graphic_ATTR_Elem {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -17,11 +16,6 @@ public class Graphic_ATTR_Weak_Key_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void dsfdsfds6787686(Color c) {
|
||||
if (!this.isVisible)
|
||||
return;
|
||||
@ -43,10 +37,6 @@ public class Graphic_ATTR_Weak_Key_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String safsafdsa456456456() {
|
||||
return "A-WK";
|
||||
}
|
||||
|
@ -7,8 +7,7 @@ import java.io.Serial;
|
||||
|
||||
|
||||
public class Graphic_ES_Assoc_Elem
|
||||
extends Graphic_ES_Main_Elem
|
||||
{
|
||||
extends Graphic_ES_Main_Elem {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -20,20 +19,6 @@ public class Graphic_ES_Assoc_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void dsfdsfds6787686(Color c) {
|
||||
if (!this.isVisible)
|
||||
return;
|
||||
@ -41,11 +26,11 @@ public class Graphic_ES_Assoc_Elem
|
||||
|
||||
this.gc.setStroke(c);
|
||||
this.gc.strokeRect(this.xPos - this.textWidth / 2.0D, this.yPos - this.textHeight / 2.0D, this.textWidth, this.textHeight);
|
||||
this.gc.strokePolygon(new double[] { this.xPos - this.textWidth / 2.0D,
|
||||
this.gc.strokePolygon(new double[]{this.xPos - this.textWidth / 2.0D,
|
||||
this.xPos,
|
||||
this.xPos + this.textWidth / 2.0D,
|
||||
this.xPos
|
||||
}, new double[] { this.yPos,
|
||||
}, new double[]{this.yPos,
|
||||
this.yPos - this.textHeight / 2.0D,
|
||||
this.yPos,
|
||||
this.yPos + this.textHeight / 2.0D
|
||||
@ -59,24 +44,16 @@ public class Graphic_ES_Assoc_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String safsafdsa456456456() {
|
||||
return "ES-A";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public char sdfsdfdsfdf() {
|
||||
return '@';
|
||||
}
|
||||
|
@ -7,8 +7,7 @@ import java.io.Serial;
|
||||
|
||||
|
||||
public class Graphic_ES_Elem
|
||||
extends Graphic_ES_Main_Elem
|
||||
{
|
||||
extends Graphic_ES_Main_Elem {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -19,11 +18,6 @@ public class Graphic_ES_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void dsfdsfds6787686(Color c) {
|
||||
if (!this.isVisible)
|
||||
return;
|
||||
@ -40,24 +34,16 @@ public class Graphic_ES_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String safsafdsa456456456() {
|
||||
return "ES";
|
||||
}
|
||||
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public char sdfsdfdsfdf() {
|
||||
return 'e';
|
||||
}
|
||||
|
@ -7,8 +7,9 @@ import java.io.Serial;
|
||||
|
||||
public abstract class Graphic_ES_Main_Elem
|
||||
extends Graphic_Figure_Elem
|
||||
implements U3
|
||||
{
|
||||
implements U3 {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
protected boolean createRelation;
|
||||
protected String relationPraefix;
|
||||
protected String relationName;
|
||||
@ -16,19 +17,6 @@ public abstract class Graphic_ES_Main_Elem
|
||||
protected long numberRowsToInsert = 1L;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Graphic_ES_Main_Elem(GraphicsContext gc, String name, long elementID) {
|
||||
super(gc, name, elementID);
|
||||
this.createRelation = true;
|
||||
@ -39,10 +27,6 @@ public abstract class Graphic_ES_Main_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void changeName(String name) {
|
||||
super.changeName(name);
|
||||
|
||||
@ -53,8 +37,6 @@ public abstract class Graphic_ES_Main_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean getCreateRelation() {
|
||||
return this.createRelation;
|
||||
}
|
||||
@ -65,7 +47,6 @@ public abstract class Graphic_ES_Main_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getRelationPraefix() {
|
||||
return this.relationPraefix;
|
||||
}
|
||||
@ -76,7 +57,6 @@ public abstract class Graphic_ES_Main_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getRelationName() {
|
||||
return this.relationName;
|
||||
}
|
||||
@ -92,13 +72,11 @@ public abstract class Graphic_ES_Main_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setCreateInserts(boolean createInserts) {
|
||||
this.createInserts = createInserts;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public long getNumberRowsToInsert() {
|
||||
return this.numberRowsToInsert;
|
||||
}
|
||||
@ -109,8 +87,6 @@ public abstract class Graphic_ES_Main_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public String sdfsdfsd32234243() {
|
||||
return super.sdfsdfsd32234243();
|
||||
}
|
||||
|
@ -7,8 +7,7 @@ import java.io.Serial;
|
||||
|
||||
|
||||
public class Graphic_ES_Weak_Elem
|
||||
extends Graphic_ES_Main_Elem
|
||||
{
|
||||
extends Graphic_ES_Main_Elem {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -20,12 +19,6 @@ public class Graphic_ES_Weak_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void dsfdsfds6787686(Color c) {
|
||||
if (!this.isVisible)
|
||||
return;
|
||||
@ -41,29 +34,21 @@ public class Graphic_ES_Weak_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String safsafdsa456456456() {
|
||||
return "ES-W";
|
||||
}
|
||||
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public char sdfsdfdsfdf() {
|
||||
return 'e';
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected Color sefdsfdsf45() {
|
||||
return C2.ERMESColor;
|
||||
}
|
||||
|
@ -8,25 +8,12 @@ import java.io.Serial;
|
||||
|
||||
|
||||
public abstract class Graphic_Figure_Elem
|
||||
extends Graphic_Main_Elem
|
||||
{
|
||||
extends Graphic_Main_Elem {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
protected double textWidth;
|
||||
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) {
|
||||
super(gc, elementID);
|
||||
this.name = name;
|
||||
@ -34,12 +21,19 @@ public abstract class Graphic_Figure_Elem
|
||||
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) {
|
||||
this.name = name;
|
||||
@ -52,18 +46,12 @@ public abstract class Graphic_Figure_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean dsfsfds45645456(double mouseX, double mouseY) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void calculateTextWidthHeight() {
|
||||
this.textWidth = C2.computeTextWidth(this.name, 2000.0D);
|
||||
this.textWidth += 20.0D;
|
||||
@ -74,20 +62,12 @@ public abstract class Graphic_Figure_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String toString() {
|
||||
return "Graphic_Figure_Elem [textWidth=" + this.textWidth + ", textHeight=" + this.textHeight + ", toString()=" +
|
||||
super.toString() + "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void drawDockablePoints(Color c) {
|
||||
if (!this.isConnectable)
|
||||
return;
|
||||
@ -118,22 +98,10 @@ public abstract class Graphic_Figure_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public double[] getDockablePoint(double mouseX, double mouseY) {
|
||||
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) {
|
||||
selected = new double[3];
|
||||
selected[0] = this.xPos - this.textWidth / 2.0D;
|
||||
@ -165,10 +133,6 @@ public abstract class Graphic_Figure_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public double[] getXYForGivenPoint(byte dockedAt) {
|
||||
double[] xyAtPoint = new double[2];
|
||||
switch (dockedAt) {
|
||||
@ -198,7 +162,6 @@ public abstract class Graphic_Figure_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected Color sefdsfdsf45() {
|
||||
return C2.ERMESColor;
|
||||
}
|
||||
|
@ -7,8 +7,7 @@ import java.io.Serial;
|
||||
|
||||
|
||||
public class Graphic_LINE_Attr_Attr_Elem
|
||||
extends Graphic_LINE_Elem
|
||||
{
|
||||
extends Graphic_LINE_Elem {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -17,8 +16,6 @@ public class Graphic_LINE_Attr_Attr_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected Color sefdsfdsf45() {
|
||||
return C2.ERMLINEColor;
|
||||
}
|
||||
|
@ -7,8 +7,7 @@ import java.io.Serial;
|
||||
|
||||
|
||||
public class Graphic_LINE_Attr_ES_Elem
|
||||
extends Graphic_LINE_Elem
|
||||
{
|
||||
extends Graphic_LINE_Elem {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -17,8 +16,6 @@ public class Graphic_LINE_Attr_ES_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected Color sefdsfdsf45() {
|
||||
return C2.ERMLINEColor;
|
||||
}
|
||||
|
@ -7,8 +7,7 @@ import java.io.Serial;
|
||||
|
||||
|
||||
public class Graphic_LINE_Attr_RS_Elem
|
||||
extends Graphic_LINE_Elem
|
||||
{
|
||||
extends Graphic_LINE_Elem {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -17,8 +16,6 @@ public class Graphic_LINE_Attr_RS_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected Color sefdsfdsf45() {
|
||||
return C2.ERMLINEColor;
|
||||
}
|
||||
|
@ -9,39 +9,19 @@ import javafx.scene.transform.Translate;
|
||||
import java.io.Serial;
|
||||
|
||||
public abstract class Graphic_LINE_Elem
|
||||
extends Graphic_Main_Elem
|
||||
{
|
||||
extends Graphic_Main_Elem {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private double xEnd;
|
||||
|
||||
private double yEnd;
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final byte lineConnectedWithPointAtStart;
|
||||
private final byte lineConnectedWithPointAtEnd;
|
||||
protected String minimum = "0";
|
||||
protected String maximum = "n";
|
||||
|
||||
|
||||
|
||||
|
||||
private double xEnd;
|
||||
private double yEnd;
|
||||
private Graphic_Figure_Elem connectedWithStart;
|
||||
|
||||
|
||||
|
||||
|
||||
private final byte lineConnectedWithPointAtStart;
|
||||
|
||||
|
||||
|
||||
|
||||
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) {
|
||||
super(gc, elementID);
|
||||
|
||||
@ -62,11 +42,6 @@ private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void changeMinMax(String minimum, String maximum) {
|
||||
this.minimum = minimum;
|
||||
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) {
|
||||
this.gc.setStroke(c);
|
||||
|
||||
@ -102,11 +70,8 @@ private static final long serialVersionUID = 1L;
|
||||
this.gc.setFill(C2.ERMBackgroundColor);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.gc.strokePolygon(new double[] { len, len - 8.0D, len - 8.0D
|
||||
}, new double[] { 0.0D, -8.0D, 8.0D
|
||||
this.gc.strokePolygon(new double[]{len, len - 8.0D, len - 8.0D
|
||||
}, new double[]{0.0D, -8.0D, 8.0D
|
||||
}, 3);
|
||||
|
||||
|
||||
@ -114,12 +79,6 @@ private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void dsfdsfds6787686(Color c) {
|
||||
if (!this.isVisible)
|
||||
return;
|
||||
@ -140,9 +99,12 @@ private static final long serialVersionUID = 1L;
|
||||
return;
|
||||
}
|
||||
if (this instanceof Graphic_LINE_RSISAS_ES_Elem)
|
||||
return; if (this instanceof Graphic_LINE_Attr_Attr_Elem)
|
||||
return; if (this instanceof Graphic_LINE_Attr_ES_Elem)
|
||||
return; if (this instanceof Graphic_LINE_Attr_RS_Elem) {
|
||||
return;
|
||||
if (this instanceof Graphic_LINE_Attr_Attr_Elem)
|
||||
return;
|
||||
if (this instanceof Graphic_LINE_Attr_ES_Elem)
|
||||
return;
|
||||
if (this instanceof Graphic_LINE_Attr_RS_Elem) {
|
||||
return;
|
||||
}
|
||||
double helpXStart = this.xPos;
|
||||
@ -150,16 +112,19 @@ private static final long serialVersionUID = 1L;
|
||||
double helpYStart = this.yPos;
|
||||
double helpYEnd = this.yEnd;
|
||||
this.gc.setFill(C2.ERMTextColor);
|
||||
if (this.xEnd < this.xPos) { helpXStart = this.xEnd; helpXEnd = this.xPos; }
|
||||
if (this.yEnd < this.yPos) { helpYStart = this.yEnd; helpYEnd = this.yPos; }
|
||||
if (this.xEnd < this.xPos) {
|
||||
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.closePath();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void dsfsdfsfd() {
|
||||
this.gc.beginPath();
|
||||
this.gc.setStroke(C2.ERMBackgroundColor);
|
||||
@ -175,11 +140,11 @@ private static final long serialVersionUID = 1L;
|
||||
Graphic_ES_Elem helpElem = null;
|
||||
byte helpConnectedWithPoint = 0;
|
||||
if (this.connectedWithStart instanceof Graphic_ES_Elem) {
|
||||
helpElem = (Graphic_ES_Elem)this.connectedWithStart;
|
||||
helpElem = (Graphic_ES_Elem) this.connectedWithStart;
|
||||
helpConnectedWithPoint = this.lineConnectedWithPointAtStart;
|
||||
}
|
||||
if (this.connectedWithEnd instanceof Graphic_ES_Elem) {
|
||||
helpElem = (Graphic_ES_Elem)this.connectedWithEnd;
|
||||
helpElem = (Graphic_ES_Elem) this.connectedWithEnd;
|
||||
helpConnectedWithPoint = this.lineConnectedWithPointAtEnd;
|
||||
}
|
||||
|
||||
@ -210,9 +175,12 @@ private static final long serialVersionUID = 1L;
|
||||
return;
|
||||
}
|
||||
if (this instanceof Graphic_LINE_RSISAS_ES_Elem)
|
||||
return; if (this instanceof Graphic_LINE_Attr_Attr_Elem)
|
||||
return; if (this instanceof Graphic_LINE_Attr_ES_Elem)
|
||||
return; if (this instanceof Graphic_LINE_Attr_RS_Elem) {
|
||||
return;
|
||||
if (this instanceof Graphic_LINE_Attr_Attr_Elem)
|
||||
return;
|
||||
if (this instanceof Graphic_LINE_Attr_ES_Elem)
|
||||
return;
|
||||
if (this instanceof Graphic_LINE_Attr_RS_Elem) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -220,8 +188,14 @@ private static final long serialVersionUID = 1L;
|
||||
double helpXEnd = this.xEnd;
|
||||
double helpYStart = this.yPos;
|
||||
double helpYEnd = this.yEnd;
|
||||
if (this.xEnd < this.xPos) { helpXStart = this.xEnd; helpXEnd = this.xPos; }
|
||||
if (this.yEnd < this.yPos) { helpYStart = this.yEnd; helpYEnd = this.yPos; }
|
||||
if (this.xEnd < this.xPos) {
|
||||
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,
|
||||
helpYStart + (helpYEnd - helpYStart) / 2.0D - 5.0D - 10.0D,
|
||||
C2.computeTextWidth("(" + this.minimum + "," + this.maximum + ")", 2000.0D) + 12.0D,
|
||||
@ -230,30 +204,16 @@ private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public double dsfsfsd456457657() {
|
||||
return this.xEnd;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public double getHeight() {
|
||||
return this.yEnd;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean dsfsfds45645456(double mouseX, double mouseY) {
|
||||
Graphic_Figure_Elem aHelp = getConnectedWithStart();
|
||||
double[] dockablePointsAHelp = aHelp.getXYForGivenPoint(getLineConnectedWithPointAtStart());
|
||||
@ -270,73 +230,51 @@ private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Graphic_Figure_Elem getConnectedWithStart() {
|
||||
return this.connectedWithStart;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setConnectedWithStart(Graphic_Figure_Elem connectedWithStart) {
|
||||
this.connectedWithStart = connectedWithStart;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Graphic_Figure_Elem getConnectedWithEnd() {
|
||||
return this.connectedWithEnd;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setConnectedWithEnd(Graphic_Figure_Elem connectedWithEnd) {
|
||||
this.connectedWithEnd = connectedWithEnd;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public double getxEnd() {
|
||||
return this.xEnd;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setxEnd(double xEnd) {
|
||||
this.xEnd = xEnd;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public double getyEnd() {
|
||||
return this.yEnd;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setyEnd(double yEnd) {
|
||||
this.yEnd = yEnd;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public char sdfsdfdsfdf() {
|
||||
return 'l';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public double distP1_P2(double xP1, double yP1, double xP2, double yP2) {
|
||||
double dist;
|
||||
dist = Math.sqrt((xP1 - xP2) * (xP1 - xP2) + (yP1 - yP2) * (yP1 - yP2));
|
||||
@ -344,29 +282,21 @@ private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public String getMinimum() {
|
||||
return this.minimum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setMinimum(String minimum) {
|
||||
this.minimum = minimum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public String getMaximum() {
|
||||
return this.maximum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setMaximum(String maximum) {
|
||||
this.maximum = maximum;
|
||||
}
|
||||
@ -380,9 +310,6 @@ private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String toString() {
|
||||
return "Graphic_LINE_Elem [xEnd=" + this.xEnd + ", yEnd=" + this.yEnd + ", minimum=" + this.minimum + ", maximum=" + this.maximum +
|
||||
", connectedWithStart=" + this.connectedWithStart + ", connectedWithEnd=" + this.connectedWithEnd +
|
||||
@ -390,8 +317,6 @@ private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public byte getLineConnectedWithPointAtStart() {
|
||||
return this.lineConnectedWithPointAtStart;
|
||||
}
|
||||
|
@ -7,8 +7,7 @@ import java.io.Serial;
|
||||
|
||||
|
||||
public class Graphic_LINE_RSID_ESWEAK_Elem
|
||||
extends Graphic_LINE_Elem
|
||||
{
|
||||
extends Graphic_LINE_Elem {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -17,8 +16,6 @@ public class Graphic_LINE_RSID_ESWEAK_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected Color sefdsfdsf45() {
|
||||
return C2.ERMRSConnColor;
|
||||
}
|
||||
|
@ -6,45 +6,16 @@ import javafx.scene.paint.Color;
|
||||
import java.io.Serial;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public class Graphic_LINE_RSID_ES_Elem
|
||||
extends Graphic_LINE_Elem
|
||||
{
|
||||
extends Graphic_LINE_Elem {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Graphic_LINE_RSID_ES_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, x, y, xEnd, yEnd, lineConnectedWithPointAtStart, lineConnectedWithPointAtEnd, elemStart, elemEnd, elementID);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected Color sefdsfdsf45() {
|
||||
return C2.ERMRSConnColor;
|
||||
}
|
||||
|
@ -7,8 +7,7 @@ import java.io.Serial;
|
||||
|
||||
|
||||
public class Graphic_LINE_RSISAG_ES_Elem
|
||||
extends Graphic_LINE_Elem
|
||||
{
|
||||
extends Graphic_LINE_Elem {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -17,8 +16,6 @@ public class Graphic_LINE_RSISAG_ES_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected Color sefdsfdsf45() {
|
||||
return C2.ERMISAConnGENERAL;
|
||||
}
|
||||
|
@ -7,8 +7,7 @@ import java.io.Serial;
|
||||
|
||||
|
||||
public class Graphic_LINE_RSISAS_ES_Elem
|
||||
extends Graphic_LINE_Elem
|
||||
{
|
||||
extends Graphic_LINE_Elem {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -17,8 +16,6 @@ public class Graphic_LINE_RSISAS_ES_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected Color sefdsfdsf45() {
|
||||
return C2.ERMISAConnSPEC;
|
||||
}
|
||||
|
@ -7,8 +7,7 @@ import java.io.Serial;
|
||||
|
||||
|
||||
public class Graphic_LINE_RS_ES_Elem
|
||||
extends Graphic_LINE_Elem
|
||||
{
|
||||
extends Graphic_LINE_Elem {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -17,8 +16,6 @@ public class Graphic_LINE_RS_ES_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected Color sefdsfdsf45() {
|
||||
return C2.ERMRSConnColor;
|
||||
}
|
||||
|
@ -1,13 +1,13 @@
|
||||
package at.fos.ermodel.gui;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import javafx.scene.canvas.GraphicsContext;
|
||||
import javafx.scene.paint.Color;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
public abstract class Graphic_Main_Elem
|
||||
implements Serializable, Comparable<Graphic_Main_Elem>
|
||||
{
|
||||
implements Serializable, Comparable<Graphic_Main_Elem> {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
protected long graphicMainElemID;
|
||||
@ -26,84 +26,53 @@ public abstract class Graphic_Main_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public GraphicsContext getGc() {
|
||||
return this.gc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setGc(GraphicsContext gc) {
|
||||
this.gc = gc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setxPos(double xPos) {
|
||||
this.xPos = xPos;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setyPos(double yPos) {
|
||||
this.yPos = yPos;
|
||||
}
|
||||
|
||||
public void safdsadasds32432456456() {
|
||||
dsfdsfds6787686(sefdsfdsf45()); }
|
||||
|
||||
dsfdsfds6787686(sefdsfdsf45());
|
||||
}
|
||||
|
||||
protected Color getColorSelected() {
|
||||
return C2.ERMSelectedColor;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected Color getColorDockable() {
|
||||
return C2.ERMDockablePointColor;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void dfsdfssdf456456() {
|
||||
dsfsdfsfd(); dsfdsfds6787686(sefdsfdsf45());
|
||||
dsfsdfsfd();
|
||||
dsfdsfds6787686(sefdsfdsf45());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public double getxPos() {
|
||||
return this.xPos;
|
||||
}
|
||||
|
||||
|
||||
public void setxPos(double xPos) {
|
||||
this.xPos = xPos;
|
||||
}
|
||||
|
||||
public double getyPos() {
|
||||
return this.yPos;
|
||||
}
|
||||
|
||||
|
||||
public void setyPos(double yPos) {
|
||||
this.yPos = yPos;
|
||||
}
|
||||
|
||||
public void dgfdsfdssfd43534456() {
|
||||
selectElem();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void sdffdsfsdf4354357656(double newX, double newY) {
|
||||
dsfsdfsfd();
|
||||
this.xPos = newX;
|
||||
@ -112,26 +81,18 @@ public abstract class Graphic_Main_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void selectElem() {
|
||||
dsfdsfds6787686(getColorSelected());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public int hashCode() {
|
||||
int result = 1;
|
||||
result = 31 * result + (int)(this.graphicMainElemID ^ this.graphicMainElemID >>> 32L);
|
||||
result = 31 * result + (int) (this.graphicMainElemID ^ this.graphicMainElemID >>> 32L);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
@ -139,59 +100,42 @@ public abstract class Graphic_Main_Elem
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
Graphic_Main_Elem other = (Graphic_Main_Elem)obj;
|
||||
Graphic_Main_Elem other = (Graphic_Main_Elem) obj;
|
||||
return this.graphicMainElemID == other.graphicMainElemID;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String toString() {
|
||||
return "Graphic_Main_Elem [graphicMainElemID=" + this.graphicMainElemID + ", xPos=" + this.xPos + ", yPos=" + this.yPos +
|
||||
", name=" + this.name + "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
public long sdfsdfsdfd() {
|
||||
return this.graphicMainElemID;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void dsdasadsasd32423432(long graphicMainElemID) {
|
||||
this.graphicMainElemID = graphicMainElemID;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String sdfsdfsd32234243() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public U4 adsadadsa4354353() {
|
||||
return this.undoRedoAction;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void sfdsfsfsddf123234435(U4 undoRedoAction) {
|
||||
this.undoRedoAction = undoRedoAction;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public int compareTo(Graphic_Main_Elem arg0) {
|
||||
return Long.compare(this.graphicMainElemID, arg0.graphicMainElemID);
|
||||
}
|
||||
|
@ -6,10 +6,9 @@ import javafx.scene.paint.Color;
|
||||
import java.io.Serial;
|
||||
|
||||
public class Graphic_RS_Elem
|
||||
extends Graphic_RS_Main_Elem
|
||||
{
|
||||
extends Graphic_RS_Main_Elem {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Graphic_RS_Elem(GraphicsContext gc, double x, double y, String name, long elementID) {
|
||||
super(gc, name, elementID);
|
||||
@ -20,22 +19,16 @@ private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void dsfdsfds6787686(Color c) {
|
||||
if (!this.isVisible)
|
||||
return;
|
||||
this.gc.beginPath();
|
||||
this.gc.setStroke(c);
|
||||
this.gc.strokePolygon(new double[] { this.xPos - this.textWidth / 2.0D,
|
||||
this.gc.strokePolygon(new double[]{this.xPos - this.textWidth / 2.0D,
|
||||
this.xPos,
|
||||
this.xPos + this.textWidth / 2.0D,
|
||||
this.xPos
|
||||
}, new double[] { this.yPos,
|
||||
}, new double[]{this.yPos,
|
||||
this.yPos - this.textHeight / 2.0D,
|
||||
this.yPos,
|
||||
this.yPos + this.textHeight / 2.0D
|
||||
@ -46,39 +39,31 @@ private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String safsafdsa456456456() {
|
||||
return "RS";
|
||||
}
|
||||
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public double dsfsfsd456457657() {
|
||||
return this.textWidth;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public double getHeight() {
|
||||
return this.textHeight;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public char sdfsdfdsfdf() {
|
||||
return 'r';
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected Color sefdsfdsf45() {
|
||||
return C2.ERMRSColor;
|
||||
}
|
||||
|
@ -7,8 +7,7 @@ import java.io.Serial;
|
||||
|
||||
|
||||
public class Graphic_RS_ISA_Elem
|
||||
extends Graphic_RS_Main_Elem
|
||||
{
|
||||
extends Graphic_RS_Main_Elem {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String partial_or_total;
|
||||
@ -25,21 +24,16 @@ public class Graphic_RS_ISA_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void dsfdsfds6787686(Color c) {
|
||||
if (!this.isVisible)
|
||||
return;
|
||||
this.gc.beginPath();
|
||||
this.gc.setStroke(c);
|
||||
this.gc.strokePolygon(new double[] { this.xPos - this.textWidth / 2.0D,
|
||||
this.gc.strokePolygon(new double[]{this.xPos - this.textWidth / 2.0D,
|
||||
this.xPos,
|
||||
this.xPos + this.textWidth / 2.0D,
|
||||
this.xPos
|
||||
}, new double[] { this.yPos,
|
||||
}, new double[]{this.yPos,
|
||||
this.yPos - this.textHeight / 2.0D,
|
||||
this.yPos,
|
||||
this.yPos + this.textHeight / 2.0D
|
||||
@ -54,15 +48,11 @@ public class Graphic_RS_ISA_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String safsafdsa456456456() {
|
||||
return "ISA";
|
||||
}
|
||||
|
||||
|
||||
|
||||
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);
|
||||
|
||||
@ -73,63 +63,46 @@ public class Graphic_RS_ISA_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
public double dsfsfsd456457657() {
|
||||
return this.textWidth;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public double getHeight() {
|
||||
return this.textHeight;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public char sdfsdfdsfdf() {
|
||||
return 'r';
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected Color sefdsfdsf45() {
|
||||
return C2.ERMRSISAColor;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public String getPartial_or_total() {
|
||||
return this.partial_or_total;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setPartial_or_total(String partial_or_total) {
|
||||
this.partial_or_total = partial_or_total;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public String getDisjunct_or_notdisjunct() {
|
||||
return this.disjunct_or_notdisjunct;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setDisjunct_or_notdisjunct(String disjunct_or_notdisjunct) {
|
||||
this.disjunct_or_notdisjunct = 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.disjunct_or_notdisjunct = disjunct_or_notdisjunct;
|
||||
@ -148,8 +121,6 @@ public class Graphic_RS_ISA_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public String sdfsdfsd32234243() {
|
||||
return safsafdsa456456456() + "(" + this.partial_or_total + "," + this.disjunct_or_notdisjunct + ")";
|
||||
}
|
||||
|
@ -7,8 +7,7 @@ import java.io.Serial;
|
||||
|
||||
|
||||
public class Graphic_RS_Identifying_Elem
|
||||
extends Graphic_RS_Main_Elem
|
||||
{
|
||||
extends Graphic_RS_Main_Elem {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -23,31 +22,25 @@ public class Graphic_RS_Identifying_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void dsfdsfds6787686(Color c) {
|
||||
if (!this.isVisible)
|
||||
return;
|
||||
this.gc.beginPath();
|
||||
this.gc.setStroke(c);
|
||||
this.gc.strokePolygon(new double[] { this.xPos - this.textWidth / 2.0D,
|
||||
this.gc.strokePolygon(new double[]{this.xPos - this.textWidth / 2.0D,
|
||||
this.xPos,
|
||||
this.xPos + this.textWidth / 2.0D,
|
||||
this.xPos
|
||||
}, new double[] { this.yPos,
|
||||
}, new double[]{this.yPos,
|
||||
this.yPos - this.textHeight / 2.0D,
|
||||
this.yPos,
|
||||
this.yPos + this.textHeight / 2.0D
|
||||
}, 4);
|
||||
this.gc.strokePolygon(new double[] { this.xPos - this.textWidth / 2.0D + 3.0D,
|
||||
this.gc.strokePolygon(new double[]{this.xPos - this.textWidth / 2.0D + 3.0D,
|
||||
this.xPos,
|
||||
this.xPos + this.textWidth / 2.0D - 3.0D,
|
||||
this.xPos
|
||||
}, new double[] { this.yPos,
|
||||
}, new double[]{this.yPos,
|
||||
this.yPos - this.textHeight / 2.0D + 3.0D,
|
||||
this.yPos,
|
||||
this.yPos + this.textHeight / 2.0D - 3.0D
|
||||
@ -58,41 +51,31 @@ public class Graphic_RS_Identifying_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String safsafdsa456456456() {
|
||||
return "RS-ID";
|
||||
}
|
||||
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public double dsfsfsd456457657() {
|
||||
return this.textWidth;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public double getHeight() {
|
||||
return this.textHeight;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public char sdfsdfdsfdf() {
|
||||
return 'r';
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected Color sefdsfdsf45() {
|
||||
return C2.ERMRSColor;
|
||||
}
|
||||
|
@ -7,8 +7,7 @@ import java.io.Serial;
|
||||
|
||||
public abstract class Graphic_RS_Main_Elem
|
||||
extends Graphic_Figure_Elem
|
||||
implements U3
|
||||
{
|
||||
implements U3 {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
protected boolean createRelation;
|
||||
@ -18,13 +17,6 @@ public abstract class Graphic_RS_Main_Elem
|
||||
protected long numberRowsToInsert = 1L;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Graphic_RS_Main_Elem(GraphicsContext gc, String name, long elementID) {
|
||||
super(gc, name, elementID);
|
||||
this.relationName = this.name.toLowerCase();
|
||||
@ -34,10 +26,6 @@ public abstract class Graphic_RS_Main_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void changeName(String name) {
|
||||
super.changeName(name);
|
||||
|
||||
@ -46,7 +34,6 @@ public abstract class Graphic_RS_Main_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
public boolean getCreateRelation() {
|
||||
return this.createRelation;
|
||||
}
|
||||
@ -57,7 +44,6 @@ public abstract class Graphic_RS_Main_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getRelationPraefix() {
|
||||
return this.relationPraefix;
|
||||
}
|
||||
@ -68,7 +54,6 @@ public abstract class Graphic_RS_Main_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getRelationName() {
|
||||
return this.relationName;
|
||||
}
|
||||
@ -79,32 +64,26 @@ public abstract class Graphic_RS_Main_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
public boolean getCreateInserts() {
|
||||
return this.createInserts;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setCreateInserts(boolean createInserts) {
|
||||
this.createInserts = createInserts;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public long getNumberRowsToInsert() {
|
||||
return this.numberRowsToInsert;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setNumberRowsToInsert(long numberRowsToInsert) {
|
||||
this.numberRowsToInsert = numberRowsToInsert;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public String sdfsdfsd32234243() {
|
||||
return super.sdfsdfsd32234243();
|
||||
}
|
||||
|
@ -8,8 +8,7 @@ import java.io.Serial;
|
||||
|
||||
|
||||
public class Graphic_Text_Elem
|
||||
extends Graphic_Main_Elem
|
||||
{
|
||||
extends Graphic_Main_Elem {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
protected double textWidth;
|
||||
@ -17,13 +16,6 @@ public class Graphic_Text_Elem
|
||||
protected boolean hasBorder;
|
||||
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) {
|
||||
super(gc, elementID);
|
||||
this.name = name;
|
||||
@ -36,11 +28,13 @@ public class Graphic_Text_Elem
|
||||
calculateTextWidthHeight();
|
||||
}
|
||||
|
||||
public double dsfsfsd456457657() {
|
||||
return this.textWidth;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public double getHeight() {
|
||||
return this.textHeight;
|
||||
}
|
||||
|
||||
protected void changeName(String name) {
|
||||
this.name = name;
|
||||
@ -54,18 +48,12 @@ public class Graphic_Text_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean dsfsfds45645456(double mouseX, double mouseY) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void calculateTextWidthHeight() {
|
||||
this.textWidth = C2.computeTextWidth(this.name, 2000.0D);
|
||||
this.textWidth += 20.0D;
|
||||
@ -76,10 +64,6 @@ public class Graphic_Text_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String toString() {
|
||||
return "Graphic_Figure_Elem [textWidth=" + this.textWidth + ", textHeight=" + this.textHeight + ", toString()=" +
|
||||
super.toString() + "]";
|
||||
@ -91,14 +75,11 @@ public class Graphic_Text_Elem
|
||||
}
|
||||
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected void dsfdsfds6787686(Color c) {
|
||||
if (!this.isVisible) {
|
||||
return;
|
||||
@ -113,22 +94,21 @@ public class Graphic_Text_Elem
|
||||
|
||||
|
||||
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); }
|
||||
else { this.gc.fillText(this.name, this.xPos - this.textWidth / 2.0D + 10.0D, this.yPos - this.textHeight / 2.0D + this.textHeight / this.numberLines); }
|
||||
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);
|
||||
} 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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public char sdfsdfdsfdf() {
|
||||
return 't';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String getDefaultName() {
|
||||
return "Text";
|
||||
}
|
||||
|
@ -5,32 +5,15 @@ import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public class T1
|
||||
implements Comparable<T1>
|
||||
{
|
||||
private String tablename;
|
||||
implements Comparable<T1> {
|
||||
private final String tablenamePraefix;
|
||||
private final long referstoGraphicalElement;
|
||||
private final ArrayList<C3> skjdfhgdskjf674534;
|
||||
private final ArrayList<T1> dependsOnTable;
|
||||
private final HashMap<T1, ArrayList<C3>> columnsOfDependentOnTable;
|
||||
private final boolean createInserts;
|
||||
private String tablename;
|
||||
private long jdshfalkajsd677676;
|
||||
|
||||
public T1(String tablename, String tablenamePraefix, long referstoGraphicalElement, boolean createInserts, long numberValues) {
|
||||
@ -45,10 +28,6 @@ public class T1
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void addColumn(C3 column) {
|
||||
this.skjdfhgdskjf674534.add(column);
|
||||
|
||||
@ -56,10 +35,6 @@ public class T1
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void addTableDepdendentOn(T1 table) {
|
||||
this.dependsOnTable.add(table);
|
||||
}
|
||||
@ -70,21 +45,16 @@ public class T1
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setTablename(String tablename) {
|
||||
this.tablename = tablename;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public ArrayList<C3> getSkjdfhgdskjf674534() {
|
||||
return this.skjdfhgdskjf674534;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public int hashCode() {
|
||||
int result = 1;
|
||||
result = 31 * result + ((this.tablename == null) ? 0 : this.tablename.hashCode());
|
||||
@ -92,9 +62,6 @@ public class T1
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
@ -102,25 +69,19 @@ public class T1
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
T1 other = (T1)obj;
|
||||
T1 other = (T1) obj;
|
||||
if (this.tablename == null) {
|
||||
return other.tablename == null;
|
||||
} else return this.tablename.equals(other.tablename);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String toString() {
|
||||
return "RM_Table [tablename=" + this.tablename + ", tablenamePraefix=" + this.tablenamePraefix +
|
||||
", referstoGraphicalElement=" + this.referstoGraphicalElement + ", columns=" + this.skjdfhgdskjf674534 + "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public String getTablenamePraefix() {
|
||||
return this.tablenamePraefix;
|
||||
}
|
||||
@ -131,8 +92,6 @@ public class T1
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public long getReferstoGraphicalElement() {
|
||||
return this.referstoGraphicalElement;
|
||||
}
|
||||
@ -159,46 +118,31 @@ public class T1
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean columnExist(String colName) {
|
||||
return this.skjdfhgdskjf674534.contains(new C3(colName));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean isCreateInserts() {
|
||||
return this.createInserts;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public long getJdshfalkajsd677676() {
|
||||
return this.jdshfalkajsd677676;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setJdshfalkajsd677676(long numberValues) {
|
||||
this.jdshfalkajsd677676 = numberValues;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public ArrayList<T1> getDependsOnTable() {
|
||||
return this.dependsOnTable;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public HashMap<T1, ArrayList<C3>> getColumnsOfDependentOnTable() {
|
||||
return this.columnsOfDependentOnTable;
|
||||
}
|
||||
|
@ -14,12 +14,11 @@ import java.util.HashMap;
|
||||
import java.util.Random;
|
||||
|
||||
|
||||
public class T3
|
||||
{
|
||||
public class T3 {
|
||||
public static HashMap<String, ArrayList<String>> randomData = new HashMap<>();
|
||||
|
||||
|
||||
public static String[] dsfsdfsdf4353534 = new String[] {
|
||||
public static String[] dsfsdfsdf4353534 = new String[]{
|
||||
"No",
|
||||
"Extern",
|
||||
"Random Integer",
|
||||
@ -42,7 +41,7 @@ public class T3
|
||||
"Random Place",
|
||||
"Random Profession",
|
||||
"Random Rentalequipment",
|
||||
"Random Street" };
|
||||
"Random Street"};
|
||||
|
||||
|
||||
public static Object copyObject(Object objSource) {
|
||||
@ -68,12 +67,8 @@ public class T3
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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;
|
||||
|
||||
iv.setScaleY(yScale);
|
||||
iv.setScaleX(xScale);
|
||||
@ -86,12 +81,8 @@ public class T3
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static void buttonMouseExited(Node node) {
|
||||
ImageView iv = (ImageView)node;
|
||||
ImageView iv = (ImageView) node;
|
||||
|
||||
iv.setScaleX(1.0D);
|
||||
iv.setScaleY(1.0D);
|
||||
@ -110,11 +101,6 @@ public class T3
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static String replaceSpecialChars(String text) {
|
||||
text = text.replaceAll("ä", "ae");
|
||||
text = text.replaceAll("ö", "oe");
|
||||
@ -125,24 +111,12 @@ public class T3
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static String getRandomInteger(int valuesVon, int valuesBis) {
|
||||
int randomValue = valuesVon + (new Random()).nextInt(valuesBis - valuesVon) + 1;
|
||||
return String.valueOf(randomValue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static String getRandomBoolean() {
|
||||
boolean randomValue = (new Random()).nextBoolean();
|
||||
String booleanAsString;
|
||||
@ -152,19 +126,6 @@ public class T3
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static String getRandomDecimal(int digitsBeforeComma, int digitsAfterComma) {
|
||||
StringBuilder digitsAfterCommaAsString = new StringBuilder();
|
||||
|
||||
@ -183,13 +144,6 @@ public class T3
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static String getRandomTextGivenLength(int textLength) {
|
||||
String str = "abcdefghijklmnopqrstuvwxyz";
|
||||
StringBuilder randomText = new StringBuilder();
|
||||
@ -197,23 +151,18 @@ public class T3
|
||||
for (int j = 0; j < textLength; j++) {
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static String getRandomDate(LocalDate from, LocalDate till) {
|
||||
Random random = new Random();
|
||||
int minDay = (int)LocalDate.of(from.getYear(), from.getMonth(), from.getDayOfMonth()).toEpochDay();
|
||||
int maxDay = (int)LocalDate.of(till.getYear(), till.getMonth(), till.getDayOfMonth()).toEpochDay();
|
||||
int minDay = (int) LocalDate.of(from.getYear(), from.getMonth(), from.getDayOfMonth()).toEpochDay();
|
||||
int maxDay = (int) LocalDate.of(till.getYear(), till.getMonth(), till.getDayOfMonth()).toEpochDay();
|
||||
long randomDay = (minDay + random.nextInt(maxDay - minDay));
|
||||
LocalDate randomDate = LocalDate.ofEpochDay(randomDay);
|
||||
String datesAsString;
|
||||
@ -223,18 +172,16 @@ public class T3
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static void readRandomData(String which, String keyExtern) {
|
||||
ArrayList<String> randomDataAsList;
|
||||
try {
|
||||
BufferedReader fr;
|
||||
|
||||
if (which.equals("Extern")) { fr = C2.randomDataFilesExtern.get(keyExtern); }
|
||||
else { fr = new BufferedReader(new InputStreamReader(C2.randomDataFiles.get(which))); }
|
||||
if (which.equals("Extern")) {
|
||||
fr = C2.randomDataFilesExtern.get(keyExtern);
|
||||
} else {
|
||||
fr = new BufferedReader(new InputStreamReader(C2.randomDataFiles.get(which)));
|
||||
}
|
||||
randomDataAsList = new ArrayList<>();
|
||||
String next = fr.readLine();
|
||||
while (next != null) {
|
||||
@ -242,8 +189,11 @@ public class T3
|
||||
next = fr.readLine();
|
||||
}
|
||||
fr.close();
|
||||
if (which.equals("Extern")) { randomData.put(keyExtern, randomDataAsList); }
|
||||
else { randomData.put(which, randomDataAsList); }
|
||||
if (which.equals("Extern")) {
|
||||
randomData.put(keyExtern, randomDataAsList);
|
||||
} else {
|
||||
randomData.put(which, randomDataAsList);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
@ -251,23 +201,23 @@ public class T3
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static String getRandomData(String which, String keyExtern) {
|
||||
ArrayList<String> randomDataAsList;
|
||||
if (which.equals("Extern")) { randomDataAsList = randomData.get(keyExtern); }
|
||||
else { randomDataAsList = randomData.get(which); }
|
||||
if (which.equals("Extern")) {
|
||||
randomDataAsList = randomData.get(keyExtern);
|
||||
} else {
|
||||
randomDataAsList = randomData.get(which);
|
||||
}
|
||||
|
||||
if (randomDataAsList == null) {
|
||||
readRandomData(which, keyExtern);
|
||||
}
|
||||
|
||||
if (which.equals("Extern")) { randomDataAsList = randomData.get(keyExtern); }
|
||||
else { randomDataAsList = randomData.get(which); }
|
||||
if (which.equals("Extern")) {
|
||||
randomDataAsList = randomData.get(keyExtern);
|
||||
} else {
|
||||
randomDataAsList = randomData.get(which);
|
||||
}
|
||||
|
||||
return randomDataAsList.get((new Random()).nextInt(randomDataAsList.size()));
|
||||
}
|
||||
|
@ -1,35 +1,18 @@
|
||||
package at.fos.ermodel.gui;
|
||||
package at.fos.ermodel.gui;
|
||||
|
||||
import javafx.scene.control.Alert;
|
||||
import javafx.scene.control.ButtonType;
|
||||
import javafx.scene.control.ScrollPane;
|
||||
import javafx.scene.control.Tab;
|
||||
import javafx.scene.input.KeyEvent;
|
||||
import javafx.scene.layout.StackPane;
|
||||
import javafx.scene.control.Alert;
|
||||
import javafx.scene.control.ButtonType;
|
||||
import javafx.scene.control.ScrollPane;
|
||||
import javafx.scene.control.Tab;
|
||||
import javafx.scene.input.KeyEvent;
|
||||
import javafx.scene.layout.StackPane;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Optional;
|
||||
import java.io.File;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public class U1
|
||||
extends Tab
|
||||
{
|
||||
public class U1
|
||||
extends Tab {
|
||||
public final A3 canvas;
|
||||
public final StackPane stackpane;
|
||||
public final ScrollPane scrollpane;
|
||||
@ -68,8 +51,6 @@
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
this.scrollpane.setOnKeyPressed(U1.this.canvas::sdfdsfd567657rrt);
|
||||
this.stackpane.setOnKeyPressed(U1.this.canvas::sdfdsfd567657rrt);
|
||||
|
||||
@ -84,4 +65,4 @@
|
||||
}
|
||||
this.canvas.requestFocus();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
package at.fos.ermodel.gui;
|
||||
|
||||
public enum U4
|
||||
{
|
||||
public enum U4 {
|
||||
ADD, REMOVE
|
||||
}
|
||||
|
||||
|
@ -12,38 +12,8 @@ import javafx.scene.layout.VBox;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public class V1
|
||||
extends Stage
|
||||
{
|
||||
extends Stage {
|
||||
public static V1 thisActionMessageDialog;
|
||||
private final Label showFilename;
|
||||
private Thread th;
|
||||
@ -53,7 +23,6 @@ public class V1
|
||||
setTitle("Generate/Save SQL-Script");
|
||||
|
||||
|
||||
|
||||
getIcons().add(C2.applicationImageIconAsICO);
|
||||
ProgressBar progress = new ProgressBar();
|
||||
progress.setPrefWidth(200.0D);
|
||||
@ -73,10 +42,6 @@ public class V1
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sizeToScene();
|
||||
setResizable(false);
|
||||
}
|
||||
@ -88,9 +53,6 @@ public class V1
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void setThread(Thread th) {
|
||||
this.th = th;
|
||||
startTimer();
|
||||
@ -98,9 +60,6 @@ public class V1
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Label getShowFilename() {
|
||||
return this.showFilename;
|
||||
}
|
||||
|
@ -2,8 +2,7 @@ package at.fos.ermodel.gui;
|
||||
|
||||
|
||||
public class ZZ20
|
||||
extends Exception
|
||||
{
|
||||
extends Exception {
|
||||
public ZZ20(String arg0) {
|
||||
super(arg0);
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user