@Override
	public Icon getDisabledIcon( JComponent component, Icon icon ) {
		if( icon instanceof DisabledIconProvider ) {
			Icon disabledIcon = ((DisabledIconProvider)icon).getDisabledIcon();
			return !(disabledIcon instanceof UIResource) ? new IconUIResource( disabledIcon ) : disabledIcon;
		}

		if( icon instanceof ImageIcon ) {
			Object grayFilter = UIManager.get( "Component.grayFilter" );
			ImageFilter filter = (grayFilter instanceof ImageFilter)
				? (ImageFilter) grayFilter
				: GrayFilter.createDisabledIconFilter( isDark() ); // fallback

			Function<Image, Image> mapper = img -> {
				ImageProducer producer = new FilteredImageSource( img.getSource(), filter );
				return Toolkit.getDefaultToolkit().createImage( producer );
			};

			Image image = ((ImageIcon)icon).getImage();
			return new ImageIconUIResource( MultiResolutionImageSupport.map( image, mapper ) );
		}

		return null;
	}
Returns whether FlatLaf supports custom window decorations.
This depends on the operating system and on the used Java runtime.
<p>
This method returns {@code true} on Windows 10/11 (see exception below)
and on Linux, otherwise returns {@code false}.
<p>
Returns also {@code false} on Windows 10/11 if
FlatLaf native window border support is available (requires Windows 10/11).
<p>
In these cases, custom decorations are enabled by the root pane.
Usage of {@link JFrame#setDefaultLookAndFeelDecorated(boolean)} or
{@link JDialog#setDefaultLookAndFeelDecorated(boolean)} is not necessary.
flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java