|
@@ -62,7 +62,7 @@ public class Main extends Application {
|
|
|
private Label weightLabel;
|
|
|
private CheckBox tempCheckBox;
|
|
|
private Label tempLabel;
|
|
|
- private CheckBox rotationCheckBox;
|
|
|
+ private CheckBox tiltingCheckBox;
|
|
|
private Label rotationLabel;
|
|
|
private CheckBox pressureCheckBox;
|
|
|
private Label pressureLabel;
|
|
@@ -171,18 +171,21 @@ public class Main extends Application {
|
|
|
event.consume();
|
|
|
});
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
Node nodeRotation = root.lookup("#rotationPane");
|
|
|
TitledPane paneRotation = (TitledPane) nodeRotation;
|
|
|
BorderPane borderPaneRotation = new BorderPane();
|
|
|
- rotationCheckBox = new CheckBox();
|
|
|
- borderPaneRotation.setLeft(rotationCheckBox);
|
|
|
- BorderPane.setAlignment(rotationCheckBox, Pos.CENTER_LEFT);
|
|
|
- rotationLabel = new Label(" Rotation");
|
|
|
+ tiltingCheckBox = new CheckBox();
|
|
|
+ borderPaneRotation.setLeft(tiltingCheckBox);
|
|
|
+ BorderPane.setAlignment(tiltingCheckBox, Pos.CENTER_LEFT);
|
|
|
+ rotationLabel = new Label(" Tilting");
|
|
|
rotationLabel.setOnMouseClicked(new EventHandler<MouseEvent>() {
|
|
|
@Override
|
|
|
public void handle(MouseEvent event) {
|
|
|
- rotationCheckBox.setSelected(!rotationCheckBox.isSelected());
|
|
|
- rotationClicked();
|
|
|
+ tiltingCheckBox.setSelected(!tiltingCheckBox.isSelected());
|
|
|
+ tiltingClicked();
|
|
|
}
|
|
|
});
|
|
|
Image imgRotationSymbol = new Image(getClass().getResource("/pictures/rotation.png").toString());
|
|
@@ -192,8 +195,8 @@ public class Main extends Application {
|
|
|
rotationLabel.setGraphic(imViewRotationSymbol);
|
|
|
borderPaneRotation.setCenter(rotationLabel);
|
|
|
paneRotation.setGraphic(borderPaneRotation);
|
|
|
- rotationCheckBox.setOnAction(event -> {
|
|
|
- rotationClicked();
|
|
|
+ tiltingCheckBox.setOnAction(event -> {
|
|
|
+ tiltingClicked();
|
|
|
event.consume();
|
|
|
});
|
|
|
|
|
@@ -300,17 +303,6 @@ public class Main extends Application {
|
|
|
Collections.swap(loadWorkingCollection, 2, 3);
|
|
|
loadHBox.getChildren().setAll(loadWorkingCollection);
|
|
|
|
|
|
- /* ((ScrollBar) root.lookup("#accelerationScrollBar")).valueProperty().addListener((observable, oldValue, newValue) -> {
|
|
|
- double d = newValue.intValue();
|
|
|
- Controller.getC().setAcceleration(d);
|
|
|
- ((Label) root.lookup("#accelerationLabel")).setText("Acceleration limit: " + d + " m/s²");
|
|
|
- });
|
|
|
-
|
|
|
- ((ScrollBar) root.lookup("#weightScrollBar")).valueProperty().addListener((observable, oldValue, newValue) -> {
|
|
|
- int w = newValue.intValue();
|
|
|
- Controller.getC().setWeight(w);
|
|
|
- ((Label) root.lookup("#weightLabel")).setText("Load limit: " + (w/10.0) + " Kg");
|
|
|
- });*/
|
|
|
|
|
|
ToggleGroup groupTemp = new ToggleGroup();
|
|
|
((RadioButton) root.lookup("#temperatureRadio1")).setToggleGroup(groupTemp);
|
|
@@ -480,15 +472,6 @@ public class Main extends Application {
|
|
|
Export.saveFilesTo(file);
|
|
|
}
|
|
|
});
|
|
|
- /* JFileChooser chooser = new JFileChooser();
|
|
|
- chooser.setCurrentDirectory(new File("."));
|
|
|
- chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
|
|
|
- chooser.setAcceptAllFileFilterUsed(false);
|
|
|
- chooser.showOpenDialog(null);
|
|
|
-
|
|
|
- if (chooser.getSelectedFile() != null) {
|
|
|
- Export.saveFilesTo(chooser.getSelectedFile());
|
|
|
- }*/
|
|
|
});
|
|
|
|
|
|
Image image = new Image(getClass().getResource("/pictures/information-icon-6086.png").toString());
|
|
@@ -527,6 +510,34 @@ public class Main extends Application {
|
|
|
imageViewSettings.setFitHeight(20);
|
|
|
((Button)root.lookup("#settingsButton")).setGraphic(imageViewSettings);
|
|
|
|
|
|
+ Image imgSnowflake = new Image(getClass().getResource("/pictures/snowflake.png").toString());
|
|
|
+ ImageView snowflakeIV = new ImageView(imgSnowflake);
|
|
|
+ snowflakeIV.setFitWidth(20);
|
|
|
+ snowflakeIV.setFitHeight(20);
|
|
|
+ Label snowflakeLabel = (Label) root.lookup("#temperatureFallingLabel");
|
|
|
+ snowflakeLabel.setGraphic(snowflakeIV);
|
|
|
+
|
|
|
+ Image imgFlame = new Image(getClass().getResource("/pictures/flame.png").toString());
|
|
|
+ ImageView flameIV = new ImageView(imgFlame);
|
|
|
+ flameIV.setFitWidth(20);
|
|
|
+ flameIV.setFitHeight(20);
|
|
|
+ Label flameLabel = (Label) root.lookup("#temperatureRisingLabel");
|
|
|
+ flameLabel.setGraphic(flameIV);
|
|
|
+
|
|
|
+ Image imgTilt = new Image(getClass().getResource("/pictures/tilt.png").toString());
|
|
|
+ ImageView tiltIV = new ImageView(imgTilt);
|
|
|
+ tiltIV.setFitWidth(20);
|
|
|
+ tiltIV.setFitHeight(20);
|
|
|
+ Label tiltLabel = (Label) root.lookup("#tiltLabel");
|
|
|
+ tiltLabel.setGraphic(tiltIV);
|
|
|
+
|
|
|
+ Image imgFlip = new Image(getClass().getResource("/pictures/flip.png").toString());
|
|
|
+ ImageView flipIV = new ImageView(imgFlip);
|
|
|
+ flipIV.setFitWidth(20);
|
|
|
+ flipIV.setFitHeight(20);
|
|
|
+ Label flipLabel = (Label) root.lookup("#flipLabel");
|
|
|
+ flipLabel.setGraphic(flipIV);
|
|
|
+
|
|
|
|
|
|
glassPane = new StackPane();
|
|
|
glassPane.setStyle("-fx-background-color: rgba(0, 0, 0, 0.2);");
|
|
@@ -640,7 +651,7 @@ public class Main extends Application {
|
|
|
createObjectButton.setDisable(!disable);
|
|
|
disableWeight();
|
|
|
disableTemperature();
|
|
|
- disableRotation();
|
|
|
+ disableTilting();
|
|
|
disablePressure();
|
|
|
|
|
|
root.lookup("#accelerationLabel").setDisable(!disable);
|
|
@@ -662,7 +673,7 @@ public class Main extends Application {
|
|
|
createObjectButton.setDisable(!disable);
|
|
|
disableAcceleration();
|
|
|
disableTemperature();
|
|
|
- disableRotation();
|
|
|
+ disableTilting();
|
|
|
disablePressure();
|
|
|
|
|
|
root.lookup("#weightLabel").setDisable(!disable);
|
|
@@ -684,9 +695,12 @@ public class Main extends Application {
|
|
|
createObjectButton.setDisable(!disable);
|
|
|
disableWeight();
|
|
|
disableAcceleration();
|
|
|
- disableRotation();
|
|
|
+ disableTilting();
|
|
|
disablePressure();
|
|
|
|
|
|
+ root.lookup("#temperatureRisingLabel").setDisable(!disable);
|
|
|
+ root.lookup("#temperatureFallingLabel").setDisable(!disable);
|
|
|
+
|
|
|
root.lookup("#temperatureRadio1").setDisable(!disable);
|
|
|
root.lookup("#temperatureRadio2").setDisable(!disable);
|
|
|
|
|
@@ -698,10 +712,12 @@ public class Main extends Application {
|
|
|
Controller.getC().temperature(false);
|
|
|
root.lookup("#temperatureRadio1").setDisable(true);
|
|
|
root.lookup("#temperatureRadio2").setDisable(true);
|
|
|
+ root.lookup("#temperatureRisingLabel").setDisable(true);
|
|
|
+ root.lookup("#temperatureFallingLabel").setDisable(true);
|
|
|
}
|
|
|
|
|
|
- private void rotationClicked() {
|
|
|
- boolean disable = rotationCheckBox.isSelected();
|
|
|
+ private void tiltingClicked() {
|
|
|
+ boolean disable = tiltingCheckBox.isSelected();
|
|
|
|
|
|
createObjectButton.setDisable(!disable);
|
|
|
disableWeight();
|
|
@@ -712,14 +728,20 @@ public class Main extends Application {
|
|
|
root.lookup("#rotationRadio1").setDisable(!disable);
|
|
|
root.lookup("#rotationRadio2").setDisable(!disable);
|
|
|
|
|
|
+ root.lookup("#tiltLabel").setDisable(!disable);
|
|
|
+ root.lookup("#flipLabel").setDisable(!disable);
|
|
|
+
|
|
|
Controller.getC().tilt(disable);
|
|
|
}
|
|
|
|
|
|
- private void disableRotation() {
|
|
|
- rotationCheckBox.setSelected(false);
|
|
|
+ private void disableTilting() {
|
|
|
+ tiltingCheckBox.setSelected(false);
|
|
|
Controller.getC().tilt(false);
|
|
|
root.lookup("#rotationRadio1").setDisable(true);
|
|
|
root.lookup("#rotationRadio2").setDisable(true);
|
|
|
+
|
|
|
+ root.lookup("#tiltLabel").setDisable(true);
|
|
|
+ root.lookup("#flipLabel").setDisable(true);
|
|
|
}
|
|
|
|
|
|
private void pressureClicked() {
|
|
@@ -728,7 +750,7 @@ public class Main extends Application {
|
|
|
createObjectButton.setDisable(!disable);
|
|
|
disableWeight();
|
|
|
disableTemperature();
|
|
|
- disableRotation();
|
|
|
+ disableTilting();
|
|
|
disableAcceleration();
|
|
|
|
|
|
//root.lookup("#pressureContent").setDisable(!disable);
|