Interface Theme

    • Method Detail

      • getBackgroundPaint

        Paint getBackgroundPaint​(Container container)
        Background paint.
        Parameters:
        container - component
        Returns:
        background paint
      • getFocusedBackgroundPaint

        Paint getFocusedBackgroundPaint​(Container container)
        Background paint. This is used for the icon in the general preferences.
        Parameters:
        container - component
        Returns:
        background paint
      • getDescription

        String getDescription()
        Short description. Used in preferences.
        Returns:
        description
      • getId

        String getId()
        Persistent ID. Used in general preferences.
        Returns:
        unique, persistent id for this instance
      • isAvailable

        boolean isAvailable()
        Indicates, whether this Theme is available on the platform beaTunes is currently running on.
        Returns:
        true or false
      • paintBackground

        void paintBackground​(Graphics graphics,
                             Container container)
        Paints a themed background.
        Parameters:
        graphics - graphics
        container - component to paint in
      • activate

        void activate()
        Is called by the system, when the Theme is activated.
      • deactivate

        void deactivate()
        Is called by the system when the Theme is de-activated. The Theme is expected to return any UI defaults etc. to their original state.
      • requiresRestart

        boolean requiresRestart()
        Indicates that a restart is required to fully switch to or from this theme.
        Returns:
        true or false
      • customize

        void customize​(Container container)
        Is called by the systems for a number of different components and give this theme a chance to customize them.
        Parameters:
        container - component to customize
      • getResource

        URL getResource​(String resourceName)
        Used for theme specific loading of resources.
        Parameters:
        resourceName - name of a resource, e.g. "newplaylist.png"
        Returns:
        the resource URL or null, if the resource should be resolved by the application instead of the theme.
      • getLocalizedString

        String getLocalizedString​(String key)
        Returns a localized string. Lets you override the default strings
        Parameters:
        key - key
        Returns:
        localized string
        See Also:
        ResourceBundle.getString(String)
      • isLight

        default boolean isLight()
        Returns true, if the background color of this theme is generally light, rather than dark.
        Returns:
        true or false