Class ListViewItemBinder
java.lang.Object
io.github.snoopy137.languagemanager.binding.ListViewItemBinder
- All Implemented Interfaces:
ControlBinder
Binds specific
ListView
items to language keys.
This binder applies translation to specific string elements in the ListView's items list. It assumes the items are Strings and binds only the first item to the provided language key.
- Since:
- 1.1.0
- Author:
- alan
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ListViewItemBinder
public ListViewItemBinder()
-
-
Method Details
-
supports
Returnstrue
if the control is aListView
.- Specified by:
supports
in interfaceControlBinder
- Parameters:
control
- the control to check- Returns:
true
if the control is a ListView, otherwisefalse
-
bind
Binds the first item in theListView
to the specified language key. This method assumes the items are Strings.- Specified by:
bind
in interfaceControlBinder
- Parameters:
control
- the control to bindkey
- the language key used to retrieve localized text from the resource bundle
-