Package com.tagtraum.beatunes.plaf
Class UICustomizer
- java.lang.Object
-
- com.tagtraum.beatunes.plaf.UICustomizer
-
public class UICustomizer extends Object
UICustomizer.- Author:
- Hendrik Schreiber
-
-
Field Summary
Fields Modifier and Type Field Description static StringAPPLE_AWT_WINDOW_DARK_APPEARANCEstatic StringCLIENT_PROPERTY_I_APPstatic ThemeDARK_THEMEstatic ThemeDEFAULT_THEMEstatic StringJETBRAINS_AWT_WINDOW_DARK_APPEARANCE
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidadjustWindowAppearance(RootPaneContainer window)Adjust the appearance of a window, if possible.static ColorcreateColor(Color color, int increment)static voidcustomize(JScrollPane scrollPane)Transforms scroll pane into iApp scroll pane, if the client property "iApp" is set to true.static FontderiveKeyFont(Font font)Derives a font from the given font that can display the bemolle sign (♭).static ColorgetAlternativeBackgroundColor()static KeyStrokegetCloseWindowAccelerator()Alt-F4 for windows, Command-W for mac.static ColorgetDarkBorder()static ColorgetDividerColor()static FontgetLargeBoldFont()1.2 x thegetStandardFont()and BOLD.static ColorgetLightBorder()static KeyStrokegetMinimizeWindowAccelerator()Command-M for mac.static ColorgetOffBlack()static intgetOffIncrement()static ColorgetOffWhite()static FontgetStandardFont()Returns the standard font.static PropertyChangeListenergetThemeListener()static ColorgetUnfocusedSelectedBackgroundColor()static KeyStrokegetZoomWindowAccelerator()Command-Ctrl-Z for mac.static voidinstallDefaults()Customizes some items in the PLAF layer.static voidpaintBackground(Graphics graphics, Container component)Paints a themed background.static voidresetPanelUI()Reset the PanelUI to the original looks.static voidresetProgressBarUI()Reset the indeterminate progressbar UI.static voidsetOpaque(Container container, boolean opaque)Makes allJComboBoxes andAbstractButtons of a given container opaque.
-
-
-
Field Detail
-
JETBRAINS_AWT_WINDOW_DARK_APPEARANCE
public static final String JETBRAINS_AWT_WINDOW_DARK_APPEARANCE
- See Also:
- Constant Field Values
-
APPLE_AWT_WINDOW_DARK_APPEARANCE
public static final String APPLE_AWT_WINDOW_DARK_APPEARANCE
- See Also:
- Constant Field Values
-
DARK_THEME
public static Theme DARK_THEME
-
DEFAULT_THEME
public static final Theme DEFAULT_THEME
-
CLIENT_PROPERTY_I_APP
public static final String CLIENT_PROPERTY_I_APP
- See Also:
- Constant Field Values
-
-
Method Detail
-
getThemeListener
public static PropertyChangeListener getThemeListener()
-
getCloseWindowAccelerator
public static KeyStroke getCloseWindowAccelerator()
Alt-F4 for windows, Command-W for mac.- Returns:
- keystroke
-
getMinimizeWindowAccelerator
public static KeyStroke getMinimizeWindowAccelerator()
Command-M for mac.- Returns:
- keystroke
-
getZoomWindowAccelerator
public static KeyStroke getZoomWindowAccelerator()
Command-Ctrl-Z for mac.- Returns:
- keystroke
-
getUnfocusedSelectedBackgroundColor
public static Color getUnfocusedSelectedBackgroundColor()
- Returns:
- background color for selected, but not focused items (tree/table cells).
-
getStandardFont
public static Font getStandardFont()
Returns the standard font.- Returns:
- the standard font to use for most UI elements.
-
getLargeBoldFont
public static Font getLargeBoldFont()
1.2 x thegetStandardFont()and BOLD.- Returns:
- modified font
-
getOffBlack
public static Color getOffBlack()
-
getOffWhite
public static Color getOffWhite()
-
getOffIncrement
public static int getOffIncrement()
-
getDarkBorder
public static Color getDarkBorder()
-
getLightBorder
public static Color getLightBorder()
-
getDividerColor
public static Color getDividerColor()
-
deriveKeyFont
public static Font deriveKeyFont(Font font)
Derives a font from the given font that can display the bemolle sign (♭).- Parameters:
font- font- Returns:
- key font
-
adjustWindowAppearance
public static void adjustWindowAppearance(RootPaneContainer window)
Adjust the appearance of a window, if possible. E.g. turn the title bar dark.- Parameters:
window- window
-
installDefaults
public static void installDefaults()
Customizes some items in the PLAF layer.
-
setOpaque
public static void setOpaque(Container container, boolean opaque)
Makes allJComboBoxes andAbstractButtons of a given container opaque.- Parameters:
opaque- opaquecontainer- container to manipulate
-
paintBackground
public static void paintBackground(Graphics graphics, Container component)
Paints a themed background.- Parameters:
graphics- graphicscomponent- component to paint in
-
getAlternativeBackgroundColor
public static Color getAlternativeBackgroundColor()
-
resetPanelUI
public static void resetPanelUI()
Reset the PanelUI to the original looks.
-
resetProgressBarUI
public static void resetProgressBarUI()
Reset the indeterminate progressbar UI.
-
customize
public static void customize(JScrollPane scrollPane)
Transforms scroll pane into iApp scroll pane, if the client property "iApp" is set to true.- Parameters:
scrollPane- scroll pane
-
-