org.PingOO.DLAI.lib.PWidget
Interface PComponent

All Known Subinterfaces:
PGUI
All Known Implementing Classes:
PButton, PCheckBox, PLabel, PList, PMenu, PMenuItem, PPanel, PPasswordField, PRadioButtonMenuItem, PScrollPane, PTable, PTextArea, PToggleButton, PToolBar, PTree, PPopupMenu, PInternalFileChooser, PSplitPane, PTabbedPane, PMultiLineTextPanel, PCheckBoxMenuItem, PTextField, PRadioButton, PComboBox

public abstract interface PComponent

Provides an interface for components that have some localized capabilities.

Since:
PingOO 2.0
Version:
2.0
Author:
Fabrice Bouyé (bouye@cur-archamps.fr)

Field Summary
static java.lang.String DEFAULT_MODULE
          Defines the module where to find this component's text and tool tip.
 
Method Summary
 PManager getManager()
          Returns the manager of this component.
 java.lang.String getModule()
          Returns the component's resources location.
 java.lang.String getTextKey()
          Returns the key used to find this component's text
 java.lang.String getToolTipKey()
          Returns the key used to find this component's tool tip.
 void setManager(PManager manager)
          Sets the manager of this component.
 void setModule(java.lang.String module)
          Sets The module where the component will search its resources
 void updateFont()
          Update the component's font.
 void updateLanguage()
          Update the component's text and tool tip with the default module.
 void updateLanguage(java.lang.String module)
          Update the component's text and tool tip with the current module.
 

Field Detail

DEFAULT_MODULE

public static final java.lang.String DEFAULT_MODULE
Defines the module where to find this component's text and tool tip.
Method Detail

updateFont

public void updateFont()
Update the component's font.

updateLanguage

public void updateLanguage()
Update the component's text and tool tip with the default module.

updateLanguage

public void updateLanguage(java.lang.String module)
Update the component's text and tool tip with the current module.
Parameters:
module - The module where the resources are stored.

setModule

public void setModule(java.lang.String module)
Sets The module where the component will search its resources
Parameters:
module - The new module. If null, the default resource set will be used.

setManager

public void setManager(PManager manager)
Sets the manager of this component.
Parameters:
manager - the new manager of this component, if manager is null, the component will use PManager.getInstance().

getManager

public PManager getManager()
Returns the manager of this component.
Returns:
The manager of this component.

getTextKey

public java.lang.String getTextKey()
Returns the key used to find this component's text
Returns:
The key used to find this button's text, null if the component does not support text.

getToolTipKey

public java.lang.String getToolTipKey()
Returns the key used to find this component's tool tip.
Returns:
The key used to find this button's tool tip, null if the component does not support tool tip.

getModule

public java.lang.String getModule()
Returns the component's resources location.
Returns:
The component's resources location or ResourceManager.DEFAULT_MODULE if the component has no defined module