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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs 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 voidinitClassDefaults(UIDefaults table) Populates theUIDefaultstable with mappings for the Component UI classes to be used in the Look & Feel.protected voidinitComponentDefaults(UIDefaults table) Populates theUIDefaultstable with mappings for defaults on the Components themselves.protected voidPopulatestablewith system colors.booleanbooleanMethods 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, setCurrentThemeMethods inherited from class javax.swing.plaf.basic.BasicLookAndFeel
createAudioAction, getAudioActionMap, initialize, loadSystemColors, playSound, uninitializeMethods inherited from class javax.swing.LookAndFeel
getDesktopPropertyValue, installBorder, installColors, installColorsAndFont, installProperty, loadKeyBindings, makeComponentInputMap, makeIcon, makeInputMap, makeKeyBindings, toString, uninstallBorder
-
Field Details
-
theme
Thethemeto 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- Thethemeto use for the Look & Feel
-
-
Method Details
-
getTheme
- Returns:
- The
TadukooThemeto use in the Look & Feel
-
getName
- Overrides:
getNamein classMetalLookAndFeel- Returns:
- The name of this look and feel. This returns "Tadukoo"
-
getID
- Overrides:
getIDin classMetalLookAndFeel- Returns:
- The identifier of this look and feel. This returns "Tadukoo"
-
getDescription
- Overrides:
getDescriptionin classMetalLookAndFeel- Returns:
- A short description of this look and feel. This returns "The Tadukoo Look and Feel"
-
isNativeLookAndFeel
public boolean isNativeLookAndFeel()- Overrides:
isNativeLookAndFeelin classMetalLookAndFeel- Returns:
false; TadukooLookAndFeel is not a native look and feel
-
isSupportedLookAndFeel
public boolean isSupportedLookAndFeel()- Overrides:
isSupportedLookAndFeelin classMetalLookAndFeel- Returns:
true; TadukooLookAndFeel can be run on any platform
-
initClassDefaults
Populates theUIDefaultstable 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 thethemeif you pass one in via the constructor.- Overrides:
initClassDefaultsin classMetalLookAndFeel- Parameters:
table- TheUIDefaultstable to add the mappings to
-
initSystemColorDefaults
Populatestablewith system colors. Currently just adds the custom systemColorDefaults fromTadukooTheme. In the future, there will be more settings on the theme for here.- Overrides:
initSystemColorDefaultsin classMetalLookAndFeel- Parameters:
table- theUIDefaultsobject the values are added to- Throws:
NullPointerException- iftableisnull
-
initComponentDefaults
Populates theUIDefaultstable with mappings for defaults on the Components themselves. This includes anything that can be customized on thetheme, such as paints and fonts.- Overrides:
initComponentDefaultsin classMetalLookAndFeel- Parameters:
table- TheUIDefaultstable to add the mappings to
-