TranslatorTool
public interface Translator
Modifier and Type | Method | Description |
---|---|---|
void |
associate(java.lang.Object obj,
java.lang.Class<?> type) |
Associates an object with a class for property lookup purposes.
|
java.lang.String |
getProperty(java.lang.Class<?> type,
java.lang.String key) |
Gets the localized value of a property for the specified class.
|
java.lang.String |
getProperty(java.lang.Class<?> type,
java.lang.String key,
java.lang.String defaultValue) |
Gets the localized value of a property for the specified class.
|
java.lang.String |
getProperty(java.lang.Object obj,
java.lang.String key) |
Gets the localized value of a property for the specified object.
|
java.lang.String |
getProperty(java.lang.Object obj,
java.lang.String key,
java.lang.String defaultValue) |
Gets the localized value of a property for the specified object.
|
void |
setVisible(boolean visible) |
Sets the visibility.
|
void |
showProperties(java.lang.Class<?> type) |
Shows the properties for the specified class.
|
java.lang.String getProperty(java.lang.Class<?> type, java.lang.String key)
type
- the class requesting the localized valuekey
- the string to localizejava.lang.String getProperty(java.lang.Class<?> type, java.lang.String key, java.lang.String defaultValue)
type
- the class requesting the localized valuekey
- the string to localizedefaultValue
- the default if no localized value foundjava.lang.String getProperty(java.lang.Object obj, java.lang.String key)
obj
- the object requesting the localized valuekey
- the string to localizejava.lang.String getProperty(java.lang.Object obj, java.lang.String key, java.lang.String defaultValue)
obj
- the object requesting the localized valuekey
- the string to localizedefaultValue
- the default if no localized value foundvoid associate(java.lang.Object obj, java.lang.Class<?> type)
obj
- the object needing translationstype
- the classvoid showProperties(java.lang.Class<?> type)
type
- the classvoid setVisible(boolean visible)
visible
- true to set this visible