Class TadukooLookAndFeel
java.lang.Object
javax.swing.LookAndFeel
javax.swing.plaf.basic.BasicLookAndFeel
javax.swing.plaf.metal.MetalLookAndFeel
com.github.tadukoo.view.lookandfeel.TadukooLookAndFeel
- All Implemented Interfaces:
Serializable
Tadukoo Look & Feel is a Look & Feel currently extending
MetalLookAndFeel
that allows for easier
customization of the Look & Feel. Through the use of specifying a TadukooTheme
, you can customize
paints, fonts, shapes, and borders of components, and even swap out the Component UI classes themselves if
that's not custom enough for you.- Since:
- Alpha v.0.2
- Version:
- Alpha v.0.3
- Author:
- Logan Ferree (Tadukoo)
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstructs a Tadukoo Look & Feel with the defaulttheme
.TadukooLookAndFeel
(TadukooTheme theme) Constructs a Tadukoo Look & Feel with the giventheme
. -
Method Summary
Modifier and TypeMethodDescriptiongetID()
getName()
getTheme()
protected void
initClassDefaults
(UIDefaults table) Populates theUIDefaults
table with mappings for the Component UI classes to be used in the Look & Feel.protected void
initComponentDefaults
(UIDefaults table) Populates theUIDefaults
table with mappings for defaults on the Components themselves.protected void
Populatestable
with system colors.boolean
boolean
Methods inherited from class javax.swing.plaf.metal.MetalLookAndFeel
createDefaultTheme, getAcceleratorForeground, getAcceleratorSelectedForeground, getBlack, getControl, getControlDarkShadow, getControlDisabled, getControlHighlight, getControlInfo, getControlShadow, getControlTextColor, getControlTextFont, getCurrentTheme, getDefaults, getDesktopColor, getDisabledIcon, getDisabledSelectedIcon, getFocusColor, getHighlightedTextColor, getInactiveControlTextColor, getInactiveSystemTextColor, getLayoutStyle, getMenuBackground, getMenuDisabledForeground, getMenuForeground, getMenuSelectedBackground, getMenuSelectedForeground, getMenuTextFont, getPrimaryControl, getPrimaryControlDarkShadow, getPrimaryControlHighlight, getPrimaryControlInfo, getPrimaryControlShadow, getSeparatorBackground, getSeparatorForeground, getSubTextFont, getSupportsWindowDecorations, getSystemTextColor, getSystemTextFont, getTextHighlightColor, getUserTextColor, getUserTextFont, getWhite, getWindowBackground, getWindowTitleBackground, getWindowTitleFont, getWindowTitleForeground, getWindowTitleInactiveBackground, getWindowTitleInactiveForeground, provideErrorFeedback, setCurrentTheme
Methods inherited from class javax.swing.plaf.basic.BasicLookAndFeel
createAudioAction, getAudioActionMap, initialize, loadSystemColors, playSound, uninitialize
Methods inherited from class javax.swing.LookAndFeel
getDesktopPropertyValue, installBorder, installColors, installColorsAndFont, installProperty, loadKeyBindings, makeComponentInputMap, makeIcon, makeInputMap, makeKeyBindings, toString, uninstallBorder
-
Field Details
-
theme
Thetheme
to use in the Look & Feel
-
-
Constructor Details
-
TadukooLookAndFeel
Constructs a Tadukoo Look & Feel with the defaulttheme
.- Throws:
IOException
- If font loading goes wrong in creating default themeFontFormatException
- If font loading goes wrong in creating default theme
-
TadukooLookAndFeel
Constructs a Tadukoo Look & Feel with the giventheme
.- Parameters:
theme
- Thetheme
to use for the Look & Feel
-
-
Method Details
-
getTheme
- Returns:
- The
TadukooTheme
to use in the Look & Feel
-
getName
- Overrides:
getName
in classMetalLookAndFeel
- Returns:
- The name of this look and feel. This returns "Tadukoo"
-
getID
- Overrides:
getID
in classMetalLookAndFeel
- Returns:
- The identifier of this look and feel. This returns "Tadukoo"
-
getDescription
- Overrides:
getDescription
in classMetalLookAndFeel
- Returns:
- A short description of this look and feel. This returns "The Tadukoo Look and Feel"
-
isNativeLookAndFeel
public boolean isNativeLookAndFeel()- Overrides:
isNativeLookAndFeel
in classMetalLookAndFeel
- Returns:
false
; TadukooLookAndFeel is not a native look and feel
-
isSupportedLookAndFeel
public boolean isSupportedLookAndFeel()- Overrides:
isSupportedLookAndFeel
in classMetalLookAndFeel
- Returns:
true
; TadukooLookAndFeel can be run on any platform
-
initClassDefaults
Populates theUIDefaults
table with mappings for the Component UI classes to be used in the Look & Feel. Tadukoo Look & Feel has its own Component UI classes, but you are able to specify different ones in thetheme
if you pass one in via the constructor.- Overrides:
initClassDefaults
in classMetalLookAndFeel
- Parameters:
table
- TheUIDefaults
table to add the mappings to
-
initSystemColorDefaults
Populatestable
with system colors. Currently just adds the custom systemColorDefaults fromTadukooTheme
. In the future, there will be more settings on the theme for here.- Overrides:
initSystemColorDefaults
in classMetalLookAndFeel
- Parameters:
table
- theUIDefaults
object the values are added to- Throws:
NullPointerException
- iftable
isnull
-
initComponentDefaults
Populates theUIDefaults
table with mappings for defaults on the Components themselves. This includes anything that can be customized on thetheme
, such as paints and fonts.- Overrides:
initComponentDefaults
in classMetalLookAndFeel
- Parameters:
table
- TheUIDefaults
table to add the mappings to
-