/** * Returns the border for radio buttons under the specified font size. * * @param fontSize * Font size. * @return Border for radio buttons under the specified font size. */ public static Border getRadioButtonBorder(int fontSize, boolean ltr) { Border checkBoxBorder = getCheckBoxBorder(fontSize, ltr); Insets checkBoxInsets = checkBoxBorder.getBorderInsets(null); return new BorderUIResource.EmptyBorderUIResource(checkBoxInsets.top, checkBoxInsets.left - (ltr ? 0 : 2), checkBoxInsets.bottom, checkBoxInsets.right - (ltr ? 2 : 0)); }
/** * Returns the border for radio buttons under the specified font size. * * @param fontSize * Font size. * @return Border for radio buttons under the specified font size. */ public static Border getRadioButtonBorder(int fontSize, boolean ltr) { Border checkBoxBorder = getCheckBoxBorder(fontSize, ltr); Insets checkBoxInsets = checkBoxBorder.getBorderInsets(null); return new BorderUIResource.EmptyBorderUIResource(checkBoxInsets.top, checkBoxInsets.left - (ltr ? 0 : 2), checkBoxInsets.bottom, checkBoxInsets.right - (ltr ? 2 : 0)); }
@Override protected void installDefaults(AbstractButton b) { super.installDefaults(b); button.setRolloverEnabled(true); Border border = b.getBorder(); if (border == null || border instanceof UIResource) { b.setBorder(SubstanceSizeUtils.getCheckBoxBorder(SubstanceSizeUtils .getComponentFontSize(b), b.getComponentOrientation() .isLeftToRight())); } }
@Override protected void installDefaults(AbstractButton b) { super.installDefaults(b); button.setRolloverEnabled(true); Border border = b.getBorder(); if (border == null || border instanceof UIResource) { b.setBorder(SubstanceSizeUtils.getCheckBoxBorder(SubstanceSizeUtils .getComponentFontSize(b), b.getComponentOrientation() .isLeftToRight())); } }
SubstanceSizeUtils.getCheckBoxBorder(SubstanceSizeUtils .getControlFontSize(), ComponentOrientation .getOrientation(Locale.getDefault())
SubstanceSizeUtils.getCheckBoxBorder( SubstanceSizeUtils.getControlFontSize(), ComponentOrientation.getOrientation(