From e3e671e3ca63235830a2ebf7875650a4c86ce18e Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 12 Jan 2020 04:12:29 +0100 Subject: NativeWindow Point.set*(..): Return instance for scaling (chaining) --- .../com/jogamp/nativewindow/util/Point.java | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'src/nativewindow/classes/com') 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, -- cgit v1.2.3