Package com.tagtraum.beatunes.plaf
Class WindowsTheme
- java.lang.Object
-
- com.tagtraum.beatunes.plaf.WindowsTheme
-
- All Implemented Interfaces:
Theme
public class WindowsTheme extends Object implements Theme
Win8 Theme.- Author:
- Hendrik Schreiber
-
-
Field Summary
-
Fields inherited from interface com.tagtraum.beatunes.plaf.Theme
PAINT_FANCY_BACKGROUND, PAINT_PLAIN_BACKGROUND
-
-
Constructor Summary
Constructors Constructor Description WindowsTheme()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate()Is called by the system, when the Theme is activated.voidcustomize(Container container)Is called by the systems for a number of different components and give this theme a chance to customize them.voiddeactivate()Is called by the system when the Theme is de-activated.booleanequals(Object obj)PaintgetBackgroundPaint(Container container)Background paint.StringgetDescription()Short description.PaintgetFocusedBackgroundPaint(Container container)Background paint.StringgetId()Persistent ID.StringgetLocalizedString(String key)Returns a localized string.URLgetResource(String resourceName)Used for theme specific loading of resources.ColorgetUnfocusedBackgroundColor()inthashCode()booleanisAvailable()Indicates, whether this Theme is available on the platform beaTunes is currently running on.voidpaintBackground(Graphics graphics, Container container)Paints a themed background.booleanrequiresRestart()Indicates that a restart is required to fully switch to or from this theme.StringtoString()
-
-
-
Method Detail
-
getBackgroundPaint
public Paint getBackgroundPaint(Container container)
Description copied from interface:ThemeBackground paint.- Specified by:
getBackgroundPaintin interfaceTheme- Parameters:
container- component- Returns:
- background paint
-
getFocusedBackgroundPaint
public Paint getFocusedBackgroundPaint(Container container)
Description copied from interface:ThemeBackground paint. This is used for the icon in the general preferences.- Specified by:
getFocusedBackgroundPaintin interfaceTheme- Parameters:
container- component- Returns:
- background paint
-
getUnfocusedBackgroundColor
public Color getUnfocusedBackgroundColor()
-
getDescription
public String getDescription()
Description copied from interface:ThemeShort description. Used in preferences.- Specified by:
getDescriptionin interfaceTheme- Returns:
- description
-
getId
public String getId()
Description copied from interface:ThemePersistent ID. Used in general preferences.
-
isAvailable
public boolean isAvailable()
Description copied from interface:ThemeIndicates, whether this Theme is available on the platform beaTunes is currently running on.- Specified by:
isAvailablein interfaceTheme- Returns:
- true or false
-
paintBackground
public void paintBackground(Graphics graphics, Container container)
Description copied from interface:ThemePaints a themed background.- Specified by:
paintBackgroundin interfaceTheme- Parameters:
graphics- graphicscontainer- component to paint in
-
activate
public void activate()
Description copied from interface:ThemeIs called by the system, when the Theme is activated.
-
deactivate
public void deactivate()
Description copied from interface:ThemeIs called by the system when the Theme is de-activated. The Theme is expected to return any UI defaults etc. to their original state.- Specified by:
deactivatein interfaceTheme
-
requiresRestart
public boolean requiresRestart()
Description copied from interface:ThemeIndicates that a restart is required to fully switch to or from this theme.- Specified by:
requiresRestartin interfaceTheme- Returns:
- true or false
-
customize
public void customize(Container container)
Description copied from interface:ThemeIs called by the systems for a number of different components and give this theme a chance to customize them.
-
getResource
public URL getResource(String resourceName)
Description copied from interface:ThemeUsed for theme specific loading of resources.- Specified by:
getResourcein interfaceTheme- 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
public String getLocalizedString(String key)
Description copied from interface:ThemeReturns a localized string. Lets you override the default strings- Specified by:
getLocalizedStringin interfaceTheme- Parameters:
key- key- Returns:
- localized string
- See Also:
ResourceBundle.getString(String)
-
-