org.eclipse.swt.widgets.Scale.checkWidget()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(9.5k)|赞(0)|评价(0)|浏览(157)

本文整理了Java中org.eclipse.swt.widgets.Scale.checkWidget()方法的一些代码示例,展示了Scale.checkWidget()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Scale.checkWidget()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Scale
类名称:Scale
方法名:checkWidget

Scale.checkWidget介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

  1. /**
  2. * Returns the maximum value which the receiver will allow.
  3. *
  4. * @return the maximum
  5. * @exception SWTException <ul>
  6. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  7. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
  8. * thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public int getMaximum() {
  12. checkWidget();
  13. return maximum;
  14. }

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

  1. /**
  2. * Returns the 'selection', which is the receiver's position.
  3. *
  4. * @return the selection
  5. * @exception SWTException <ul>
  6. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  7. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
  8. * thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public int getSelection() {
  12. checkWidget();
  13. return selection;
  14. }

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

  1. /**
  2. * Returns the amount that the receiver's value will be modified by when the
  3. * up/down (or right/left) arrows are pressed.
  4. *
  5. * @return the increment
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
  9. * thread that created the receiver</li>
  10. * </ul>
  11. */
  12. public int getIncrement() {
  13. checkWidget();
  14. return increment;
  15. }

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

  1. /**
  2. * Returns the minimum value which the receiver will allow.
  3. *
  4. * @return the minimum
  5. * @exception SWTException <ul>
  6. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  7. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
  8. * thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public int getMinimum() {
  12. checkWidget();
  13. return minimum;
  14. }

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

  1. /**
  2. * Returns the amount that the receiver's value will be
  3. * modified by when the page increment/decrement areas
  4. * are selected.
  5. *
  6. * @return the page increment
  7. *
  8. * @exception SWTException <ul>
  9. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  10. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  11. * </ul>
  12. */
  13. public int getPageIncrement () {
  14. checkWidget();
  15. return pageIncrement;
  16. }

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

  1. /**
  2. * Returns the amount that the receiver's value will be modified by when the
  3. * page increment/decrement areas are selected.
  4. *
  5. * @return the page increment
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
  9. * thread that created the receiver</li>
  10. * </ul>
  11. */
  12. public int getPageIncrement() {
  13. checkWidget();
  14. return pageIncrement;
  15. }

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

  1. /**
  2. * Returns the minimum value which the receiver will allow.
  3. *
  4. * @return the minimum
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public int getMinimum () {
  12. checkWidget ();
  13. return (int)OS.SendMessage (handle, OS.TBM_GETRANGEMIN, 0, 0);
  14. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

  1. @Override
  2. Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
  3. checkWidget();
  4. if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
  5. if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
  6. Point size = computeNativeSize(handle, wHint, hHint, changed);
  7. if ((style & SWT.HORIZONTAL) != 0) {
  8. if (wHint == SWT.DEFAULT) size.x = 2 * size.x;
  9. } else {
  10. if (hHint == SWT.DEFAULT) size.y = 2 * size.y;
  11. }
  12. return size;
  13. }

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

  1. /**
  2. * Returns the maximum value which the receiver will allow.
  3. *
  4. * @return the maximum
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public int getMaximum () {
  12. checkWidget ();
  13. return (int)/*64*/OS.SendMessage (handle, OS.TBM_GETRANGEMAX, 0, 0);
  14. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

  1. @Override
  2. Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
  3. checkWidget();
  4. if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
  5. if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
  6. Point size = computeNativeSize(handle, wHint, hHint, changed);
  7. if ((style & SWT.HORIZONTAL) != 0) {
  8. if (wHint == SWT.DEFAULT) size.x = 2 * size.x;
  9. } else {
  10. if (hHint == SWT.DEFAULT) size.y = 2 * size.y;
  11. }
  12. return size;
  13. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

  1. @Override
  2. Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
  3. checkWidget();
  4. if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
  5. if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
  6. Point size = computeNativeSize(handle, wHint, hHint, changed);
  7. if ((style & SWT.HORIZONTAL) != 0) {
  8. if (wHint == SWT.DEFAULT) size.x = 2 * size.x;
  9. } else {
  10. if (hHint == SWT.DEFAULT) size.y = 2 * size.y;
  11. }
  12. return size;
  13. }

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

  1. /**
  2. * Returns the 'selection', which is the receiver's position.
  3. *
  4. * @return the selection
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public int getSelection () {
  12. checkWidget ();
  13. return (int)/*64*/OS.SendMessage (handle, OS.TBM_GETPOS, 0, 0);
  14. }

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

  1. /**
  2. * Returns the 'selection', which is the receiver's position.
  3. *
  4. * @return the selection
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public int getSelection () {
  12. checkWidget();
  13. return (int)((NSSlider)view).doubleValue();
  14. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

  1. /**
  2. * Returns the minimum value which the receiver will allow.
  3. *
  4. * @return the minimum
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public int getMinimum () {
  12. checkWidget ();
  13. int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
  14. return (int) OS.gtk_adjustment_get_lower (hAdjustment);
  15. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

  1. /**
  2. * Returns the 'selection', which is the receiver's position.
  3. *
  4. * @return the selection
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public int getSelection () {
  12. checkWidget ();
  13. long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
  14. return (int) OS.gtk_adjustment_get_value (hAdjustment);
  15. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

  1. /**
  2. * Returns the minimum value which the receiver will allow.
  3. *
  4. * @return the minimum
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public int getMinimum () {
  12. checkWidget ();
  13. long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
  14. return (int) OS.gtk_adjustment_get_lower (hAdjustment);
  15. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

  1. /**
  2. * Returns the 'selection', which is the receiver's position.
  3. *
  4. * @return the selection
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public int getSelection () {
  12. checkWidget ();
  13. int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
  14. return (int) OS.gtk_adjustment_get_value (hAdjustment);
  15. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

  1. /**
  2. * Returns the maximum value which the receiver will allow.
  3. *
  4. * @return the maximum
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public int getMaximum () {
  12. checkWidget ();
  13. int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
  14. return (int) OS.gtk_adjustment_get_upper (hAdjustment);
  15. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

  1. /**
  2. * Returns the maximum value which the receiver will allow.
  3. *
  4. * @return the maximum
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public int getMaximum () {
  12. checkWidget ();
  13. long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
  14. return (int) OS.gtk_adjustment_get_upper (hAdjustment);
  15. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

  1. /**
  2. * Returns the amount that the receiver's value will be
  3. * modified by when the up/down (or right/left) arrows
  4. * are pressed.
  5. *
  6. * @return the increment
  7. *
  8. * @exception SWTException <ul>
  9. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  10. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  11. * </ul>
  12. */
  13. public int getIncrement () {
  14. checkWidget ();
  15. long /*int*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
  16. return (int) OS.gtk_adjustment_get_step_increment (hAdjustment);
  17. }

相关文章