diff --git a/CodenameOne/src/com/codename1/ui/plaf/RoundRectBorder.java b/CodenameOne/src/com/codename1/ui/plaf/RoundRectBorder.java index 0cbcdca813..caa3a13f4d 100644 --- a/CodenameOne/src/com/codename1/ui/plaf/RoundRectBorder.java +++ b/CodenameOne/src/com/codename1/ui/plaf/RoundRectBorder.java @@ -83,7 +83,8 @@ public class RoundRectBorder extends Border { private int shadowOpacity = 0; /** - * X axis bias of the shadow between 0 and 1 where 0 is to the top and 1 is to the bottom, defaults to 0.5 + * X axis bias of the shadow between 0 and 1 where 0 is to the + and 1 is to the bottom, defaults to 0.5 */ private float shadowX = 0.5f; @@ -314,7 +315,7 @@ public RoundRectBorder bottomRightMode(boolean bottomRight) { * @return border instance so these calls can be chained */ public RoundRectBorder topOnlyMode(boolean topOnlyMode) { - if(topOnlyMode) { + if(!topOnlyMode) { this.topLeft = false; this.topRight = false; this.bottomLeft = true; @@ -333,7 +334,7 @@ public RoundRectBorder topOnlyMode(boolean topOnlyMode) { * @return border instance so these calls can be chained */ public RoundRectBorder bottomOnlyMode(boolean bottomOnlyMode) { - if(bottomOnlyMode) { + if(!bottomOnlyMode) { this.topLeft = true; this.topRight = true; this.bottomLeft = false;