com.alee.managers.language.updaters
Class JTabbedPaneLU

java.lang.Object
  extended by com.alee.managers.language.updaters.DefaultLanguageUpdater<javax.swing.JTabbedPane>
      extended by com.alee.managers.language.updaters.JTabbedPaneLU
All Implemented Interfaces:
LanguageUpdater<javax.swing.JTabbedPane>

public class JTabbedPaneLU
extends DefaultLanguageUpdater<javax.swing.JTabbedPane>

This class provides language default updates for JTabbedPane component. By default it uses provided language key and tab indices to determine single tab translation key. Basically if you provide "my.tab" language key for tabbed pane, first tab translation should have "my.tab.0" key. It can also depend on tab component name instead of the tab index if configured to do so.

Author:
Mikle Garin

Field Summary
protected  boolean useComponentNames
          Whether should use tab component name to determine tab translation key or not.
 
Fields inherited from class com.alee.managers.language.updaters.DefaultLanguageUpdater
DROP_TEXT, INPUT_PROMPT
 
Constructor Summary
JTabbedPaneLU()
          Constructs new LanguageUpdater for JTabbedPane component with default settings.
JTabbedPaneLU(boolean useComponentNames)
          Constructs new LanguageUpdater for JTabbedPane component with specified settings.
 
Method Summary
 boolean isUseComponentNames()
          Returns whether should use tab component name to determine tab translation key or not.
 void setUseComponentNames(boolean useComponentNames)
          Sets whether should use tab component name to determine tab translation key or not.
 void update(javax.swing.JTabbedPane c, java.lang.String key, Value value, java.lang.Object... data)
          Updates component language-dependant variables.
 
Methods inherited from class com.alee.managers.language.updaters.DefaultLanguageUpdater
getComponentClass, getDefaultText, getDefaultText, getDefaultText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

useComponentNames

protected boolean useComponentNames
Whether should use tab component name to determine tab translation key or not.

Constructor Detail

JTabbedPaneLU

public JTabbedPaneLU()
Constructs new LanguageUpdater for JTabbedPane component with default settings.


JTabbedPaneLU

public JTabbedPaneLU(boolean useComponentNames)
Constructs new LanguageUpdater for JTabbedPane component with specified settings.

Parameters:
useComponentNames - whether should use tab component name to determine tab translation key or not
Method Detail

isUseComponentNames

public boolean isUseComponentNames()
Returns whether should use tab component name to determine tab translation key or not.

Returns:
true if should use tab component name to determine tab translation key, false otherwise

setUseComponentNames

public void setUseComponentNames(boolean useComponentNames)
Sets whether should use tab component name to determine tab translation key or not.

Parameters:
useComponentNames - whether should use tab component name to determine tab translation key or not

update

public void update(javax.swing.JTabbedPane c,
                   java.lang.String key,
                   Value value,
                   java.lang.Object... data)
Updates component language-dependant variables.

Parameters:
c - component
key - language key
value - language value
data - formatting data