Class ResourcefulJLayeredPane

All Implemented Interfaces:
dev.javai18n.core.Localizable.LocaleEventListener, dev.javai18n.core.Resourceful, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class ResourcefulJLayeredPane extends JLayeredPane implements dev.javai18n.core.Resourceful, dev.javai18n.core.Localizable.LocaleEventListener
A JLayeredPane that supports localizing the name, tool tip, font, accessible name and accessible description.
See Also:
  • Constructor Details

    • ResourcefulJLayeredPane

      protected ResourcefulJLayeredPane(dev.javai18n.core.Resource resource)
      Construct a ResourcefulJLayeredPane with the specified Resource.
      Parameters:
      resource - A Resource containing a JComponentPropertyBundle that holds the localized values for the JLayeredPane.
  • Method Details

    • create

      public static ResourcefulJLayeredPane create(dev.javai18n.core.Resource resource)
      Construct a ResourcefulJLayeredPane with the specified Resource.
      Parameters:
      resource - A Resource containing a JComponentPropertyBundle that holds the localized values for the JLayeredPane.
      Returns:
      A ResourcefulJLayeredPane with updated Locale-specific values that is registered to listen to LocaleEvents generated from the specified Resource's source.
    • initialize

      protected final void initialize()
      Initialize this component by setting its locale, updating locale-specific values, and registering to listen for locale events from the resource's source.
    • updateLocaleSpecificValues

      protected void updateLocaleSpecificValues()
      Applies locale-specific values from the associated resource bundle to this component.
    • processLocaleEvent

      public void processLocaleEvent(dev.javai18n.core.Localizable.LocaleEvent event)
      Update locale-specific values to reflect the new Locale.
      Specified by:
      processLocaleEvent in interface dev.javai18n.core.Localizable.LocaleEventListener
      Parameters:
      event - The LocaleEvent that has been raised.
    • getResource

      public dev.javai18n.core.Resource getResource()
      Get the Resource holding Locale specific values for the JLayeredPane.
      Specified by:
      getResource in interface dev.javai18n.core.Resourceful
      Returns:
      the Resource holding Locale specific values for the JLayeredPane.
    • setResource

      public void setResource(dev.javai18n.core.Resource resource)
      Set the Resource holding Locale specific values for the JLayeredPane.
      Specified by:
      setResource in interface dev.javai18n.core.Resourceful
      Parameters:
      resource - the Resource holding Locale specific values for the JLayeredPane.
    • dispose

      public void dispose()
      Unregister this component as a locale-event listener on its resource's source. Call this when the component is being permanently discarded so that it does not accumulate in the source's listener list.