summaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-10-16 14:28:27 +0200
committerSven Gothel <[email protected]>2013-10-16 14:28:27 +0200
commitb831ebadcaea1eea7370f7ec0bffc59eaba7a5ba (patch)
treeda1bbe7671b27db55859b5beb9dc0fe6fc750e3b /src/newt/classes/com
parent12d1142d197afb17828056252282fb5a6186b325 (diff)
Add efficient set(..all..) to Dimension, Insets, Point and Rectangle of NativeWindow's util types.
Diffstat (limited to 'src/newt/classes/com')
-rw-r--r--src/newt/classes/com/jogamp/newt/MonitorDevice.java5
-rw-r--r--src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java3
2 files changed, 2 insertions, 6 deletions
diff --git a/src/newt/classes/com/jogamp/newt/MonitorDevice.java b/src/newt/classes/com/jogamp/newt/MonitorDevice.java
index 8bc7f40e3..42ac34240 100644
--- a/src/newt/classes/com/jogamp/newt/MonitorDevice.java
+++ b/src/newt/classes/com/jogamp/newt/MonitorDevice.java
@@ -183,10 +183,7 @@ public abstract class MonitorDevice {
y1 = Math.min(y1, vp.getY());
y2 = Math.max(y2, vp.getY() + vp.getHeight());
}
- result.setX(x1);
- result.setY(y1);
- result.setWidth(x2 - x1);
- result.setHeight(y2 - y1);
+ result.set(x1, y1, x2 - x1, y2 - y1);
return result;
}
diff --git a/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java b/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java
index 2fa83e0e2..a2135273b 100644
--- a/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java
+++ b/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java
@@ -497,8 +497,7 @@ public class NewtCanvasSWT extends Canvas implements WindowClosingProtocol {
if( isOSX ) {
final Point los = OSXUtil.GetLocationOnScreen(nativeWindowHandle, false, 0, 0);
// top-level position -> client window position
- los.setX(los.getX() + insets.getLeftWidth());
- los.setY(los.getY() + insets.getTopHeight());
+ los.set(los.getX() + insets.getLeftWidth(), los.getY() + insets.getTopHeight());
if(null!=point) {
return point.translate(los);
} else {