Class PI18NPanel

All Implemented Interfaces:
PAppComponent, PClientComponent, PCollectDataListener, PComponent, PComponentAttribute, PViewDataChangeListener, ContainerListener, ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible
Direct Known Subclasses:
PAddressPanel, PIAPaymentTypePanel, PNamePanel

public abstract class PI18NPanel extends PIACustomizablePanel implements PropertyChangeListener
An abstract general I18N panel which can be used to deal with the layout changes when account locale changed. You can derive your panel from this class and implement changeLayout in your panel when you need to change presentation of the widgets in your panel based on the account locale.
See Also:
  • Constructor Details

    • PI18NPanel

      public PI18NPanel()
  • Method Details

    • addNotify

      public void addNotify()
      Overrides:
      addNotify in class JComponent
    • propertyChange

      public void propertyChange(PropertyChangeEvent event)
      Updates the UI upon notification of a locale change.
      Specified by:
      propertyChange in interface PropertyChangeListener
    • setLayoutLocale

      public void setLayoutLocale(Locale newLocale)
      Sets the layout locale. This method is called automatically when users change the language setting in the general page during account creation; or open an account, switch to another account during account maintainance time.
      Parameters:
      newLocale - new layout locale
    • getLayoutLocale

      public Locale getLayoutLocale()
      Gets the current layout locale.
      Returns:
      current layout locale. If the current locale is null, return system default locale.
    • changeLayout

      public void changeLayout(Locale newLocale)
      You need to override changeLayout() in your panel. changeLayout() is called whenever the account is changed either during the account creation or account maintainance.
      Parameters:
      newLocale - new locale