summaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-01-12 04:12:29 +0100
committerSven Gothel <[email protected]>2020-01-12 04:12:29 +0100
commite3e671e3ca63235830a2ebf7875650a4c86ce18e (patch)
treea05841e019b78b1066aa69a8ae1262cf86e09b82 /src/nativewindow/classes/com
parentf6a5ae588440ff873fd72f3b52956e7b02d4e728 (diff)
NativeWindow Point.set*(..): Return instance for scaling (chaining)
Diffstat (limited to 'src/nativewindow/classes/com')
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/util/Point.java22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/util/Point.java b/src/nativewindow/classes/com/jogamp/nativewindow/util/Point.java
index aa511b625..7f5f65b9f 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/util/Point.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/util/Point.java
@@ -102,9 +102,25 @@ public class Point implements Cloneable, PointImmutable {
return x + " / " + y;
}
- public final void set(final int x, final int y) { this.x = x; this.y = y; }
- public final void setX(final int x) { this.x = x; }
- public final void setY(final int y) { this.y = y; }
+ /**
+ * Set this instance's x- and y-component.
+ * @param x value for x-component
+ * @param y value for y-component
+ * @return this instance for scaling
+ */
+ public final Point set(final int x, final int y) { this.x = x; this.y = y; return this; }
+ /**
+ * Set this instance's x--component.
+ * @param x value for x-component
+ * @return this instance for scaling
+ */
+ public final Point setX(final int x) { this.x = x; return this; }
+ /**
+ * Set this instance's y-component.
+ * @param y value for y-component
+ * @return this instance for scaling
+ */
+ public final Point setY(final int y) { this.y = y; return this; }
/**
* Translate this instance's x- and y-components,