diff options
author | Felipe Heidrich <fheidric> | 2005-03-28 23:07:54 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2005-03-28 23:07:54 +0000 |
commit | 2f7b25b56baa5857ac82297b9b5ab474f4612d5a (patch) | |
tree | 0bda927cc3f20adb72d9299042e74a44735bb7b2 | |
parent | 2c8b26639ddf8652e4b7cebdb2dd9cd75c0e8867 (diff) | |
download | eclipse.platform.swt-2f7b25b56baa5857ac82297b9b5ab474f4612d5a.tar.gz eclipse.platform.swt-2f7b25b56baa5857ac82297b9b5ab474f4612d5a.tar.xz eclipse.platform.swt-2f7b25b56baa5857ac82297b9b5ab474f4612d5a.zip |
*** empty log message ***
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java index 2339db308d..1fc31736f5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java @@ -382,6 +382,16 @@ boolean hasFocus () { return false; } +/** + * Returns the number of decimal places used by the receiver. + * + * @return the digits + * + * @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> + */ public int getDigits () { checkWidget (); return digits; @@ -719,9 +729,28 @@ boolean sendKeyEvent (int type, int msg, int wParam, int lParam, Event event) { return false; } +/** + * Sets the number of decimal places used by the receiver. + * <p> + * The digit setting is used to allow for floating point values in the receiver. + * For example, to set the selection to a floating point value of 1.37 call setDigits() with + * a value of 2 and setSelection() with a value of 137. Similarly, if getDigits() has a value + * of 2 and getSelection() returns 137 this should be interpreted as 1.37. This applies to all + * numeric APIs. + * + * @param value the new digits (must be greater than or equal to zero) + * + * @exception IllegalArgumentException <ul> + * <li>ERROR_INVALID_ARGUMENT - if the value is less than zero</li> + * </ul> + * @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> + */ public void setDigits (int value) { checkWidget (); - if (value < 0) return; + if (value < 0) error (SWT.ERROR_INVALID_ARGUMENT); if (value == this.digits) return; this.digits = value; int pos; |