test_class.declarator: mockGazePlay
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private GazePlay mockGazePlay;
test_class.type: GazePlay
test_class.var_name: mockGazePlay
test_class.declarator: mockTranslator
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Translator mockTranslator;
test_class.type: Translator
test_class.var_name: mockTranslator
test_class.declarator: mockConfig
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Configuration mockConfig;
test_class.type: Configuration
test_class.var_name: mockConfig
test_class.declarator: mockContext
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ConfigurationContext mockContext;
test_class.type: ConfigurationContext
test_class.var_name: mockContext
test_class.file: gazeplay-core/src/test/java/net/gazeplay/ui/scenes/configuration/ConfigurationContextTest.java
test_class.identifier: ConfigurationContextTest
test_case.body: @Test
      void shouldBuildLanguageChooser() throws InterruptedException {
          Platform.runLater(() -> {
              ConfigurationContext context = new ConfigurationContext(mockGazePlay);
              StringProperty languageProperty = new SimpleStringProperty("eng");
              StringProperty countryProperty = new SimpleStringProperty("GB");
  
              when(mockConfig.getLanguage()).thenReturn(languageProperty.getValue());
              when(mockConfig.getCountry()).thenReturn(countryProperty.getValue());
              when(mockConfig.getLanguageProperty()).thenReturn(languageProperty);
              when(mockConfig.getCountryProperty()).thenReturn(countryProperty);
              when(mockContext.getGazePlay()).thenReturn(mockGazePlay);
  
              MenuButton result = context.buildLanguageChooser(mockConfig, context);
  
              assertEquals(23, result.getItems().size());
  
              result.getItems().get(1).fire();
  
              ImageView image = (ImageView) result.getGraphic();
              assertTrue(image.getImage().getUrl().contains("Arab"));
              assertEquals("ara", languageProperty.getValue());
          });
          TestingUtils.waitForRunLater();
      }
test_case.class_method_signature: ConfigurationContextTest.shouldBuildLanguageChooser()
test_case.full_signature: @Test void shouldBuildLanguageChooser()
test_case.identifier: shouldBuildLanguageChooser
test_case.invocations: runLater thenReturn when getLanguage getValue thenReturn when getCountry getValue thenReturn when getLanguageProperty thenReturn when getCountryProperty thenReturn when getGazePlay buildLanguageChooser assertEquals size getItems fire get getItems getGraphic assertTrue contains getUrl getImage assertEquals getValue waitForRunLater
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldBuildLanguageChooser()
focal_class.declarator: COLON = "Colon"
focal_class.modifier: private static final
focal_class.original_string: private static final String COLON = "Colon";
focal_class.type: String
focal_class.var_name: COLON
focal_class.declarator: PREF_WIDTH = 200
focal_class.modifier: private static final
focal_class.original_string: private static final double PREF_WIDTH = 200;
focal_class.type: double
focal_class.var_name: PREF_WIDTH
focal_class.declarator: PREF_HEIGHT = 25
focal_class.modifier: private static final
focal_class.original_string: private static final double PREF_HEIGHT = 25;
focal_class.type: double
focal_class.var_name: PREF_HEIGHT
focal_class.declarator: currentLanguageAlignmentIsLeftAligned
focal_class.modifier: private final
focal_class.original_string: private final boolean currentLanguageAlignmentIsLeftAligned;
focal_class.type: boolean
focal_class.var_name: currentLanguageAlignmentIsLeftAligned
focal_class.file: gazeplay-core/src/main/java/net/gazeplay/ui/scenes/configuration/ConfigurationContext.java
focal_class.identifier: ConfigurationContext
focal_class.class_method_signature: ConfigurationContext.ConfigurationContext(GazePlay gazePlay)
focal_class.full_signature:   ConfigurationContext(GazePlay gazePlay)
focal_class.identifier: ConfigurationContext
focal_class.parameters: (GazePlay gazePlay)
focal_class.signature:  ConfigurationContext(GazePlay gazePlay)
focal_class.class_method_signature: ConfigurationContext.createHomeButtonInConfigurationManagementScreen(@NonNull GazePlay gazePlay)
focal_class.full_signature:  HomeButton createHomeButtonInConfigurationManagementScreen(@NonNull GazePlay gazePlay)
focal_class.identifier: createHomeButtonInConfigurationManagementScreen
focal_class.parameters: (@NonNull GazePlay gazePlay)
focal_class.return: HomeButton
focal_class.signature: HomeButton createHomeButtonInConfigurationManagementScreen(@NonNull GazePlay gazePlay)
focal_class.class_method_signature: ConfigurationContext.getChildren()
focal_class.full_signature: @Override public ObservableList<Node> getChildren()
focal_class.identifier: getChildren
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: ObservableList<Node>
focal_class.signature: ObservableList<Node> getChildren()
focal_class.class_method_signature: ConfigurationContext.buildConfigGridPane(ConfigurationContext configurationContext, Translator translator)
focal_class.full_signature:  GridPane buildConfigGridPane(ConfigurationContext configurationContext, Translator translator)
focal_class.identifier: buildConfigGridPane
focal_class.parameters: (ConfigurationContext configurationContext, Translator translator)
focal_class.return: GridPane
focal_class.signature: GridPane buildConfigGridPane(ConfigurationContext configurationContext, Translator translator)
focal_class.class_method_signature: ConfigurationContext.addCategoryTitle(GridPane grid, AtomicInteger currentFormRow, I18NText label)
focal_class.full_signature:  void addCategoryTitle(GridPane grid, AtomicInteger currentFormRow, I18NText label)
focal_class.identifier: addCategoryTitle
focal_class.parameters: (GridPane grid, AtomicInteger currentFormRow, I18NText label)
focal_class.return: void
focal_class.signature: void addCategoryTitle(GridPane grid, AtomicInteger currentFormRow, I18NText label)
focal_class.class_method_signature: ConfigurationContext.addSubCategoryTitle(GridPane grid, AtomicInteger currentFormRow, I18NText label)
focal_class.full_signature:  void addSubCategoryTitle(GridPane grid, AtomicInteger currentFormRow, I18NText label)
focal_class.identifier: addSubCategoryTitle
focal_class.parameters: (GridPane grid, AtomicInteger currentFormRow, I18NText label)
focal_class.return: void
focal_class.signature: void addSubCategoryTitle(GridPane grid, AtomicInteger currentFormRow, I18NText label)
focal_class.class_method_signature: ConfigurationContext.addToGrid(GridPane grid, AtomicInteger currentFormRow, I18NText label, final Node input)
focal_class.full_signature:  void addToGrid(GridPane grid, AtomicInteger currentFormRow, I18NText label, final Node input)
focal_class.identifier: addToGrid
focal_class.parameters: (GridPane grid, AtomicInteger currentFormRow, I18NText label, final Node input)
focal_class.return: void
focal_class.signature: void addToGrid(GridPane grid, AtomicInteger currentFormRow, I18NText label, final Node input)
focal_class.class_method_signature: ConfigurationContext.buildSpinner(
          double min,
          double max,
          double initialValue,
          double step,
          Property<Number> configProperty
      )
