Skip to content
Snippets Groups Projects
view.fxml 2.97 KiB
Newer Older
  • Learn to ignore specific revisions
  • <?xml version="1.0" encoding="UTF-8"?>
    
    <?import javafx.scene.control.Button?>
    
    <?import javafx.scene.control.Label?>
    <?import javafx.scene.control.Separator?>
    <?import javafx.scene.control.ToggleButton?>
    
    <?import javafx.scene.layout.HBox?>
    <?import javafx.scene.layout.VBox?>
    <?import view.FirefighterGrid?>
    
    <HBox styleClass="background" stylesheets="@DarkTheme.css"
    
          xmlns="http://javafx.com/javafx"
          xmlns:fx="http://javafx.com/fxml"
    
          fx:controller="controller.Controller">
      <VBox>
        <Separator maxHeight="-Infinity" maxWidth="-Infinity"
    
                   prefHeight="24.0" prefWidth="200.0" />
        <Label maxHeight="-Infinity" maxWidth="-Infinity"
               alignment="CENTER" prefHeight="24.0" prefWidth="200.0"
               text="Generation number" />
        <Label fx:id="generationNumberLabel"
               alignment="CENTER" contentDisplay="TEXT_ONLY"
               maxHeight="-Infinity" maxWidth="-Infinity"
               prefHeight="24.0" prefWidth="200.0" />
    
        <Separator maxHeight="-Infinity" maxWidth="-Infinity"
    
                   prefHeight="24.0" prefWidth="200.0" />
    
        <Button fx:id="restartButton" maxHeight="-Infinity" maxWidth="-Infinity"
    
                mnemonicParsing="false" onAction="#restartButtonAction"
                prefHeight="24.0" prefWidth="200.0" text="Restart" />
    
        <Button fx:id="oneStepButton" maxHeight="-Infinity" maxWidth="-Infinity"
    
                mnemonicParsing="false" onAction="#oneStepButtonAction"
                prefHeight="24.0" prefWidth="200.0" text="One step" />
    
        <ToggleButton fx:id="playToggleButton" maxHeight="-Infinity" maxWidth="-Infinity"
    
                      mnemonicParsing="false" onAction="#playToggleButtonAction"
                      prefHeight="24.0" prefWidth="200.0"
                      styleClass="button" text="Play" />
    
        <ToggleButton fx:id="pauseToggleButton" maxHeight="-Infinity" maxWidth="-Infinity"
    
                      mnemonicParsing="false" onAction="#pauseToggleButtonAction"
                      prefHeight="24.0" prefWidth="200.0"
                      styleClass="button" text="Pause" />
    
    Yanis OUALAN's avatar
    Yanis OUALAN committed
        <ToggleButton fx:id="initFireFighter" maxHeight="-Infinity" maxWidth="-Infinity"
                      mnemonicParsing="false" onAction="#initializeFireFighter"
                      prefHeight="24.0" prefWidth="200.0"
                      styleClass="button" text="Start FireFighter" />
        <ToggleButton fx:id="initVirus" maxHeight="-Infinity" maxWidth="-Infinity"
                      mnemonicParsing="false" onAction="#initializeDoctor"
                      prefHeight="24.0" prefWidth="200.0"
                      styleClass="button" text="Start Virus" />
        <ToggleButton fx:id="initPfc" maxHeight="-Infinity" maxWidth="-Infinity"
                      mnemonicParsing="false" onAction="#initializePfc"
                      prefHeight="24.0" prefWidth="200.0"
                      styleClass="button" text="Start RockPaperCisor" />
    
      </VBox>
      <FirefighterGrid fx:id="grid"
                       xmlns="http://javafx.com/javafx"
                       xmlns:fx="http://javafx.com/fxml">
      </FirefighterGrid>
    </HBox>