summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Heidrich <fheidric>2003-09-18 20:47:33 +0000
committerFelipe Heidrich <fheidric>2003-09-18 20:47:33 +0000
commitc7c787478a65952dfb51a49c2c0ef8bc22ff2c91 (patch)
tree4020c45e1b38a9f81c7df44b9dfd35cceeb250b0
parent6fd245c413e086707686d3c451ebcbfa7daef5ff (diff)
downloadeclipse.platform.swt-c7c787478a65952dfb51a49c2c0ef8bc22ff2c91.tar.gz
eclipse.platform.swt-c7c787478a65952dfb51a49c2c0ef8bc22ff2c91.tar.xz
eclipse.platform.swt-c7c787478a65952dfb51a49c2c0ef8bc22ff2c91.zip
*** empty log message ***v2135g
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java31
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Combo.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java22
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Combo.java23
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java21
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Combo.java22
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Text.java22
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java27
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java27
11 files changed, 216 insertions, 45 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
index 8ec811134a..6d18e1cea3 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
@@ -4160,6 +4160,22 @@ int getOffsetAtX(String line, int lineOffset, int lineXOffset) {
gc.dispose();
return offset;
}
+/**
+ * Return the orientation of the receiver.
+ *
+ * @return the orientation bit.
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 2.1.2
+ */
+public int getOrientation () {
+ checkWidget();
+ return isMirrored() ? SWT.RIGHT_TO_LEFT : SWT.LEFT_TO_RIGHT;
+}
/**
* Returns the index of the last partially visible line.
*
@@ -7426,6 +7442,8 @@ void setMouseWordSelectionAnchor() {
* Sets the orientation of the receiver, which must be one
* of the constants <code>SWT.LEFT_TO_RIGHT</code> or <code>SWT.LEFT_TO_RIGHT</code>.
* <p>
+ *
+ * @param orientation new orientation bit
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -7434,21 +7452,21 @@ void setMouseWordSelectionAnchor() {
*
* @since 2.1.2
*/
-public boolean setOrientation(int orientation) {
+public void setOrientation(int orientation) {
if ((orientation & (SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT)) == 0) {
- return false;
+ return;
}
if ((orientation & SWT.RIGHT_TO_LEFT) != 0 && (orientation & SWT.LEFT_TO_RIGHT) != 0) {
- return false;
+ return;
}
if ((orientation & SWT.RIGHT_TO_LEFT) != 0 && isMirrored()) {
- return false;
+ return;
}
if ((orientation & SWT.LEFT_TO_RIGHT) != 0 && isMirrored() == false) {
- return false;
+ return;
}
if (StyledTextBidi.setOrientation(this, orientation) == false) {
- return false;
+ return;
}
isMirrored = (orientation & SWT.RIGHT_TO_LEFT) != 0;
isBidi = StyledTextBidi.isBidiPlatform() || isMirrored();
@@ -7462,7 +7480,6 @@ public boolean setOrientation(int orientation) {
keyActionMap.clear();
createKeyBindings();
super.redraw();
- return true;
}
/**
* Adjusts the maximum and the page size of the scroll bars to
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Combo.java
index 70d9c4c34d..f7da90344f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Combo.java
@@ -654,6 +654,23 @@ public String [] getItems () {
}
/**
+ * Returns the orientation of the receiver.
+ *
+ * @return the orientation bit.
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 2.1.2
+ */
+public int getOrientation () {
+ checkWidget();
+ return style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);
+}
+
+/**
* Returns a <code>Point</code> whose x coordinate is the start
* of the selection in the receiver's text field, and whose y
* coordinate is the end of the selection. The returned values
@@ -1272,7 +1289,6 @@ public void setItems (String [] items) {
* <p>
*
* @param orientation new orientation bit
- * @return <code>true</code> if the orientation was changed and <code>false</code> otherwise.
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1281,8 +1297,8 @@ public void setItems (String [] items) {
*
* @since 2.1.2
*/
-public boolean setOrientation (int orientation) {
- return false;
+public void setOrientation (int orientation) {
+ checkWidget();
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java
index aeadeef919..5bd93f482a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java
@@ -570,6 +570,23 @@ public int getLineHeight () {
}
/**
+ * Returns the orientation of the receiver.
+ *
+ * @return the orientation bit.
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 2.1.2
+ */
+public int getOrientation () {
+ checkWidget();
+ return style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);
+}
+
+/**
* Gets the position of the selected text.
* <p>
* Indexing is zero based. The range of
@@ -1224,7 +1241,6 @@ void setFontStyle (Font font) {
* <p>
*
* @param orientation new orientation bit
- * @return <code>true</code> if the orientation was changed and <code>false</code> otherwise.
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1233,8 +1249,8 @@ void setFontStyle (Font font) {
*
* @since 2.1.2
*/
-public boolean setOrientation (int orientation) {
- return false;
+public void setOrientation (int orientation) {
+ checkWidget();
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
index ecc0809ddb..89e2d34b99 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
@@ -595,6 +595,23 @@ public String [] getItems () {
}
/**
+ * Returns the orientation of the receiver.
+ *
+ * @return the orientation bit.
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 2.1.2
+ */
+public int getOrientation () {
+ checkWidget();
+ return style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);
+}
+
+/**
* Returns a <code>Point</code> whose x coordinate is the start
* of the selection in the receiver's text field, and whose y
* coordinate is the end of the selection. The returned values
@@ -1100,7 +1117,6 @@ void setItems (String [] items, boolean keepText, boolean keepSelection) {
* <p>
*
* @param orientation new orientation bit
- * @return <code>true</code> if the orientation was changed and <code>false</code> otherwise.
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1109,8 +1125,8 @@ void setItems (String [] items, boolean keepText, boolean keepSelection) {
*
* @since 2.1.2
*/
-public boolean setOrientation (int orientation) {
- return false;
+public void setOrientation (int orientation) {
+ checkWidget();
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
index ff52cc34c0..1f100915c0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
@@ -576,6 +576,23 @@ public int getLineHeight () {
}
/**
+ * Returns the orientation of the receiver.
+ *
+ * @return the orientation bit.
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 2.1.2
+ */
+public int getOrientation () {
+ checkWidget();
+ return style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);
+}
+
+/**
* Gets the position of the selected text.
* <p>
* Indexing is zero based. The range of
@@ -1172,7 +1189,6 @@ void setForegroundColor (GdkColor color) {
* <p>
*
* @param orientation new orientation bit
- * @return <code>true</code> if the orientation was changed and <code>false</code> otherwise.
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1181,8 +1197,8 @@ void setForegroundColor (GdkColor color) {
*
* @since 2.1.2
*/
-public boolean setOrientation (int orientation) {
- return false;
+public void setOrientation (int orientation) {
+ checkWidget();
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Combo.java
index 352ddae8b9..5c0e7c401a 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Combo.java
@@ -595,11 +595,25 @@ public String [] getItems () {
}
return result;
}
-
String getNameText () {
return getText ();
}
-
+/**
+ * Returns the orientation of the receiver.
+ *
+ * @return the orientation bit.
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 2.1.2
+ */
+public int getOrientation () {
+ checkWidget();
+ return style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);
+}
/**
* Returns a <code>Point</code> whose x coordinate is the start
* of the selection in the receiver's text field, and whose y
@@ -1246,7 +1260,6 @@ public void setItems (String [] items) {
* <p>
*
* @param orientation new orientation bit
- * @return <code>true</code> if the orientation was changed and <code>false</code> otherwise.
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1255,8 +1268,8 @@ public void setItems (String [] items) {
*
* @since 2.1.2
*/
-public boolean setOrientation (int orientation) {
- return false;
+public void setOrientation (int orientation) {
+ checkWidget();
}
/**
* Sets the selection in the receiver's text field to the
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java
index a25469dfcb..0e5f070a9a 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java
@@ -628,6 +628,22 @@ int getNavigationType () {
return buffer [0];
}
/**
+ * Returns the orientation of the receiver.
+ *
+ * @return the orientation bit.
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 2.1.2
+ */
+public int getOrientation () {
+ checkWidget();
+ return style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);
+}
+/**
* Gets the position of the selected text.
* <p>
* Indexing is zero based. The range of
@@ -1177,7 +1193,6 @@ public void setEditable (boolean editable) {
* <p>
*
* @param orientation new orientation bit
- * @return <code>true</code> if the orientation was changed and <code>false</code> otherwise.
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1186,8 +1201,8 @@ public void setEditable (boolean editable) {
*
* @since 2.1.2
*/
-public boolean setOrientation (int orientation) {
- return false;
+public void setOrientation (int orientation) {
+ checkWidget();
}
public void setRedraw (boolean redraw) {
checkWidget();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Combo.java
index cd5aea45b3..fb377d553d 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Combo.java
@@ -623,6 +623,23 @@ String getNameText () {
}
/**
+ * Returns the orientation of the receiver.
+ *
+ * @return the orientation bit.
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 2.1.2
+ */
+public int getOrientation () {
+ checkWidget();
+ return style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);
+}
+
+/**
* Returns a <code>Point</code> whose x coordinate is the start
* of the selection in the receiver's text field, and whose y
* coordinate is the end of the selection. The returned values
@@ -1128,7 +1145,6 @@ public void setItems (String [] items) {
* <p>
*
* @param orientation new orientation bit
- * @return <code>true</code> if the orientation was changed and <code>false</code> otherwise.
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1137,8 +1153,8 @@ public void setItems (String [] items) {
*
* @since 2.1.2
*/
-public boolean setOrientation (int orientation) {
- return false;
+public void setOrientation (int orientation) {
+ checkWidget();
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Text.java
index 7c668729dd..cdc08792e2 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Text.java
@@ -595,6 +595,23 @@ String getNameText () {
}
/**
+ * Returns the orientation of the receiver.
+ *
+ * @return the orientation bit.
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 2.1.2
+ */
+public int getOrientation () {
+ checkWidget();
+ return style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);
+}
+
+/**
* Gets the position of the selected text.
* <p>
* Indexing is zero based. The range of
@@ -1166,7 +1183,6 @@ public void setFont (Font font) {
* <p>
*
* @param orientation new orientation bit
- * @return <code>true</code> if the orientation was changed and <code>false</code> otherwise.
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1175,8 +1191,8 @@ public void setFont (Font font) {
*
* @since 2.1.2
*/
-public boolean setOrientation (int orientation) {
- return false;
+public void setOrientation (int orientation) {
+ checkWidget();
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
index 9e41e9a836..1d7f239870 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
@@ -556,6 +556,23 @@ String getNameText () {
}
/**
+ * Returns the orientation of the receiver.
+ *
+ * @return the orientation bit.
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 2.1.2
+ */
+public int getOrientation () {
+ checkWidget();
+ return style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);
+}
+
+/**
* Returns a <code>Point</code> whose x coordinate is the start
* of the selection in the receiver's text field, and whose y
* coordinate is the end of the selection. The returned values
@@ -1145,7 +1162,6 @@ public void setItems (String [] items) {
* <p>
*
* @param orientation new orientation bit
- * @return <code>true</code> if the orientation was changed and <code>false</code> otherwise.
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1154,12 +1170,12 @@ public void setItems (String [] items) {
*
* @since 2.1.2
*/
-public boolean setOrientation (int orientation) {
+public void setOrientation (int orientation) {
checkWidget();
- if (OS.IsWinCE) return false;
- if ((OS.WIN32_MAJOR << 16 | OS.WIN32_MINOR) < (4 << 16 | 10)) return false;
+ if (OS.IsWinCE) return;
+ if ((OS.WIN32_MAJOR << 16 | OS.WIN32_MINOR) < (4 << 16 | 10)) return;
int flags = SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT;
- if ((orientation & flags) == 0 || (orientation & flags) == flags) return false;
+ if ((orientation & flags) == 0 || (orientation & flags) == flags) return;
style &= ~flags;
style |= orientation & flags;
int bits = OS.GetWindowLong (handle, OS.GWL_EXSTYLE);
@@ -1218,7 +1234,6 @@ public boolean setOrientation (int orientation) {
}
OS.SetWindowLong (hwndList, OS.GWL_EXSTYLE, exStyle);
}
- return true;
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
index 9c7e319fb7..56f304df20 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
@@ -638,6 +638,23 @@ public int getLineHeight () {
}
/**
+ * Returns the orientation of the receiver.
+ *
+ * @return the orientation bit.
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 2.1.2
+ */
+public int getOrientation () {
+ checkWidget();
+ return style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);
+}
+
+/**
* Gets the position of the selected text.
* <p>
* Indexing is zero based. The range of
@@ -1237,7 +1254,6 @@ public void setFont (Font font) {
* <p>
*
* @param orientation new orientation bit
- * @return <code>true</code> if the orientation was changed and <code>false</code> otherwise.
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1246,12 +1262,12 @@ public void setFont (Font font) {
*
* @since 2.1.2
*/
-public boolean setOrientation (int orientation) {
+public void setOrientation (int orientation) {
checkWidget();
- if (OS.IsWinCE) return false;
- if ((OS.WIN32_MAJOR << 16 | OS.WIN32_MINOR) < (4 << 16 | 10)) return false;
+ if (OS.IsWinCE) return;
+ if ((OS.WIN32_MAJOR << 16 | OS.WIN32_MINOR) < (4 << 16 | 10)) return;
int flags = SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT;
- if ((orientation & flags) == 0 || (orientation & flags) == flags) return false;
+ if ((orientation & flags) == 0 || (orientation & flags) == flags) return;
style &= ~flags;
style |= orientation & flags;
int bits = OS.GetWindowLong (handle, OS.GWL_EXSTYLE);
@@ -1262,7 +1278,6 @@ public boolean setOrientation (int orientation) {
}
OS.SetWindowLong (handle, OS.GWL_EXSTYLE, bits);
fixAlignment ();
- return true;
}
/**