focal_class.full_signature: static Spinner<Double> buildSpinner(
          double min,
          double max,
          double initialValue,
          double step,
          Property<Number> configProperty
      )
focal_class.identifier: buildSpinner
focal_class.modifiers: static
focal_class.parameters: (
          double min,
          double max,
          double initialValue,
          double step,
          Property<Number> configProperty
      )
focal_class.return: Spinner<Double>
focal_class.signature: Spinner<Double> buildSpinner(
          double min,
          double max,
          double initialValue,
          double step,
          Property<Number> configProperty
      )
focal_class.class_method_signature: ConfigurationContext.buildStyleThemeChooser(Configuration configuration, ConfigurationContext configurationContext)
focal_class.full_signature: static ChoiceBox<BuiltInUiTheme> buildStyleThemeChooser(Configuration configuration, ConfigurationContext configurationContext)
focal_class.identifier: buildStyleThemeChooser
focal_class.modifiers: static
focal_class.parameters: (Configuration configuration, ConfigurationContext configurationContext)
focal_class.return: ChoiceBox<BuiltInUiTheme>
focal_class.signature: ChoiceBox<BuiltInUiTheme> buildStyleThemeChooser(Configuration configuration, ConfigurationContext configurationContext)
focal_class.class_method_signature: ConfigurationContext.buildStyleFileChooser(Configuration configuration,
                                                  ConfigurationContext configurationContext)
focal_class.full_signature: private static Button buildStyleFileChooser(Configuration configuration,
                                                  ConfigurationContext configurationContext)
focal_class.identifier: buildStyleFileChooser
focal_class.modifiers: private static
focal_class.parameters: (Configuration configuration,
                                                  ConfigurationContext configurationContext)
focal_class.return: Button
focal_class.signature: Button buildStyleFileChooser(Configuration configuration,
                                                  ConfigurationContext configurationContext)
focal_class.class_method_signature: ConfigurationContext.buildImageChooser(Configuration configuration,
                                     ConfigurationContext configurationContext,
                                     Translator translator)
