com.alee.managers.language
Interface LanguageMethods

All Superinterfaces:
SwingMethods
All Known Implementing Classes:
DictionariesTreeRenderer, GenericCellEditor, HotkeyTipLabel, ImagePreviewFrame, LanguageExample.MyLabel, LibraryInfoDialog, NinePatchEditorDialog, SampleTreeCellRenderer, StyleEditor, TestFrame, ViewTabbedPane, WebAsyncTreeCellRenderer, WebAsyncTreeFilterField, WebBooleanRenderer, WebBreadcrumbButton, WebBreadcrumbLabel, WebBreadcrumbToggleButton, WebButton, WebCheckBox, WebCheckBoxListElement, WebCheckBoxMenuItem, WebClock, WebCollapsiblePane, WebColorChooserDialog, WebColorChooserField, WebComboBoxElement, WebCursorTracker, WebDateField, WebDateRenderer, WebDialog, WebDirectoryChooser, WebDockableFrame, WebDoubleRenderer, WebEditorPane, WebExtendedOptionPane, WebFadeDialog, WebFileChooser, WebFileDrop, WebFileListCellRenderer, WebFileTableCellRenderer, WebFileTreeCellRenderer, WebFormattedTextField, WebFrame, WebHotkeyField, WebHotkeyLabel, WebIconRenderer, WebInternalFrame, WebLabel, WebLinkLabel, WebListCellRenderer, WebListCellRenderer.UIResource, WebListElement, WebLookAndFeelDemo, WebMemoryBar, WebMenu, WebMenuItem, WebMultiLineLabel, WebNumberRenderer, WebPasswordField, WebPopOver, WebProgressBar, WebProgressDialog, WebRadioButton, WebRadioButtonMenuItem, WebRootPaneUI.TitleLabel, WebSplitButton, WebStatusLabel, WebStepLabel, WebTabbedPane, WebTableCellRenderer, WebTableCellRenderer.UIResource, WebTableHeaderCellRenderer, WebTableHeaderCellRenderer.UIResource, WebTextArea, WebTextField, WebTextPane, WebToggleButton, WebTreeCellRenderer, WebTreeElement, WebTristateCheckBox, WebVerticalLabel

public interface LanguageMethods
extends SwingMethods

This interface provides a set of methods that should be added into components that has translateable text and support translation. Basically all these methods are already implemented in LanguageManager but it is much easier to call them directly from component.

Author:
Mikle Garin
See Also:
SwingMethods, LanguageManager

Method Summary
 boolean isLanguageSet()
          Returns whether this component registered in LanguageManager or not.
 void removeLanguage()
          Unregisters component from LanguageManager.
 void removeLanguageUpdater()
          Unregisters any custom language updater set for this component.
 void setLanguage(java.lang.String key, java.lang.Object... data)
          Registers component in LanguageManager under specified key and with specified formatting data.
 void setLanguageUpdater(LanguageUpdater updater)
          Registers custom language updater for this component.
 void updateLanguage(java.lang.Object... data)
          Updates component language and formatting data.
 void updateLanguage(java.lang.String key, java.lang.Object... data)
          Changes component language key and updates its language and formatting data.
 

Method Detail

setLanguage

void setLanguage(java.lang.String key,
                 java.lang.Object... data)
Registers component in LanguageManager under specified key and with specified formatting data.

Parameters:
key - language record key
data - formatting data

updateLanguage

void updateLanguage(java.lang.Object... data)
Updates component language and formatting data.

Parameters:
data - new formatting data

updateLanguage

void updateLanguage(java.lang.String key,
                    java.lang.Object... data)
Changes component language key and updates its language and formatting data.

Parameters:
key - new language key
data - new formatting data

removeLanguage

void removeLanguage()
Unregisters component from LanguageManager.


isLanguageSet

boolean isLanguageSet()
Returns whether this component registered in LanguageManager or not.

Returns:
true if component is registered in LanguageManager, false otherwise

setLanguageUpdater

void setLanguageUpdater(LanguageUpdater updater)
Registers custom language updater for this component.

Parameters:
updater - component language updater

removeLanguageUpdater

void removeLanguageUpdater()
Unregisters any custom language updater set for this component.