aboutsummaryrefslogtreecommitdiffstats
path: root/src/graphui/classes/com/jogamp/graph/ui/shapes/RoundButton.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-04-12 18:56:29 +0200
committerSven Gothel <[email protected]>2023-04-12 18:56:29 +0200
commit2fbaa25d70854de2857d9fa20ac6a34c294a4222 (patch)
tree200b13263c1bd67ee7331a4a26e51443a84b8baa /src/graphui/classes/com/jogamp/graph/ui/shapes/RoundButton.java
parent1e74a2d782c2f6e79c14e42df0b2acbe17271662 (diff)
GraphUI: Return this on setter/modifier methods for chaining
Diffstat (limited to 'src/graphui/classes/com/jogamp/graph/ui/shapes/RoundButton.java')
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/shapes/RoundButton.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/shapes/RoundButton.java b/src/graphui/classes/com/jogamp/graph/ui/shapes/RoundButton.java
index a2ab43ae1..4ea154c09 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/shapes/RoundButton.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/shapes/RoundButton.java
@@ -60,10 +60,11 @@ public abstract class RoundButton extends GraphShape {
public final float getCorner() { return corner; }
- public void setSize(final float width, final float height) {
+ public RoundButton setSize(final float width, final float height) {
this.width = width;
this.height = height;
markShapeDirty();
+ return this;
}
protected void createSharpOutline(final OutlineShape shape, final float zOffset) {
@@ -109,7 +110,7 @@ public abstract class RoundButton extends GraphShape {
}
/** Set corner size, default is {@link #DEFAULT_CORNER} */
- public void setCorner(final float corner) {
+ public RoundButton setCorner(final float corner) {
if(corner > 1.0f){
this.corner = 1.0f;
}
@@ -120,6 +121,7 @@ public abstract class RoundButton extends GraphShape {
this.corner = corner;
}
markShapeDirty();
+ return this;
}
@Override