java.lang.Object
io.github.snoopy137.languagemanager.binding.MenuBinder
All Implemented Interfaces:
ControlBinder

public class MenuBinder extends Object implements ControlBinder
Binds the textProperty of Menu controls to language keys.

This binder checks whether a given control is an instance of Menu and binds its text to the language bundle using the provided key.

Since:
1.1.0
Author:
alan
  • Constructor Details

    • MenuBinder

      public MenuBinder()
  • Method Details

    • supports

      public boolean supports(Object control)
      Returns true if the control is a Menu.
      Specified by:
      supports in interface ControlBinder
      Parameters:
      control - the control to check
      Returns:
      true if the control is a Menu, otherwise false
    • bind

      public void bind(Object control, String key)
      Binds the textProperty of the Menu to the language key.
      Specified by:
      bind in interface ControlBinder
      Parameters:
      control - the control to bind
      key - the language key used to retrieve localized text from the resource bundle