/** * Returns the diameter of a drag bump dot under the specified font size. * * @param fontSize * Font size. * @return Diameter of a drag bump dot under the specified font size. */ public static int getDragBumpDiameter(int fontSize) { return getAdjustedSize(fontSize, 2, 4, 1, false); }
/** * Returns the corner radius for {@link ClassicButtonShaper} under the * specified font size. * * @param fontSize * Font size. * @return Corner radius for {@link ClassicButtonShaper} under the specified * font size. */ public static float getClassicButtonCornerRadius(int fontSize) { return getAdjustedSize(fontSize, 2, 6, 1, false); }
/** * Returns the gap between text and icon in buttons and menu items under the * specified font size. * * @param fontSize * Font size. * @return Gap between text and icon in button menu items under the * specified font size. */ public static int getTextIconGap(int fontSize) { return getAdjustedSize(fontSize, 4, 3, 1, false); }
/** * Returns the text button padding amount on left and right sides under the * specified font size. * * @param fontSize * Font size. * @return Text button padding amount on left and right sides under the * specified font size. */ public static int getTextButtonLRPadding(int fontSize) { return SubstanceSizeUtils.getAdjustedSize(fontSize, 3, 2, 1, false); }
/** * Returns the gap between text and icon in buttons and menu items under the * specified font size. * * @param fontSize * Font size. * @return Gap between text and icon in button menu items under the * specified font size. */ public static int getTextIconGap(int fontSize) { return getAdjustedSize(fontSize, 4, 3, 1, false); }
/** * Returns the text button padding amount on left and right sides under the * specified font size. * * @param fontSize * Font size. * @return Text button padding amount on left and right sides under the * specified font size. */ public static int getTextButtonLRPadding(int fontSize) { return SubstanceSizeUtils.getAdjustedSize(fontSize, 3, 2, 1, false); }
/** * Returns the corner radius for {@link ClassicButtonShaper} under the * specified font size. * * @param fontSize * Font size. * @return Corner radius for {@link ClassicButtonShaper} under the specified * font size. */ public static float getClassicButtonCornerRadius(int fontSize) { return getAdjustedSize(fontSize, 2, 6, 1, false); }
/** * Returns the password dot diameter for password fields under the specified * font size. * * @param fontSize * Font size. * @return Password dot diameter for password fields under the specified * font size. */ public static int getPasswordDotDiameter(int fontSize) { return getAdjustedSize(fontSize, 7, 2, 1, false); }
/** * Returns the extra padding amount under the specified font size. * * @param fontSize * Font size. * @return Extra padding amount under the specified font size. */ public static int getExtraPadding(int fontSize) { if (fontSize < 14) return 0; return (int) SubstanceSizeUtils.getAdjustedSize(fontSize, 0, 3, 1.2f); }
/** * Returns the margin for menu items under the specified font size. * * @param fontSize * Font size. * @return Margin for menu items under the specified font size. */ public static int getMenuItemMargin(int fontSize) { return getAdjustedSize(fontSize, 2, 4, 1, false); }
/** * Returns the offset of the first split pane divider button under the * specified font size. * * @param fontSize * Font size. * @return Offset of the first split pane divider button under the specified * font size. */ public static int getSplitPaneButtonOffset(int fontSize) { return getAdjustedSize(fontSize, 2, 3, 1, false); }
/** * Returns the extra padding amount under the specified font size. * * @param fontSize * Font size. * @return Extra padding amount under the specified font size. */ public static int getExtraPadding(int fontSize) { if (fontSize < 14) return 0; return (int) SubstanceSizeUtils.getAdjustedSize(fontSize, 0, 3, 1.2f); }
/** * Returns the margin for menu items under the specified font size. * * @param fontSize * Font size. * @return Margin for menu items under the specified font size. */ public static int getMenuItemMargin(int fontSize) { return getAdjustedSize(fontSize, 2, 4, 1, false); }
/** * Returns the tool bar insets under the specified font size. * * @param fontSize * Font size. * @return Tool bar insets under the specified font size. */ public static Insets getToolBarInsets(int fontSize) { int lbrInset = getAdjustedSize(fontSize, 2, 3, 1, false); int tInset = getAdjustedSize(fontSize, 1, 3, 1, false); return new Insets(tInset, lbrInset, lbrInset, lbrInset); }
@Override protected Dimension getPreferredInnerVertical() { int size = SubstanceSizeUtils.getComponentFontSize(this.progressBar); size += 2 * SubstanceSizeUtils.getAdjustedSize(size, 1, 4, 1, false); return new Dimension(size, 146 + SubstanceSizeUtils.getAdjustedSize( size, 0, 1, 10, false)); }
@Override protected Dimension getPreferredInnerHorizontal() { int size = SubstanceSizeUtils.getComponentFontSize(this.progressBar); size += 2 * SubstanceSizeUtils.getAdjustedSize(size, 1, 4, 1, false); return new Dimension(146 + SubstanceSizeUtils.getAdjustedSize(size, 0, 1, 10, false), size); }
@Override protected Dimension getPreferredInnerHorizontal() { int size = SubstanceSizeUtils.getComponentFontSize(this.progressBar); size += 2 * SubstanceSizeUtils.getAdjustedSize(size, 1, 4, 1, false); return new Dimension(146 + SubstanceSizeUtils.getAdjustedSize(size, 0, 1, 10, false), size); }
@Override public Dimension getPreferredVerticalSize() { return new Dimension(21, SubstanceSizeUtils.getAdjustedSize( SubstanceSizeUtils.getComponentFontSize(this.slider), 200, 1, 20, false)); } }
@Override public Dimension getPreferredHorizontalSize() { return new Dimension(SubstanceSizeUtils.getAdjustedSize( SubstanceSizeUtils.getComponentFontSize(this.slider), 200, 1, 20, false), 21); }
@Override protected int getSeparatorWidth() { return SubstanceSizeUtils.getAdjustedSize(SubstanceSizeUtils .getComponentFontSize(this.statusBar), super .getSeparatorWidth(), 2, 1, false); }