Tristan971/EasyFXML

View on GitHub
easyfxml-samples/easyfxml-sample-hello-world/src/main/java/moe/tristan/easyfxml/samples/helloworld/view/hello/HelloView.fxml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Separator?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<!--
  ~ Copyright 2017 - 2019 EasyFXML project and contributors
  ~
  ~    Licensed under the Apache License, Version 2.0 (the "License");
  ~    you may not use this file except in compliance with the License.
  ~    You may obtain a copy of the License at
  ~
  ~        http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~    Unless required by applicable law or agreed to in writing, software
  ~    distributed under the License is distributed on an "AS IS" BASIS,
  ~    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~    See the License for the specific language governing permissions and
  ~    limitations under the License.
  -->

<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="0.0" prefHeight="212.0" prefWidth="370.0"
            xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1"
            fx:controller="moe.tristan.easyfxml.samples.helloworld.view.hello.HelloController">
    <top>
        <VBox minWidth="0.0" prefWidth="0.0" spacing="10.0" BorderPane.alignment="CENTER">
            <children>
                <Label alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minWidth="0.0" prefWidth="0.0" text="Hello World"
                       textAlignment="CENTER" wrapText="true" VBox.vgrow="NEVER">
                    <font>
                        <Font size="24.0"/>
                    </font>
                </Label>
                <Label alignment="CENTER" contentDisplay="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minWidth="0.0"
                       prefWidth="0.0" text="where everything begins!" textFill="#00000080" wrapText="true" VBox.vgrow="NEVER">
                    <font>
                        <Font size="14.0"/>
                    </font>
                </Label>
                <Separator prefWidth="200.0"/>
            </children>
            <BorderPane.margin>
                <Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
            </BorderPane.margin>
        </VBox>
    </top>
    <center>
        <VBox alignment="TOP_CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" spacing="10.0" BorderPane.alignment="TOP_CENTER">
            <children>
                <HBox alignment="TOP_CENTER" maxWidth="1.7976931348623157E308" spacing="10.0" VBox.vgrow="NEVER">
                    <children>
                        <Label alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" text="What is your name?"/>
                        <TextField fx:id="userNameTextField" promptText="mine is EasyFXML!"/>
                    </children>
                </HBox>
                <Button fx:id="helloButton" mnemonicParsing="false" prefWidth="96.0" text="Hello!"/>
                <HBox fx:id="greetingBox" alignment="CENTER" VBox.vgrow="NEVER">
                    <children>
                        <Label text="Hello, "/>
                        <Label fx:id="greetingName" maxHeight="1.7976931348623157E308" minWidth="0.0" text="GREETING_NAME" wrapText="true"/>
                        <Label text="!"/>
                    </children>
                </HBox>
            </children>
            <BorderPane.margin>
                <Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
            </BorderPane.margin>
        </VBox>
    </center>
</BorderPane>