Class FlatCheckBoxIcon
java.lang.Object
com.formdev.flatlaf.icons.FlatAbstractIcon
com.formdev.flatlaf.icons.FlatCheckBoxIcon
- All Implemented Interfaces:
FlatStylingSupport.StyleableObject, Icon, UIResource
- Direct Known Subclasses:
FlatRadioButtonIcon
public class FlatCheckBoxIcon
extends FlatAbstractIcon
implements FlatStylingSupport.StyleableObject
Icon for
JCheckBox.
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.icon.indeterminateBorderWidth int or float optional; defaults to CheckBox.icon.selectedBorderWidth, CheckBox.icon.disabledIndeterminateBorderWidth int or float optional; defaults to CheckBox.icon.disabledSelectedBorderWidth, 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.indeterminateBorderColor Color optional; defaults to CheckBox.icon.selectedBorderColor, CheckBox.icon.indeterminateBackground Color optional; defaults to CheckBox.icon.selectedBackground, CheckBox.icon.indeterminateCheckmarkColor Color optional; defaults to CheckBox.icon.checkmarkColor, CheckBox.icon.disabledBorderColor Color, CheckBox.icon.disabledBackground Color, CheckBox.icon.disabledSelectedBorderColor Color optional; defaults to CheckBox.icon.disabledBorderColor, CheckBox.icon.disabledSelectedBackground Color optional; defaults to CheckBox.icon.disabledBackground, CheckBox.icon.disabledCheckmarkColor Color, CheckBox.icon.disabledIndeterminateBorderColor Color optional; defaults to CheckBox.icon.disabledSelectedBorderColor, CheckBox.icon.disabledIndeterminateBackground Color optional; defaults to CheckBox.icon.disabledSelectedBackground, CheckBox.icon.disabledIndeterminateCheckmarkColor Color optional; defaults to CheckBox.icon.disabledCheckmarkColor, CheckBox.icon.focusedBorderColor Color optional, CheckBox.icon.focusedBackground Color optional, CheckBox.icon.focusedSelectedBorderColor Color optional; defaults to CheckBox.icon.focusedBorderColor, CheckBox.icon.focusedSelectedBackground Color optional; defaults to CheckBox.icon.focusedBackground, CheckBox.icon.focusedCheckmarkColor Color optional; defaults to CheckBox.icon.checkmarkColor, CheckBox.icon.focusedIndeterminateBorderColor Color optional; defaults to CheckBox.icon.focusedSelectedBorderColor, CheckBox.icon.focusedIndeterminateBackground Color optional; defaults to CheckBox.icon.focusedSelectedBackground, CheckBox.icon.focusedIndeterminateCheckmarkColor Color optional; defaults to CheckBox.icon.focusedCheckmarkColor, CheckBox.icon.hoverBorderColor Color optional, CheckBox.icon.hoverBackground Color optional, CheckBox.icon.hoverSelectedBorderColor Color optional; defaults to CheckBox.icon.hoverBorderColor, CheckBox.icon.hoverSelectedBackground Color optional; defaults to CheckBox.icon.hoverBackground, CheckBox.icon.hoverCheckmarkColor Color optional; defaults to CheckBox.icon.checkmarkColor, CheckBox.icon.hoverIndeterminateBorderColor Color optional; defaults to CheckBox.icon.hoverSelectedBorderColor, CheckBox.icon.hoverIndeterminateBackground Color optional; defaults to CheckBox.icon.hoverSelectedBackground, CheckBox.icon.hoverIndeterminateCheckmarkColor Color optional; defaults to CheckBox.icon.hoverCheckmarkColor, CheckBox.icon.pressedBorderColor Color optional, CheckBox.icon.pressedBackground Color optional, CheckBox.icon.pressedSelectedBorderColor Color optional; defaults to CheckBox.icon.pressedBorderColor, CheckBox.icon.pressedSelectedBackground Color optional; defaults to CheckBox.icon.pressedBackground, CheckBox.icon.pressedCheckmarkColor Color optional; defaults to CheckBox.icon.checkmarkColor, CheckBox.icon.pressedIndeterminateBorderColor Color optional; defaults to CheckBox.icon.pressedSelectedBorderColor, CheckBox.icon.pressedIndeterminateBackground Color optional; defaults to CheckBox.icon.pressedSelectedBackground, CheckBox.icon.pressedIndeterminateCheckmarkColor Color optional; defaults to CheckBox.icon.pressedCheckmarkColor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected Colorprotected Colorprotected floatprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected floatprotected Colorprotected Colorprotected Colorprotected floatprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected floatprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected floatprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected floatprotected final StringFields inherited from class FlatAbstractIcon
color, height, width -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ColorgetBackground(Component c, boolean selected, boolean indeterminate) protected ColorgetBorderColor(Component c, boolean selected, boolean indeterminate) protected ColorgetCheckmarkColor(Component c, boolean indeterminate) protected Colorfloatprotected Stringprotected static ColorgetUIColor(String key, String style) protected static floatgetUIFloat(String key, float defaultValue, String style) protected booleanprotected booleanprotected voidpaintBackground(Component c, Graphics2D g, float borderWidth) protected voidpaintBorder(Component c, Graphics2D g, float borderWidth) protected voidprotected voidprotected voidpaintIcon(Component c, Graphics2D g) Paints icon.protected voidMethods inherited from class FlatAbstractIcon
getIconHeight, getIconWidth, getScale, paintBackground, paintIcon, scale, setScaleMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FlatStylingSupport.StyleableObject
applyStyleProperty, getStyleableInfos, getStyleableValue
-
Field Details
-
style
-
focusWidth
protected float focusWidth -
focusColor
-
borderWidth
protected float borderWidth- Since:
- 2
-
selectedBorderWidth
protected float selectedBorderWidth- Since:
- 2
-
disabledSelectedBorderWidth
protected float disabledSelectedBorderWidth- Since:
- 2
-
indeterminateBorderWidth
protected float indeterminateBorderWidth- Since:
- 3.6
-
disabledIndeterminateBorderWidth
protected float disabledIndeterminateBorderWidth- Since:
- 3.6
-
arc
protected int arc -
borderColor
-
background
-
selectedBorderColor
-
selectedBackground
-
checkmarkColor
-
indeterminateBorderColor
- Since:
- 3.6
-
indeterminateBackground
- Since:
- 3.6
-
indeterminateCheckmarkColor
- Since:
- 3.6
-
disabledBorderColor
-
disabledBackground
-
disabledSelectedBorderColor
- Since:
- 2
-
disabledSelectedBackground
- Since:
- 2
-
disabledCheckmarkColor
-
disabledIndeterminateBorderColor
- Since:
- 3.6
-
disabledIndeterminateBackground
- Since:
- 3.6
-
disabledIndeterminateCheckmarkColor
- Since:
- 3.6
-
focusedBorderColor
-
focusedBackground
-
focusedSelectedBorderColor
- Since:
- 2
-
focusedSelectedBackground
- Since:
- 2
-
focusedCheckmarkColor
- Since:
- 2
-
focusedIndeterminateBorderColor
- Since:
- 3.6
-
focusedIndeterminateBackground
- Since:
- 3.6
-
focusedIndeterminateCheckmarkColor
- Since:
- 3.6
-
hoverBorderColor
-
hoverBackground
-
hoverSelectedBorderColor
- Since:
- 2
-
hoverSelectedBackground
- Since:
- 2
-
hoverCheckmarkColor
- Since:
- 2
-
hoverIndeterminateBorderColor
- Since:
- 3.6
-
hoverIndeterminateBackground
- Since:
- 3.6
-
hoverIndeterminateCheckmarkColor
- Since:
- 3.6
-
pressedBorderColor
- Since:
- 2
-
pressedBackground
-
pressedSelectedBorderColor
- Since:
- 2
-
pressedSelectedBackground
- Since:
- 2
-
pressedCheckmarkColor
- Since:
- 2
-
pressedIndeterminateBorderColor
- Since:
- 3.6
-
pressedIndeterminateBackground
- Since:
- 3.6
-
pressedIndeterminateCheckmarkColor
- Since:
- 3.6
-
-
Constructor Details
-
FlatCheckBoxIcon
public FlatCheckBoxIcon()
-
-
Method Details
-
getPropertyPrefix
-
getUIColor
-
getUIFloat
-
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
-
paintFocusBorder
-
paintBorder
-
paintBackground
-
paintCheckmark
-
paintIndeterminate
-
isIndeterminate
-
isSelected
-
getFocusWidth
public float getFocusWidth()- Since:
- 2
-
getFocusColor
-
getBorderColor
-
getBackground
-
getCheckmarkColor
-