Class FlatCheckBoxIcon

java.lang.Object
com.formdev.flatlaf.icons.FlatAbstractIcon
com.formdev.flatlaf.icons.FlatCheckBoxIcon
All Implemented Interfaces:
Icon, UIResource
Direct Known Subclasses:
FlatRadioButtonIcon, FlatThemePreviewSwitches.ZoomCheckBoxIcon

public class FlatCheckBoxIcon extends FlatAbstractIcon
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.

  • Field Details

    • 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
    • ICON_SIZE

      static final int ICON_SIZE
      See Also:
  • Constructor Details

    • FlatCheckBoxIcon

      public FlatCheckBoxIcon()
  • Method Details

    • getPropertyPrefix

      protected String getPropertyPrefix()
    • getUIColor

      protected static Color getUIColor(String key, String style)
    • getUIFloat

      protected static float getUIFloat(String key, float defaultValue, String style)
      Since:
      2
    • styleKey

      private static String styleKey(String key, String style)
    • applyStyleProperty

      public Object applyStyleProperty(String key, Object value)
      Since:
      2
    • getStyleableInfos

      public Map<String,Class<?>> getStyleableInfos()
      Since:
      2
    • getStyleableValue

      public Object getStyleableValue(String key)
      Since:
      2.5
    • paintIcon

      protected void paintIcon(Component c, Graphics2D g)
      Specified by:
      paintIcon in class FlatAbstractIcon
    • 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
    • getFocusColor

      protected Color getFocusColor(Component c)
    • getBorderColor

      protected Color getBorderColor(Component c, boolean selected)
    • getBackground

      protected Color getBackground(Component c, boolean selected)
    • getCheckmarkColor

      protected Color getCheckmarkColor(Component c)