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

public class TabBinder extends Object implements ControlBinder
Binds the textProperty and tooltip of Tab controls to language keys.

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

The tooltip is bound using a key with the suffix .tooltip. If no tooltip is initially present, one is created automatically.

Since:
1.1.0
Author:
alan
  • Constructor Details

    • TabBinder

      public TabBinder()
  • Method Details

    • supports

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

      public void bind(Object control, String key)
      Binds the textProperty and tooltip.textProperty of the Tab 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