Package com.formdev.flatlaf.icons
Class FlatCheckBoxIcon
- java.lang.Object
-
- com.formdev.flatlaf.icons.FlatAbstractIcon
-
- com.formdev.flatlaf.icons.FlatCheckBoxIcon
-
- All Implemented Interfaces:
Icon,UIResource
- Direct Known Subclasses:
FlatRadioButtonIcon
public class FlatCheckBoxIcon extends FlatAbstractIcon
Icon forJCheckBox. Note: If Component.focusWidth is greater than zero, then the outline focus border is painted outside of the icon bounds. Make sure that the checkbox has margins, which are equal or greater than focusWidth.- UiDefault:
- CheckBox.icon.style String optional; "outline"/null (default) or "filled", Component.focusWidth int, Component.focusColor Color, CheckBox.icon.focusWidth int optional; defaults to Component.focusWidth, CheckBox.icon.focusColor Color optional; defaults to Component.focusColor, CheckBox.icon.borderColor Color, CheckBox.icon.background Color, CheckBox.icon.selectedBorderColor Color, CheckBox.icon.selectedBackground Color, CheckBox.icon.checkmarkColor Color, CheckBox.icon.disabledBorderColor Color, CheckBox.icon.disabledBackground Color, CheckBox.icon.disabledCheckmarkColor Color, CheckBox.icon.focusedBorderColor Color optional, CheckBox.icon.focusedBackground Color optional, CheckBox.icon.selectedFocusedBorderColor Color optional; CheckBox.icon.focusedBorderColor is used if not specified, CheckBox.icon.selectedFocusedBackground Color optional; CheckBox.icon.focusedBackground is used if not specified, CheckBox.icon.selectedFocusedCheckmarkColor Color optional; CheckBox.icon.checkmarkColor is used if not specified, CheckBox.icon.hoverBorderColor Color optional, CheckBox.icon.hoverBackground Color optional, CheckBox.icon.selectedHoverBackground Color optional; CheckBox.icon.hoverBackground is used if not specified, CheckBox.icon.pressedBackground Color optional, CheckBox.icon.selectedPressedBackground Color optional; CheckBox.icon.pressedBackground is used if not specified, CheckBox.arc int
-
-
Field Summary
Fields Modifier and Type Field Description protected intarcprotected Colorbackgroundprotected ColorborderColorprotected ColorcheckmarkColorprotected ColordisabledBackgroundprotected ColordisabledBorderColorprotected ColordisabledCheckmarkColorprotected ColorfocusColorprotected ColorfocusedBackgroundprotected ColorfocusedBorderColorintfocusWidthprotected ColorhoverBackgroundprotected ColorhoverBorderColorprotected ColorpressedBackgroundprotected ColorselectedBackgroundprotected ColorselectedBorderColorprotected ColorselectedFocusedBackgroundprotected ColorselectedFocusedBorderColorprotected ColorselectedFocusedCheckmarkColorprotected ColorselectedHoverBackgroundprotected ColorselectedPressedBackgroundprotected Stringstyle-
Fields inherited from class com.formdev.flatlaf.icons.FlatAbstractIcon
color, height, width
-
-
Constructor Summary
Constructors Constructor Description FlatCheckBoxIcon()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ColorgetBackground(Component c, boolean selected)protected ColorgetBorderColor(Component c, boolean selected)protected ColorgetCheckmarkColor(Component c, boolean selected, boolean isFocused)protected ColorgetFocusColor(Component c)protected static ColorgetUIColor(String key, String style)protected static intgetUIInt(String key, int defaultValue, String style)protected booleanisIndeterminate(Component c)protected booleanisSelected(Component c)protected voidpaintBackground(Component c, Graphics2D g)protected voidpaintBorder(Component c, Graphics2D g)protected voidpaintCheckmark(Component c, Graphics2D g)protected voidpaintFocusBorder(Component c, Graphics2D g)protected voidpaintIcon(Component c, Graphics2D g)protected voidpaintIndeterminate(Component c, Graphics2D g)-
Methods inherited from class com.formdev.flatlaf.icons.FlatAbstractIcon
getIconHeight, getIconWidth, paintIcon
-
-
-
-
Field Detail
-
style
protected final String style
-
focusWidth
public final int focusWidth
-
focusColor
protected final Color focusColor
-
arc
protected final int arc
-
borderColor
protected final Color borderColor
-
background
protected final Color background
-
selectedBorderColor
protected final Color selectedBorderColor
-
selectedBackground
protected final Color selectedBackground
-
checkmarkColor
protected final Color checkmarkColor
-
disabledBorderColor
protected final Color disabledBorderColor
-
disabledBackground
protected final Color disabledBackground
-
disabledCheckmarkColor
protected final Color disabledCheckmarkColor
-
focusedBorderColor
protected final Color focusedBorderColor
-
focusedBackground
protected final Color focusedBackground
-
selectedFocusedBorderColor
protected final Color selectedFocusedBorderColor
-
selectedFocusedBackground
protected final Color selectedFocusedBackground
-
selectedFocusedCheckmarkColor
protected final Color selectedFocusedCheckmarkColor
-
hoverBorderColor
protected final Color hoverBorderColor
-
hoverBackground
protected final Color hoverBackground
-
selectedHoverBackground
protected final Color selectedHoverBackground
-
pressedBackground
protected final Color pressedBackground
-
selectedPressedBackground
protected final Color selectedPressedBackground
-
-
Method Detail
-
paintIcon
protected void paintIcon(Component c, Graphics2D g)
- Specified by:
paintIconin classFlatAbstractIcon
-
paintFocusBorder
protected void paintFocusBorder(Component c, Graphics2D g)
-
paintBorder
protected void paintBorder(Component c, Graphics2D g)
-
paintBackground
protected void paintBackground(Component c, Graphics2D g)
-
paintCheckmark
protected void paintCheckmark(Component c, Graphics2D g)
-
paintIndeterminate
protected void paintIndeterminate(Component c, Graphics2D g)
-
isIndeterminate
protected boolean isIndeterminate(Component c)
-
isSelected
protected boolean isSelected(Component c)
-
-