Package com.formdev.flatlaf.icons
Class FlatAbstractIcon
- java.lang.Object
-
- com.formdev.flatlaf.icons.FlatAbstractIcon
-
- All Implemented Interfaces:
Icon,UIResource
- Direct Known Subclasses:
FlatAnimatedIcon,FlatAscendingSortIcon,FlatCapsLockIcon,FlatCheckBoxIcon,FlatCheckBoxMenuItemIcon,FlatClearIcon,FlatFileChooserDetailsViewIcon,FlatFileChooserHomeFolderIcon,FlatFileChooserListViewIcon,FlatFileChooserNewFolderIcon,FlatFileChooserUpFolderIcon,FlatFileViewComputerIcon,FlatFileViewDirectoryIcon,FlatFileViewFileIcon,FlatFileViewFloppyDriveIcon,FlatFileViewHardDriveIcon,FlatHelpButtonIcon,FlatInternalFrameAbstractIcon,FlatMenuArrowIcon,FlatMenuItemArrowIcon,FlatOptionPaneAbstractIcon,FlatRevealIcon,FlatSearchIcon,FlatTabbedPaneCloseIcon,FlatTreeClosedIcon,FlatTreeCollapsedIcon,FlatTreeLeafIcon,FlatTreeOpenIcon,FlatWindowAbstractIcon
public abstract class FlatAbstractIcon extends Object implements Icon, UIResource
Base class for icons that scales width and height, creates and initializes a scaled graphics context for icon painting. Subclasses do not need to scale icon painting.
-
-
Constructor Summary
Constructors Constructor Description FlatAbstractIcon(int width, int height, Color color)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intgetIconHeight()intgetIconWidth()protected voidpaintBackground(Component c, Graphics2D g, int x, int y)protected abstract voidpaintIcon(Component c, Graphics2D g)voidpaintIcon(Component c, Graphics g, int x, int y)
-
-
-
Field Detail
-
width
protected final int width
-
height
protected final int height
-
color
protected Color color
-
-
Constructor Detail
-
FlatAbstractIcon
public FlatAbstractIcon(int width, int height, Color color)
-
-
Method Detail
-
paintBackground
protected void paintBackground(Component c, Graphics2D g, int x, int y)
- Since:
- 3.5.2
-
paintIcon
protected abstract void paintIcon(Component c, Graphics2D g)
-
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidthin interfaceIcon
-
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeightin interfaceIcon
-
-