Interface LookAndFeelEnhancer
- All Known Subinterfaces:
LookAndFeelHandler
At runtime the current look and feel enhancer can be obtained
from UiUtil.getLookAndFeelEnhancer()
.
For developing your own look and feel, see LookAndFeelHandler
.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault JCheckBox
Returns a tri-state checkbox if a specific implementation can be supplied by the look and feeldefault void
Advises the look and feel UI not to perform any extra drawing for selected nodes in the specified tree.default Font
Returns the font for normal text in alert boxes.default int
Some look and feels provide a file chooser dialog where the lower accessory should have an inset on the left side.default Color
Returns the color for the title in alerts boxes.default boolean
isDark()
Returns if the look and feel displays a dark mode.default boolean
Returns if the look and feel supports switching between light and dark mode viaUiUtil.setDarkUi(boolean)
.default boolean
isPreventTransparency
(JComponent component) Returns if a component should not be made transparent with a call toJComponent.setOpaque(boolean)
when it is contained in a parent container with a non-default background color.default boolean
Returns if tree selections extend across the entire width of the tree as opposed to just the label.default void
prepareWindow
(Window window) Prepare a window before it is displayable.
-
Field Details
-
DEFAULT_LIGHT_TITLE_COLOR
Default color for the title in alerts boxes. Returned by the default implementation ofgetTitleColor()
in light mode.
-
-
Method Details
-
isDark
default boolean isDark()Returns if the look and feel displays a dark mode.The default value is
false
.- See Also:
-
isDarkModeSwitchingSupported
default boolean isDarkModeSwitchingSupported()Returns if the look and feel supports switching between light and dark mode viaUiUtil.setDarkUi(boolean)
.The default value is
false
-
isWideTreeSelection
default boolean isWideTreeSelection()Returns if tree selections extend across the entire width of the tree as opposed to just the label.The default value is
false
. -
isPreventTransparency
Returns if a component should not be made transparent with a call toJComponent.setOpaque(boolean)
when it is contained in a parent container with a non-default background color. just the label.The default value is
false
. -
createTriStateCheckBox
Returns a tri-state checkbox if a specific implementation can be supplied by the look and feelIf overridden, it must return an instance that implements
IndeterminateStateComponent
. Note that whenAbstractButton.setSelected(boolean)
is called, the indeterminate state must be set to false.The default value uses an implementation that permanently activates the armed state for the indeterminate value.
-
getTitleColor
Returns the color for the title in alerts boxes.The default value is the label font in dark mode and
DEFAULT_LIGHT_TITLE_COLOR
in light mode.Not applicable macOS where native alerts are used.
-
getAlertFont
Returns the font for normal text in alert boxes.The default value is the label font.
Not applicable macOS where native alerts are used.
-
getFileChooserLowerAccessoryInset
default int getFileChooserLowerAccessoryInset()Some look and feels provide a file chooser dialog where the lower accessory should have an inset on the left side.The default value is
5
.Not applicable on Windows and macOS where native file chooser dialogs are used.
-
prepareWindow
Prepare a window before it is displayable. If a custom look and feel sets its own window decoration, it can make windows undecorated like this:if (window instanceof Frame) { ((Frame)window).setUndecorated(true); } else if (window instanceof Dialog) { ((Dialog)window).setUndecorated(true); }
The default implementation is empty.
-
disableExtraSelectionPainting
Advises the look and feel UI not to perform any extra drawing for selected nodes in the specified tree. For example, some look and feels paint a wide selection across the entire with of the tree. This is necessary for trees that handle the painting of the selection themselves.
-