diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java index 7c7235df..36235eeb 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java @@ -41,7 +41,7 @@ public interface FlatClientProperties * {@link #BUTTON_TYPE_TAB}, * {@link #BUTTON_TYPE_HELP} or * {@link #BUTTON_TYPE_TOOLBAR_BUTTON} - * {@link #BUTTON_TYPE_BORDER_LESS} + * {@link #BUTTON_TYPE_BORDERLESS} */ String BUTTON_TYPE = "JButton.buttonType"; @@ -97,7 +97,7 @@ public interface FlatClientProperties * * @see #BUTTON_TYPE */ - String BUTTON_TYPE_BORDER_LESS = "borderLess"; + String BUTTON_TYPE_BORDERLESS = "borderless"; /** * Specifies selected state of a checkbox. diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonBorder.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonBorder.java index 677774f1..614693fc 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonBorder.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonBorder.java @@ -75,7 +75,7 @@ public class FlatButtonBorder public void paintBorder( Component c, Graphics g, int x, int y, int width, int height ) { if( FlatButtonUI.isContentAreaFilled( c ) && !FlatButtonUI.isToolBarButton( c ) && - ( !FlatButtonUI.isBorderLessButton( c ) || FlatUIUtils.isPermanentFocusOwner( c ) ) && + ( !FlatButtonUI.isBorderlessButton( c ) || FlatUIUtils.isPermanentFocusOwner( c ) ) && !FlatButtonUI.isHelpButton( c ) && !FlatToggleButtonUI.isTabButton( c ) ) super.paintBorder( c, g, x, y, width, height ); diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java index d145639b..99d0eef2 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java @@ -285,8 +285,9 @@ public class FlatButtonUI (c instanceof AbstractButton && clientPropertyEquals( (AbstractButton) c, BUTTON_TYPE, BUTTON_TYPE_TOOLBAR_BUTTON )); } - static boolean isBorderLessButton( Component c ) { - return c instanceof AbstractButton && clientPropertyEquals( (AbstractButton) c, BUTTON_TYPE, BUTTON_TYPE_BORDER_LESS ); + static boolean isBorderlessButton( Component c ) { + return c instanceof AbstractButton && clientPropertyEquals( (AbstractButton) c, BUTTON_TYPE, + BUTTON_TYPE_BORDERLESS ); } @Override @@ -336,7 +337,7 @@ public class FlatButtonUI // paint shadow Color shadowColor = def ? defaultShadowColor : this.shadowColor; - if( !isToolBarButton && !isBorderLessButton( c ) && shadowColor != null && shadowWidth > 0 && focusWidth > 0 && + if( !isToolBarButton && !isBorderlessButton( c ) && shadowColor != null && shadowWidth > 0 && focusWidth > 0 && !(isFocusPainted( c ) && FlatUIUtils.isPermanentFocusOwner( c )) && c.isEnabled() ) { g2.setColor( shadowColor ); @@ -395,7 +396,7 @@ public class FlatButtonUI if( ((AbstractButton)c).isSelected() ) { // in toolbar use same colors for disabled and enabled because // we assume that toolbar icon is shown disabled - boolean toolBarButton = isToolBarButton( c ) || isBorderLessButton( c ); + boolean toolBarButton = isToolBarButton( c ) || isBorderlessButton( c ); return buttonStateColor( c, toolBarButton ? toolbarSelectedBackground : selectedBackground, toolBarButton ? toolbarSelectedBackground : disabledSelectedBackground, @@ -407,7 +408,7 @@ public class FlatButtonUI return disabledBackground; // toolbar button - if( isToolBarButton( c ) || isBorderLessButton( c ) ) { + if( isToolBarButton( c ) || isBorderlessButton( c ) ) { ButtonModel model = ((AbstractButton)c).getModel(); if( model.isPressed() ) return toolbarPressedBackground; @@ -469,7 +470,7 @@ public class FlatButtonUI if( !c.isEnabled() ) return disabledText; - if( ((AbstractButton)c).isSelected() && !( isToolBarButton( c ) || isBorderLessButton( c ) ) ) + if( ((AbstractButton)c).isSelected() && !( isToolBarButton( c ) || isBorderlessButton( c ) ) ) return selectedForeground; // use component foreground if explicitly set diff --git a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatButton.java b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatButton.java index d2082470..b357bc53 100644 --- a/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatButton.java +++ b/flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatButton.java @@ -30,7 +30,7 @@ public class FlatButton implements FlatComponentExtension { // NOTE: enum names must be equal to allowed strings - public enum ButtonType { none, square, roundRect, tab, help, toolBarButton, borderLess } + public enum ButtonType { none, square, roundRect, tab, help, toolBarButton, borderless} /** * Returns type of a button.