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 outer 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; "outlined"/null (default) or "filled", Component.focusWidth int, Component.borderWidth int, Component.focusColor Color, CheckBox.icon.focusWidth int or float optional; defaults to Component.focusWidth, CheckBox.icon.borderWidth int or float optional; defaults to Component.borderWidth, CheckBox.icon.selectedBorderWidth int or float optional; defaults to CheckBox.icon.borderWidth, CheckBox.icon.disabledSelectedBorderWidth int or float optional; defaults to CheckBox.icon.selectedBorderWidth, CheckBox.arc int, 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.disabledSelectedBorderColor Color optional; CheckBox.icon.disabledBorderColor is used if not specified, CheckBox.icon.disabledSelectedBackground Color optional; CheckBox.icon.disabledBackground is used if not specified, CheckBox.icon.disabledCheckmarkColor Color, CheckBox.icon.focusedBorderColor Color optional, CheckBox.icon.focusedBackground Color optional, CheckBox.icon.focusedSelectedBorderColor Color optional; CheckBox.icon.focusedBorderColor is used if not specified, CheckBox.icon.focusedSelectedBackground Color optional; CheckBox.icon.focusedBackground is used if not specified, CheckBox.icon.focusedCheckmarkColor Color optional; CheckBox.icon.checkmarkColor is used if not specified, CheckBox.icon.hoverBorderColor Color optional, CheckBox.icon.hoverBackground Color optional, CheckBox.icon.hoverSelectedBorderColor Color optional; CheckBox.icon.hoverBorderColor is used if not specified, CheckBox.icon.hoverSelectedBackground Color optional; CheckBox.icon.hoverBackground is used if not specified, CheckBox.icon.hoverCheckmarkColor Color optional; CheckBox.icon.checkmarkColor is used if not specified, CheckBox.icon.pressedBorderColor Color optional, CheckBox.icon.pressedBackground Color optional, CheckBox.icon.pressedSelectedBorderColor Color optional; CheckBox.icon.pressedBorderColor is used if not specified, CheckBox.icon.pressedSelectedBackground Color optional; CheckBox.icon.pressedBackground is used if not specified, CheckBox.icon.pressedCheckmarkColor Color optional; CheckBox.icon.checkmarkColor is used if not specified
-
-
Field Summary
-
Fields inherited from class com.formdev.flatlaf.icons.FlatAbstractIcon
color, height, width
-
-
Constructor Summary
Constructors Constructor Description FlatCheckBoxIcon()
-
Method Summary
-
Methods inherited from class com.formdev.flatlaf.icons.FlatAbstractIcon
getIconHeight, getIconWidth, paintIcon
-
-
-
-
Field Detail
-
style
protected final String style
-
focusWidth
protected float focusWidth
-
focusColor
protected Color focusColor
-
borderWidth
protected float borderWidth
- Since:
- 2
-
selectedBorderWidth
protected float selectedBorderWidth
- Since:
- 2
-
disabledSelectedBorderWidth
protected float disabledSelectedBorderWidth
- Since:
- 2
-
arc
protected int arc
-
borderColor
protected Color borderColor
-
background
protected Color background
-
selectedBorderColor
protected Color selectedBorderColor
-
selectedBackground
protected Color selectedBackground
-
checkmarkColor
protected Color checkmarkColor
-
disabledBorderColor
protected Color disabledBorderColor
-
disabledBackground
protected Color disabledBackground
-
disabledSelectedBorderColor
protected Color disabledSelectedBorderColor
- Since:
- 2
-
disabledSelectedBackground
protected Color disabledSelectedBackground
- Since:
- 2
-
disabledCheckmarkColor
protected Color disabledCheckmarkColor
-
focusedBorderColor
protected Color focusedBorderColor
-
focusedBackground
protected Color focusedBackground
-
focusedSelectedBorderColor
protected Color focusedSelectedBorderColor
- Since:
- 2
-
focusedSelectedBackground
protected Color focusedSelectedBackground
- Since:
- 2
-
focusedCheckmarkColor
protected Color focusedCheckmarkColor
- Since:
- 2
-
hoverBorderColor
protected Color hoverBorderColor
-
hoverBackground
protected Color hoverBackground
-
hoverSelectedBorderColor
protected Color hoverSelectedBorderColor
- Since:
- 2
-
hoverSelectedBackground
protected Color hoverSelectedBackground
- Since:
- 2
-
hoverCheckmarkColor
protected Color hoverCheckmarkColor
- Since:
- 2
-
pressedBorderColor
protected Color pressedBorderColor
- Since:
- 2
-
pressedBackground
protected Color pressedBackground
-
pressedSelectedBorderColor
protected Color pressedSelectedBorderColor
- Since:
- 2
-
pressedSelectedBackground
protected Color pressedSelectedBackground
- Since:
- 2
-
pressedCheckmarkColor
protected Color pressedCheckmarkColor
- Since:
- 2
-
-
Method Detail
-
getPropertyPrefix
protected String getPropertyPrefix()
-
getUIFloat
protected static float getUIFloat(String key, float defaultValue, String style)
- Since:
- 2
-
paintIcon
protected void paintIcon(Component c, Graphics2D g)
- Specified by:
paintIcon
in classFlatAbstractIcon
-
paintFocusBorder
protected void paintFocusBorder(Component c, Graphics2D g)
-
paintBorder
protected void paintBorder(Component c, Graphics2D g, float borderWidth)
-
paintBackground
protected void paintBackground(Component c, Graphics2D g, float borderWidth)
-
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)
-
getFocusWidth
public float getFocusWidth()
- Since:
- 2
-
-