Class SelectController


  • public class SelectController
    extends java.lang.Object

    SelectController

    A SelectController is a controller for ScoreBoard scene.

    Since:
    1.0
    Version:
    1.0
    Author:
    Song Zhang
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private javafx.scene.control.ComboBox backgroundComboBox
      The background combobox shown on the screen.
      private javafx.scene.control.ListView levelListView
      The level list shown on the screen.
      private Map map
      The Map for storing some configurations.
      private javafx.scene.control.TextField nicknameTextField
      The nickname text field shown on the screen.
      private javafx.scene.control.ComboBox wallComboBox
      The wall combobox shown on the screen.
    • Field Detail

      • backgroundComboBox

        private javafx.scene.control.ComboBox backgroundComboBox
        The background combobox shown on the screen.
      • wallComboBox

        private javafx.scene.control.ComboBox wallComboBox
        The wall combobox shown on the screen.
      • levelListView

        private javafx.scene.control.ListView levelListView
        The level list shown on the screen.
      • nicknameTextField

        private javafx.scene.control.TextField nicknameTextField
        The nickname text field shown on the screen.
      • map

        private Map map
        The Map for storing some configurations.
    • Constructor Detail

      • SelectController

        public SelectController()
    • Method Detail

      • initialize

        public void initialize()
        Called when the UI is initialized.

        This method initializes UI and a default configuration in to map.

      • handleNicknameChange

        protected void handleNicknameChange()
        Called when the nickname text field is changed.

        This methods updates the nickname according to user's input.

      • handleBackgroundChange

        protected void handleBackgroundChange()
        Called when the background combo box is changed.

        This methods updates the background file name according to user's choice.

      • handleWallChange

        protected void handleWallChange()
        Called when the wall combo box is changed.

        This methods updates the wall file name according to user's choice.

      • handleLevelChange

        protected void handleLevelChange()
        Called when the level selection is changed.

        This methods updates the level file name according to user's choice.

      • handleGoClicked

        protected void handleGoClicked()
        Called when the Go button is clicked.

        This methods switches to the Game scene.

      • handleBackClicked

        protected void handleBackClicked()
        Called when the Back button is clicked.

        This methods switches to the Home scene.

      • initBackgroundComboBox

        private void initBackgroundComboBox()
        Called when the Go button is clicked.

        This methods switches to the Game scene.

      • initWallComboBox

        private void initWallComboBox()
        Initializes the wall combo box.
      • initLevelListView

        private void initLevelListView()
        Initializes the wall combo box.