diff options
author | Steve Northover <steve> | 2005-06-06 23:34:46 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2005-06-06 23:34:46 +0000 |
commit | d81596223a29b268489342ef9686d89dc3ec9930 (patch) | |
tree | 691bd278e1f8752c3cf02538f78d9ca76b2dd8e7 | |
parent | 73f19fb22f36296b2b1d319322bf8eada9b8a2c1 (diff) | |
download | eclipse.platform.swt-d81596223a29b268489342ef9686d89dc3ec9930.tar.gz eclipse.platform.swt-d81596223a29b268489342ef9686d89dc3ec9930.tar.xz eclipse.platform.swt-d81596223a29b268489342ef9686d89dc3ec9930.zip |
make setSize(), setLocation() and setBounds() consistent
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java index 974bfc0d12..9be57b169d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java @@ -2150,8 +2150,9 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize * </ul> */ public void setBounds (Rectangle rect) { + checkWidget (); if (rect == null) error (SWT.ERROR_NULL_ARGUMENT); - setBounds (rect.x, rect.y, rect.width, rect.height); + setBounds (rect.x, rect.y, Math.max (0, rect.width), Math.max (0, rect.height), true, true, true); } /** @@ -2440,8 +2441,9 @@ public void setLocation (int x, int y) { * </ul> */ public void setLocation (Point location) { + checkWidget(); if (location == null) error (SWT.ERROR_NULL_ARGUMENT); - setLocation (location.x, location.y); + setBounds (location.x, location.y, 0, 0, true, false, true); } /** @@ -2582,8 +2584,9 @@ public void setSize (int width, int height) { * </ul> */ public void setSize (Point size) { + checkWidget (); if (size == null) error (SWT.ERROR_NULL_ARGUMENT); - setSize (size.x, size.y); + setBounds (0, 0, Math.max (0, size.x), Math.max (0, size.y), false, true, true); } boolean setTabGroupFocus () { |