added abort button
This commit is contained in:
parent
2785c04d78
commit
6fe7cb06c1
@ -10,6 +10,7 @@ import javafx.scene.layout.VBox;
|
|||||||
import javafx.scene.paint.Color;
|
import javafx.scene.paint.Color;
|
||||||
import javafx.stage.Modality;
|
import javafx.stage.Modality;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
|
import javafx.stage.StageStyle;
|
||||||
import res.Event;
|
import res.Event;
|
||||||
import res.DataController;
|
import res.DataController;
|
||||||
|
|
||||||
@ -41,13 +42,14 @@ public class MainController {
|
|||||||
protected void onAddBtnClick(){
|
protected void onAddBtnClick(){
|
||||||
try{
|
try{
|
||||||
FXMLLoader fxmlLoader = new FXMLLoader(MainApplication.class.getResource("create-event.fxml"));
|
FXMLLoader fxmlLoader = new FXMLLoader(MainApplication.class.getResource("create-event.fxml"));
|
||||||
Scene scene = new Scene(fxmlLoader.load(), 700, 500);
|
Scene scene = new Scene(fxmlLoader.load(), 850, 500);
|
||||||
scene.getStylesheets().add(Objects.requireNonNull(MainApplication.class.getResource("create-event.css")).toExternalForm());
|
scene.getStylesheets().add(Objects.requireNonNull(MainApplication.class.getResource("create-event.css")).toExternalForm());
|
||||||
Stage stage = new Stage();
|
Stage stage = new Stage();
|
||||||
stage.setTitle("Termin erstellen");
|
stage.setTitle("Termin erstellen");
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
||||||
stage.initModality(Modality.APPLICATION_MODAL);
|
stage.initModality(Modality.APPLICATION_MODAL);
|
||||||
stage.setResizable(false);
|
stage.setResizable(false);
|
||||||
|
stage.initStyle(StageStyle.UNDECORATED);
|
||||||
stage.showAndWait();
|
stage.showAndWait();
|
||||||
}
|
}
|
||||||
catch (IOException e){
|
catch (IOException e){
|
||||||
@ -71,4 +73,10 @@ public class MainController {
|
|||||||
Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();
|
Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();
|
||||||
stage.close();
|
stage.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
protected void abortBtnClick(ActionEvent event){
|
||||||
|
Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();
|
||||||
|
stage.close();
|
||||||
|
}
|
||||||
}
|
}
|
@ -3,6 +3,12 @@ GridPane{
|
|||||||
-fx-padding: 20px;
|
-fx-padding: 20px;
|
||||||
-fx-font-size: 20px;
|
-fx-font-size: 20px;
|
||||||
-fx-font-family: Segoe UI;
|
-fx-font-family: Segoe UI;
|
||||||
|
|
||||||
|
-fx-border-insets: 1;
|
||||||
|
-fx-border-color: white;
|
||||||
|
-fx-border-style: solid;
|
||||||
|
-fx-border-width: 2;
|
||||||
|
-fx-effect: dropshadow(three-pass-box, rgba(100, 100, 100, 1), 24, 0.5, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Label{
|
Label{
|
||||||
@ -22,4 +28,8 @@ Label{
|
|||||||
|
|
||||||
.inputField{
|
.inputField{
|
||||||
-fx-padding: 10px;
|
-fx-padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mainButton{
|
||||||
|
-fx-font-weight: bold;
|
||||||
}
|
}
|
@ -3,6 +3,7 @@
|
|||||||
<?import javafx.scene.control.*?>
|
<?import javafx.scene.control.*?>
|
||||||
<?import javafx.scene.layout.*?>
|
<?import javafx.scene.layout.*?>
|
||||||
|
|
||||||
|
<?import com.sun.javafx.scene.control.DatePickerContent?>
|
||||||
<GridPane xmlns="http://javafx.com/javafx/11.0.2" xmlns:fx="http://javafx.com/fxml/1" fx:controller="client.MainController">
|
<GridPane xmlns="http://javafx.com/javafx/11.0.2" xmlns:fx="http://javafx.com/fxml/1" fx:controller="client.MainController">
|
||||||
|
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
@ -10,6 +11,7 @@
|
|||||||
<ColumnConstraints/>
|
<ColumnConstraints/>
|
||||||
<ColumnConstraints/>
|
<ColumnConstraints/>
|
||||||
<ColumnConstraints halignment="RIGHT"/>
|
<ColumnConstraints halignment="RIGHT"/>
|
||||||
|
<ColumnConstraints halignment="RIGHT"/>
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints vgrow="ALWAYS" />
|
<RowConstraints vgrow="ALWAYS" />
|
||||||
@ -33,11 +35,12 @@
|
|||||||
|
|
||||||
<DatePicker GridPane.columnIndex="2" GridPane.rowIndex="1" maxWidth="300" minWidth="300"/>
|
<DatePicker GridPane.columnIndex="2" GridPane.rowIndex="1" maxWidth="300" minWidth="300"/>
|
||||||
<TextField GridPane.columnIndex="2" GridPane.rowIndex="2" maxWidth="300" minWidth="300"/>
|
<TextField GridPane.columnIndex="2" GridPane.rowIndex="2" maxWidth="300" minWidth="300"/>
|
||||||
<DatePicker GridPane.columnIndex="2" GridPane.rowIndex="3" maxWidth="300" minWidth="300"/>
|
<DatePicker GridPane.columnIndex="2" GridPane.rowIndex="3" maxWidth="300" minWidth="300"/>
|
||||||
<ComboBox GridPane.columnIndex="2" GridPane.rowIndex="4" maxWidth="300" minWidth="300"/>
|
<ComboBox GridPane.columnIndex="2" GridPane.rowIndex="4" maxWidth="300" minWidth="300"/>
|
||||||
<ComboBox GridPane.columnIndex="2" GridPane.rowIndex="5" maxWidth="100" minWidth="100"/>
|
<ComboBox GridPane.columnIndex="2" GridPane.rowIndex="5" maxWidth="100" minWidth="100"/>
|
||||||
<CheckBox GridPane.columnIndex="2" GridPane.rowIndex="6"/>
|
<CheckBox GridPane.columnIndex="2" GridPane.rowIndex="6"/>
|
||||||
|
|
||||||
<Button GridPane.columnIndex="3" GridPane.rowIndex="7" onAction="#createBtnClick" >Anlegen</Button>
|
<Button styleClass="mainButton" GridPane.columnIndex="4" GridPane.rowIndex="7" onAction="#createBtnClick" maxWidth="150" minWidth="150">Anlegen</Button>
|
||||||
|
<Button GridPane.columnIndex="3" GridPane.rowIndex="7" onAction="#abortBtnClick" maxWidth="150" minWidth="150" >Abbrechen</Button>
|
||||||
|
|
||||||
</GridPane>
|
</GridPane>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user