Class ScaledImageIcon
java.lang.Object
com.formdev.flatlaf.util.ScaledImageIcon
- All Implemented Interfaces:
Icon
- Direct Known Subclasses:
FlatTitlePaneIcon
Scales the given image icon using the system and user scale factors and
paints the icon at system scale factor 1x. This gives best scaling quality.
If the given image icon supports multiple resolutions, the best resolution
variant is used. The last scaled image is cached for faster repainting.
-
Constructor Summary
ConstructorsConstructorDescriptionScaledImageIcon(ImageIcon imageIcon) ScaledImageIcon(ImageIcon imageIcon, int iconWidth, int iconHeight) -
Method Summary
Modifier and TypeMethodDescriptionintintprotected ImagegetResolutionVariant(int destImageWidth, int destImageHeight) void
-
Constructor Details
-
ScaledImageIcon
-
ScaledImageIcon
-
-
Method Details
-
getIconWidth
public int getIconWidth()- Specified by:
getIconWidthin interfaceIcon
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeightin interfaceIcon
-
paintIcon
-
getResolutionVariant
-