focal_class.full_signature: private Node buildImageChooser(Configuration configuration,
                                     ConfigurationContext configurationContext,
                                     Translator translator)
focal_class.identifier: buildImageChooser
focal_class.modifiers: private
focal_class.parameters: (Configuration configuration,
                                     ConfigurationContext configurationContext,
                                     Translator translator)
focal_class.return: Node
focal_class.signature: Node buildImageChooser(Configuration configuration,
                                     ConfigurationContext configurationContext,
                                     Translator translator)
focal_class.class_method_signature: ConfigurationContext.buildDirectoryChooser(
          Configuration configuration,
          ConfigurationContext configurationContext,
          Translator translator,
          DirectoryType type
      )
focal_class.full_signature:  Node buildDirectoryChooser(
          Configuration configuration,
          ConfigurationContext configurationContext,
          Translator translator,
          DirectoryType type
      )
focal_class.identifier: buildDirectoryChooser
focal_class.parameters: (
          Configuration configuration,
          ConfigurationContext configurationContext,
          Translator translator,
          DirectoryType type
      )
focal_class.return: Node
focal_class.signature: Node buildDirectoryChooser(
          Configuration configuration,
          ConfigurationContext configurationContext,
          Translator translator,
          DirectoryType type
      )
focal_class.class_method_signature: ConfigurationContext.buildLanguageChooser(
          Configuration configuration,
          ConfigurationContext configurationContext
      )
focal_class.full_signature:  MenuButton buildLanguageChooser(
          Configuration configuration,
          ConfigurationContext configurationContext
      )
focal_class.identifier: buildLanguageChooser
focal_class.parameters: (
          Configuration configuration,
          ConfigurationContext configurationContext
      )
focal_class.return: MenuButton
focal_class.signature: MenuButton buildLanguageChooser(
          Configuration configuration,
          ConfigurationContext configurationContext
      )
focal_class.class_method_signature: ConfigurationContext.buildEyeTrackerConfigChooser(Configuration configuration)
focal_class.full_signature: static ChoiceBox<EyeTracker> buildEyeTrackerConfigChooser(Configuration configuration)
focal_class.identifier: buildEyeTrackerConfigChooser
focal_class.modifiers: static
focal_class.parameters: (Configuration configuration)
focal_class.return: ChoiceBox<EyeTracker>
focal_class.signature: ChoiceBox<EyeTracker> buildEyeTrackerConfigChooser(Configuration configuration)
focal_class.class_method_signature: ConfigurationContext.findSelectedEyeTracker(Configuration configuration)
focal_class.full_signature: private static EyeTracker findSelectedEyeTracker(Configuration configuration)
focal_class.identifier: findSelectedEyeTracker
focal_class.modifiers: private static
focal_class.parameters: (Configuration configuration)
focal_class.return: EyeTracker
focal_class.signature: EyeTracker findSelectedEyeTracker(Configuration configuration)
focal_class.class_method_signature: ConfigurationContext.buildCheckBox(BooleanProperty selectionProperty)
focal_class.full_signature: static CheckBox buildCheckBox(BooleanProperty selectionProperty)
focal_class.identifier: buildCheckBox
focal_class.modifiers: static
focal_class.parameters: (BooleanProperty selectionProperty)
focal_class.return: CheckBox
focal_class.signature: CheckBox buildCheckBox(BooleanProperty selectionProperty)
focal_class.class_method_signature: ConfigurationContext.buildBackgroundStyleToggleGroup(
          Configuration configuration,
          Translator translator
      )
focal_class.full_signature: private HBox buildBackgroundStyleToggleGroup(
          Configuration configuration,
          Translator translator
      )
focal_class.identifier: buildBackgroundStyleToggleGroup
focal_class.modifiers: private
focal_class.parameters: (
          Configuration configuration,
          Translator translator
      )
focal_class.return: HBox
focal_class.signature: HBox buildBackgroundStyleToggleGroup(
          Configuration configuration,
          Translator translator
      )
focal_class.class_method_signature: ConfigurationContext.buildGazeMenu(Configuration configuration)
focal_class.full_signature: private static CheckBox buildGazeMenu(Configuration configuration)
focal_class.identifier: buildGazeMenu
focal_class.modifiers: private static
focal_class.parameters: (Configuration configuration)
focal_class.return: CheckBox
focal_class.signature: CheckBox buildGazeMenu(Configuration configuration)
focal_class.class_method_signature: ConfigurationContext.buildGameButtonOrientationChooser(
          Configuration configuration
      )
focal_class.full_signature: static ChoiceBox<GameButtonOrientation> buildGameButtonOrientationChooser(
          Configuration configuration
      )
