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 String
APPLE_AWT_WINDOW_DARK_APPEARANCE
static String
CLIENT_PROPERTY_I_APP
static Theme
DARK_THEME
static Theme
DEFAULT_THEME
static String
JETBRAINS_AWT_WINDOW_DARK_APPEARANCE
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
adjustWindowAppearance(RootPaneContainer window)
Adjust the appearance of a window, if possible.static Color
createColor(Color color, int increment)
static void
customize(JScrollPane scrollPane)
Transforms scroll pane into iApp scroll pane, if the client property "iApp" is set to true.static Font
deriveKeyFont(Font font)
Derives a font from the given font that can display the bemolle sign (♭).static Color
getAlternativeBackgroundColor()
static KeyStroke
getCloseWindowAccelerator()
Alt-F4 for windows, Command-W for mac.static Color
getDarkBorder()
static Color
getDividerColor()
static Font
getLargeBoldFont()
1.2 x thegetStandardFont()
and BOLD.static Color
getLightBorder()
static KeyStroke
getMinimizeWindowAccelerator()
Command-M for mac.static Color
getOffBlack()
static int
getOffIncrement()
static Color
getOffWhite()
static Font
getStandardFont()
Returns the standard font.static PropertyChangeListener
getThemeListener()
static Color
getUnfocusedSelectedBackgroundColor()
static KeyStroke
getZoomWindowAccelerator()
Command-Ctrl-Z for mac.static void
installDefaults()
Customizes some items in the PLAF layer.static void
paintBackground(Graphics graphics, Container component)
Paints a themed background.static void
resetPanelUI()
Reset the PanelUI to the original looks.static void
resetProgressBarUI()
Reset the indeterminate progressbar UI.static void
setOpaque(Container container, boolean opaque)
Makes allJComboBox
es andAbstractButton
s 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 allJComboBox
es andAbstractButton
s 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
-
-