Загрузка данных


<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.Font?>

<VBox alignment="CENTER" spacing="15.0" style="-fx-background-color: #2c3e50; -fx-border-radius: 10; -fx-background-radius: 10;" xmlns="http://javafx.com/javafx/11.0.2" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.demo.HelloController">
    <padding>
        <Insets bottom="25.0" left="25.0" right="25.0" top="25.0" />
    </padding>

    <StackPane style="-fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.3), 10, 0, 0, 5); -fx-background-radius: 5;">
        <TextField fx:id="display" editable="false" alignment="CENTER_RIGHT" prefHeight="60.0" style="-fx-background-color: #ecf0f1; -fx-background-radius: 5; -fx-text-fill: #2c3e50; -fx-padding: 0 15 0 15;">
            <font>
                <Font name="Segoe UI Bold" size="24.0" />
            </font>
        </TextField>
    </StackPane>

    <GridPane hgap="12.0" vgap="12.0">
        <fx:define>
            <String fx:id="digitStyle" fx:value="-fx-background-color: #34495e; -fx-text-fill: #ecf0f1; -fx-background-radius: 5; -fx-font-size: 18; -fx-font-weight: bold; -fx-cursor: hand;" />
            <String fx:id="opStyle" fx:value="-fx-background-color: #f39c12; -fx-text-fill: white; -fx-background-radius: 5; -fx-font-size: 18; -fx-font-weight: bold; -fx-cursor: hand;" />
        </fx:define>

        <Button onAction="#onDigitClick" text="7" prefWidth="65" prefHeight="65" style="$digitStyle" GridPane.columnIndex="0" GridPane.rowIndex="0" />
        <Button onAction="#onDigitClick" text="8" prefWidth="65" prefHeight="65" style="$digitStyle" GridPane.columnIndex="1" GridPane.rowIndex="0" />
        <Button onAction="#onDigitClick" text="9" prefWidth="65" prefHeight="65" style="$digitStyle" GridPane.columnIndex="2" GridPane.rowIndex="0" />
        <Button onAction="#onOperatorClick" text="/" prefWidth="65" prefHeight="65" style="$opStyle" GridPane.columnIndex="3" GridPane.rowIndex="0" />

        <Button onAction="#onDigitClick" text="4" prefWidth="65" prefHeight="65" style="$digitStyle" GridPane.columnIndex="0" GridPane.rowIndex="1" />
        <Button onAction="#onDigitClick" text="5" prefWidth="65" prefHeight="65" style="$digitStyle" GridPane.columnIndex="1" GridPane.rowIndex="1" />
        <Button onAction="#onDigitClick" text="6" prefWidth="65" prefHeight="65" style="$digitStyle" GridPane.columnIndex="2" GridPane.rowIndex="1" />
        <Button onAction="#onOperatorClick" text="*" prefWidth="65" prefHeight="65" style="$opStyle" GridPane.columnIndex="3" GridPane.rowIndex="1" />

        <Button onAction="#onDigitClick" text="1" prefWidth="65" prefHeight="65" style="$digitStyle" GridPane.columnIndex="0" GridPane.rowIndex="2" />
        <Button onAction="#onDigitClick" text="2" prefWidth="65" prefHeight="65" style="$digitStyle" GridPane.columnIndex="1" GridPane.rowIndex="2" />
        <Button onAction="#onDigitClick" text="3" prefWidth="65" prefHeight="65" style="$digitStyle" GridPane.columnIndex="2" GridPane.rowIndex="2" />
        <Button onAction="#onOperatorClick" text="-" prefWidth="65" prefHeight="65" style="$opStyle" GridPane.columnIndex="3" GridPane.rowIndex="2" />

        <Button onAction="#onDigitClick" text="0" prefWidth="65" prefHeight="65" style="$digitStyle" GridPane.columnIndex="0" GridPane.rowIndex="3" />
        <Button onAction="#onClearClick" text="C" prefWidth="65" prefHeight="65" style="-fx-background-color: #e74c3c; -fx-text-fill: white; -fx-background-radius: 5; -fx-font-size: 18; -fx-font-weight: bold; -fx-cursor: hand;" GridPane.columnIndex="1" GridPane.rowIndex="3" />
        <Button onAction="#onResultClick" text="=" prefWidth="65" prefHeight="65" style="-fx-background-color: #2ecc71; -fx-text-fill: white; -fx-background-radius: 5; -fx-font-size: 18; -fx-font-weight: bold; -fx-cursor: hand;" GridPane.columnIndex="2" GridPane.rowIndex="3" />
        <Button onAction="#onOperatorClick" text="+" prefWidth="65" prefHeight="65" style="$opStyle" GridPane.columnIndex="3" GridPane.rowIndex="3" />
    </GridPane>
</VBox>