From b831ebadcaea1eea7370f7ec0bffc59eaba7a5ba Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 16 Oct 2013 14:28:27 +0200 Subject: Add efficient set(..all..) to Dimension, Insets, Point and Rectangle of NativeWindow's util types. --- .../classes/com/jogamp/nativewindow/awt/JAWTWindow.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/nativewindow/classes/com/jogamp') diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java index 6e198d961..38a46f214 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java @@ -243,17 +243,11 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface, System.err.println("JAWTWindow.updateBounds: "+bounds+" -> "+jb); // Thread.dumpStack(); } - bounds.setX(jawtBounds.getX()); - bounds.setY(jawtBounds.getY()); - bounds.setWidth(jawtBounds.getWidth()); - bounds.setHeight(jawtBounds.getHeight()); + bounds.set(jawtBounds.getX(), jawtBounds.getY(), jawtBounds.getWidth(), jawtBounds.getHeight()); if(component instanceof Container) { - java.awt.Insets contInsets = ((Container)component).getInsets(); - insets.setLeftWidth(contInsets.left); - insets.setRightWidth(contInsets.right); - insets.setTopHeight(contInsets.top); - insets.setBottomHeight(contInsets.bottom); + final java.awt.Insets contInsets = ((Container)component).getInsets(); + insets.set(contInsets.left, contInsets.right, contInsets.top, contInsets.bottom); } } return changed; -- cgit v1.2.3