focal_class.identifier: buildGameButtonOrientationChooser
focal_class.modifiers: static
focal_class.parameters: (
          Configuration configuration
      )
focal_class.return: ChoiceBox<GameButtonOrientation>
focal_class.signature: ChoiceBox<GameButtonOrientation> buildGameButtonOrientationChooser(
          Configuration configuration
      )
focal_class.class_method_signature: ConfigurationContext.changeMusicFolder(final String newMusicFolder, Configuration config)
focal_class.full_signature: static void changeMusicFolder(final String newMusicFolder, Configuration config)
focal_class.identifier: changeMusicFolder
focal_class.modifiers: static
focal_class.parameters: (final String newMusicFolder, Configuration config)
focal_class.return: void
focal_class.signature: void changeMusicFolder(final String newMusicFolder, Configuration config)
focal_class.class_method_signature: ConfigurationContext.setupNewMusicFolder(File gazePlayMusicFolder, String defaultSong)
focal_class.full_signature: static void setupNewMusicFolder(File gazePlayMusicFolder, String defaultSong)
focal_class.identifier: setupNewMusicFolder
focal_class.modifiers: static
focal_class.parameters: (File gazePlayMusicFolder, String defaultSong)
focal_class.return: void
focal_class.signature: void setupNewMusicFolder(File gazePlayMusicFolder, String defaultSong)
focal_class.class_method_signature: ConfigurationContext.findSelectedGameButtonOrientation(Configuration configuration)
focal_class.full_signature: private static GameButtonOrientation findSelectedGameButtonOrientation(Configuration configuration)
focal_class.identifier: findSelectedGameButtonOrientation
focal_class.modifiers: private static
focal_class.parameters: (Configuration configuration)
focal_class.return: GameButtonOrientation
focal_class.signature: GameButtonOrientation findSelectedGameButtonOrientation(Configuration configuration)
focal_class.class_method_signature: ConfigurationContext.buildQuitKeyChooser(
          Configuration configuration
      )
focal_class.full_signature:  ChoiceBox<String> buildQuitKeyChooser(
          Configuration configuration
      )
focal_class.identifier: buildQuitKeyChooser
focal_class.parameters: (
          Configuration configuration
      )
focal_class.return: ChoiceBox<String>
focal_class.signature: ChoiceBox<String> buildQuitKeyChooser(
          Configuration configuration
      )
