Class FlatWindowAbstractIcon
java.lang.Object
com.formdev.flatlaf.icons.FlatAbstractIcon
com.formdev.flatlaf.icons.FlatWindowAbstractIcon
- All Implemented Interfaces:
Icon, UIResource
- Direct Known Subclasses:
FlatWindowCloseIcon, FlatWindowIconifyIcon, FlatWindowMaximizeIcon, FlatWindowRestoreIcon
Base class for window icons.
- UiDefault:
- TitlePane.buttonSize Dimension, TitlePane.buttonInsets Insets optional, TitlePane.buttonArc int optional, TitlePane.buttonSymbolHeight int, TitlePane.buttonBackground Color optional, TitlePane.buttonForeground Color optional, TitlePane.buttonInactiveBackground Color optional, TitlePane.buttonInactiveForeground Color optional, TitlePane.buttonHoverBackground Color optional, TitlePane.buttonHoverForeground Color optional, TitlePane.buttonPressedBackground Color optional, TitlePane.buttonPressedForeground Color optional
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected final Colorprotected final Colorprotected final Colorprotected final Colorprotected final Colorprotected final Colorprotected final Insetsprotected final Colorprotected final Colorprotected final intFields inherited from class FlatAbstractIcon
color, height, width -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFlatWindowAbstractIcon(Dimension size, Insets insets, int arc, int symbolHeight, Color background, Color foreground, Color inactiveBackground, Color inactiveForeground, Color hoverBackground, Color hoverForeground, Color pressedBackground, Color pressedForeground) protectedFlatWindowAbstractIcon(String windowStyle) protectedFlatWindowAbstractIcon(String windowStyle, Color background, Color foreground, Color inactiveBackground, Color inactiveForeground, Color hoverBackground, Color hoverForeground, Color pressedBackground, Color pressedForeground) -
Method Summary
Modifier and TypeMethodDescriptionprotected Colorprotected voidpaintBackground(Component c, Graphics2D g, int x, int y) Paints icon background.protected voidpaintIcon(Component c, Graphics2D g) Paints icon.protected abstract voidpaintIconAt1x(Graphics2D g, int x, int y, int width, int height, double scaleFactor) Methods inherited from class FlatAbstractIcon
getIconHeight, getIconWidth, getScale, paintIcon, scale, setScale
-
Field Details
-
insets
- Since:
- 3.6
-
arc
protected final int arc- Since:
- 3.6
-
symbolHeight
protected final int symbolHeight- Since:
- 3.6
-
background
- Since:
- 3.6
-
foreground
- Since:
- 3.6
-
inactiveBackground
- Since:
- 3.6
-
inactiveForeground
- Since:
- 3.6
-
hoverBackground
-
hoverForeground
- Since:
- 3.6
-
pressedBackground
-
pressedForeground
- Since:
- 3.6
-
-
Constructor Details
-
FlatWindowAbstractIcon
- Since:
- 3.2
-
FlatWindowAbstractIcon
-
FlatWindowAbstractIcon
-
-
Method Details
-
paintIcon
Description copied from class:FlatAbstractIconPaints icon.The graphics context is translated and scaled. This means that icon x,y coordinates are
0,0and it is not necessary to scale coordinates within this method.The bounds to be used for icon painting are: 0, 0,
FlatAbstractIcon.width,FlatAbstractIcon.height.- Specified by:
paintIconin classFlatAbstractIcon
-
paintIconAt1x
protected abstract void paintIconAt1x(Graphics2D g, int x, int y, int width, int height, double scaleFactor) -
paintBackground
Description copied from class:FlatAbstractIconPaints icon background. Default implementation does nothing. Can be overridden to paint specific icon background.The bounds of the area to be filled are: x, y,
FlatAbstractIcon.getIconWidth(),FlatAbstractIcon.getIconHeight().In contrast to
FlatAbstractIcon.paintIcon(Component, Graphics2D), the graphics contextgis not translated and not scaled.- Overrides:
paintBackgroundin classFlatAbstractIcon- Since:
- 3.5.2
-
getForeground
-