Package com.tagtraum.beatunes.plaf
Class GradientBackgroundTheme
- java.lang.Object
-
- com.tagtraum.beatunes.plaf.AbstractTheme
-
- com.tagtraum.beatunes.plaf.GradientBackgroundTheme
-
- All Implemented Interfaces:
Theme
public class GradientBackgroundTheme extends AbstractTheme
Gradient Background Theme.- Author:
- Hendrik Schreiber
-
-
Field Summary
Fields Modifier and Type Field Description static Color
VERY_LIGHT_GRAY
-
Fields inherited from interface com.tagtraum.beatunes.plaf.Theme
PAINT_FANCY_BACKGROUND, PAINT_PLAIN_BACKGROUND
-
-
Constructor Summary
Constructors Constructor Description GradientBackgroundTheme()
GradientBackgroundTheme(Color toColor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate()
Is called by the system, when the Theme is activated.void
customize(Container container)
Is called by the systems for a number of different components and give this theme a chance to customize them.void
deactivate()
Is called by the system when the Theme is de-activated.boolean
equals(Object o)
Paint
getBackgroundPaint(Container container)
Background paint.Paint
getBackgroundPaint(Container container, boolean hasFocus)
String
getDescription()
Short description.Paint
getFocusedBackgroundPaint(Container container)
Background paint.String
getId()
Persistent ID.int
hashCode()
void
paintBackground(Graphics graphics, Container container, Paint paint)
void
setDescription(String description)
void
setToColor(String color)
String
toString()
-
Methods inherited from class com.tagtraum.beatunes.plaf.AbstractTheme
getLocalizedString, getResource, getRootPaneContainer, hasFocus, isAvailable, paintBackground, requiresRestart
-
-
-
-
Field Detail
-
VERY_LIGHT_GRAY
public static final Color VERY_LIGHT_GRAY
-
-
Constructor Detail
-
GradientBackgroundTheme
public GradientBackgroundTheme(Color toColor)
-
GradientBackgroundTheme
public GradientBackgroundTheme()
-
-
Method Detail
-
setToColor
public void setToColor(String color)
-
activate
public void activate()
Description copied from interface:Theme
Is called by the system, when the Theme is activated.
-
deactivate
public void deactivate()
Description copied from interface:Theme
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.
-
customize
public void customize(Container container)
Description copied from interface:Theme
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
-
getFocusedBackgroundPaint
public Paint getFocusedBackgroundPaint(Container container)
Description copied from interface:Theme
Background paint. This is used for the icon in the general preferences.- Specified by:
getFocusedBackgroundPaint
in interfaceTheme
- Overrides:
getFocusedBackgroundPaint
in classAbstractTheme
- Parameters:
container
- component- Returns:
- background paint
-
getBackgroundPaint
public Paint getBackgroundPaint(Container container, boolean hasFocus)
- Specified by:
getBackgroundPaint
in classAbstractTheme
- Parameters:
container
- component to paint- Returns:
- paint to paint the background of this component
-
paintBackground
public void paintBackground(Graphics graphics, Container container, Paint paint)
- Overrides:
paintBackground
in classAbstractTheme
-
getBackgroundPaint
public Paint getBackgroundPaint(Container container)
Description copied from interface:Theme
Background paint.- Specified by:
getBackgroundPaint
in interfaceTheme
- Overrides:
getBackgroundPaint
in classAbstractTheme
- Parameters:
container
- component- Returns:
- background paint
-
getDescription
public String getDescription()
Description copied from interface:Theme
Short description. Used in preferences.- Returns:
- description
-
setDescription
public void setDescription(String description)
-
getId
public String getId()
Description copied from interface:Theme
Persistent ID. Used in general preferences.- Returns:
- unique, persistent id for this instance
-
-