focal_class.class_method_signature: ConfigurationContext.buildHeatMapOpacityChoiceBox(Configuration config)
focal_class.full_signature:  ChoiceBox<Double> buildHeatMapOpacityChoiceBox(Configuration config)
focal_class.identifier: buildHeatMapOpacityChoiceBox
focal_class.parameters: (Configuration config)
focal_class.return: ChoiceBox<Double>
focal_class.signature: ChoiceBox<Double> buildHeatMapOpacityChoiceBox(Configuration config)
focal_class.class_method_signature: ConfigurationContext.fillHBoxWithColorPickers(HBox hbox, Configuration config)
focal_class.full_signature: private void fillHBoxWithColorPickers(HBox hbox, Configuration config)
focal_class.identifier: fillHBoxWithColorPickers
focal_class.modifiers: private
focal_class.parameters: (HBox hbox, Configuration config)
focal_class.return: void
focal_class.signature: void fillHBoxWithColorPickers(HBox hbox, Configuration config)
focal_class.class_method_signature: ConfigurationContext.buildHeatMapColorHBox(Configuration config, Translator translator)
focal_class.full_signature:  HBox buildHeatMapColorHBox(Configuration config, Translator translator)
focal_class.identifier: buildHeatMapColorHBox
focal_class.parameters: (Configuration config, Translator translator)
focal_class.return: HBox
focal_class.signature: HBox buildHeatMapColorHBox(Configuration config, Translator translator)
focal_class.class_method_signature: ConfigurationContext.buildLimiterTime(Configuration config, Translator translator)
focal_class.full_signature: private HBox buildLimiterTime(Configuration config, Translator translator)
focal_class.identifier: buildLimiterTime
focal_class.modifiers: private
focal_class.parameters: (Configuration config, Translator translator)
focal_class.return: HBox
focal_class.signature: HBox buildLimiterTime(Configuration config, Translator translator)
focal_class.class_method_signature: ConfigurationContext.buildLimiterScore(Configuration config, Translator translator)
focal_class.full_signature: private HBox buildLimiterScore(Configuration config, Translator translator)
focal_class.identifier: buildLimiterScore
focal_class.modifiers: private
focal_class.parameters: (Configuration config, Translator translator)
focal_class.return: HBox
focal_class.signature: HBox buildLimiterScore(Configuration config, Translator translator)
focal_class.class_method_signature: ConfigurationContext.updateHeatMapColorProperty(HBox hbox, Configuration config)
focal_class.full_signature: private void updateHeatMapColorProperty(HBox hbox, Configuration config)
focal_class.identifier: updateHeatMapColorProperty
focal_class.modifiers: private
focal_class.parameters: (HBox hbox, Configuration config)
focal_class.return: void
focal_class.signature: void updateHeatMapColorProperty(HBox hbox, Configuration config)
focal_class.superclass: extends GraphicalContext<BorderPane>
focal_method.body: MenuButton buildLanguageChooser(
          Configuration configuration,
          ConfigurationContext configurationContext
      ) {
          String currentCodeLanguage = configuration.getLanguage();
          String currentCodeCountry = configuration.getCountry();
          Locale currentLocale = new Locale(currentCodeLanguage, currentCodeCountry);
          LanguageDetails currentLanguageDetails = Languages.getLocale(currentLocale);
  
          Image currentFlag = new Image(currentLanguageDetails.getFlags().get(0));
          ImageView currentFlagImageView = new ImageView(currentFlag);
          currentFlagImageView.setPreserveRatio(true);
          currentFlagImageView.setFitHeight(25);
  
          MenuButton languageBox = new MenuButton(currentLanguageDetails.getLabel(), currentFlagImageView);
  
          for (LanguageDetails language : Languages.getAllLanguageDetails()) {
  
              List<String> flags = language.getFlags();
  
              for (String flag : flags) {
  
                  Image image = new Image(flag);
                  ImageView imageView = new ImageView(image);
                  imageView.setPreserveRatio(true);
                  imageView.setFitHeight(25);
  
                  MenuItem languagesItem = new MenuItem(language.getLabel(), imageView);
  
                  languagesItem.setOnAction(eventMenuLanguages -> {
  
                      configuration.getLanguageProperty().setValue(language.getLocale().getLanguage());
                      configuration.getCountryProperty().setValue(language.getLocale().getCountry());
  
                      configurationContext.getGazePlay().getTranslator().notifyLanguageChanged();
  
                      languageBox.setText(language.getLabel());
  
                      ImageView newImage = new ImageView(image);
                      newImage.setPreserveRatio(true);
                      newImage.setFitHeight(25);
                      languageBox.setGraphic(newImage);
  
                      if (language.isLeftAligned() != currentLanguageAlignmentIsLeftAligned) {
                          Alert alert = new Alert(Alert.AlertType.INFORMATION);
                          alert.setTitle("Language information");
                          alert.setHeaderText(
                              "Alignment settings have just changed for your language, please restart GazePlay for the new changes to take effect.");
                          alert.show();
                      }
                      if (!language.isStableTranslationAvailable()) {
                          Alert alert = new Alert(Alert.AlertType.INFORMATION);
                          alert.setTitle("Language information");
                          alert.setHeaderText(
                              "Translation has just been performed for your language. If you think that some words sound odd in the games, it is maybe a problem of translation. \nPlease contact us to propose better ones at www.gazeplay.net and they will be in the next version.");
                          alert.show();
                      }
                  });
  
                  languageBox.getItems().add(languagesItem);
              }
          }
  
          languageBox.setPrefWidth(PREF_WIDTH);
          languageBox.setPrefHeight(PREF_HEIGHT);
  
          return languageBox;
      }
focal_method.class_method_signature: ConfigurationContext.buildLanguageChooser(
          Configuration configuration,
          ConfigurationContext configurationContext
      )
focal_method.full_signature:  MenuButton buildLanguageChooser(
          Configuration configuration,
          ConfigurationContext configurationContext
      )
focal_method.identifier: buildLanguageChooser
focal_method.invocations: getLanguage getCountry getLocale get getFlags setPreserveRatio setFitHeight getLabel getAllLanguageDetails getFlags setPreserveRatio setFitHeight getLabel setOnAction setValue getLanguageProperty getLanguage getLocale setValue getCountryProperty getCountry getLocale notifyLanguageChanged getTranslator getGazePlay setText getLabel setPreserveRatio setFitHeight setGraphic isLeftAligned setTitle setHeaderText show isStableTranslationAvailable setTitle setHeaderText show add getItems setPrefWidth setPrefHeight
focal_method.parameters: (
          Configuration configuration,
          ConfigurationContext configurationContext
      )
focal_method.return: MenuButton
focal_method.signature: MenuButton buildLanguageChooser(
          Configuration configuration,
          ConfigurationContext configurationContext
      )