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

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

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

Scale.error介绍

暂无

代码示例

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

  1. @Override
  2. void createHandle (int index) {
  3. state |= HANDLE | THEME_BACKGROUND;
  4. fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
  5. if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
  6. OS.gtk_widget_set_has_window (fixedHandle, true);
  7. long /*int*/ hAdjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 0);
  8. if (hAdjustment == 0) error (SWT.ERROR_NO_HANDLES);
  9. if ((style & SWT.HORIZONTAL) != 0) {
  10. handle = gtk_scale_new (OS.GTK_ORIENTATION_HORIZONTAL, hAdjustment);
  11. } else {
  12. handle = gtk_scale_new (OS.GTK_ORIENTATION_VERTICAL, hAdjustment);
  13. }
  14. if (handle == 0) error (SWT.ERROR_NO_HANDLES);
  15. OS.gtk_container_add (fixedHandle, handle);
  16. OS.gtk_scale_set_digits (handle, 0);
  17. OS.gtk_scale_set_draw_value (handle, false);
  18. }

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

  1. @Override
  2. void createHandle (int index) {
  3. state |= HANDLE | THEME_BACKGROUND;
  4. fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
  5. if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
  6. OS.gtk_widget_set_has_window (fixedHandle, true);
  7. int /*long*/ hAdjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 0);
  8. if (hAdjustment == 0) error (SWT.ERROR_NO_HANDLES);
  9. if ((style & SWT.HORIZONTAL) != 0) {
  10. handle = gtk_scale_new (OS.GTK_ORIENTATION_HORIZONTAL, hAdjustment);
  11. } else {
  12. handle = gtk_scale_new (OS.GTK_ORIENTATION_VERTICAL, hAdjustment);
  13. }
  14. if (handle == 0) error (SWT.ERROR_NO_HANDLES);
  15. OS.gtk_container_add (fixedHandle, handle);
  16. OS.gtk_scale_set_digits (handle, 0);
  17. OS.gtk_scale_set_draw_value (handle, false);
  18. }

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

  1. @Override
  2. void createHandle (int index) {
  3. state |= HANDLE | THEME_BACKGROUND;
  4. fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
  5. if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
  6. OS.gtk_widget_set_has_window (fixedHandle, true);
  7. int /*long*/ hAdjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 0);
  8. if (hAdjustment == 0) error (SWT.ERROR_NO_HANDLES);
  9. if ((style & SWT.HORIZONTAL) != 0) {
  10. handle = gtk_scale_new (OS.GTK_ORIENTATION_HORIZONTAL, hAdjustment);
  11. } else {
  12. handle = gtk_scale_new (OS.GTK_ORIENTATION_VERTICAL, hAdjustment);
  13. }
  14. if (handle == 0) error (SWT.ERROR_NO_HANDLES);
  15. OS.gtk_container_add (fixedHandle, handle);
  16. OS.gtk_scale_set_digits (handle, 0);
  17. OS.gtk_scale_set_draw_value (handle, false);
  18. }

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

  1. /**
  2. * Removes the listener from the collection of listeners who will
  3. * be notified when the user changes the receiver's value.
  4. *
  5. * @param listener the listener which should no longer be notified
  6. *
  7. * @exception IllegalArgumentException <ul>
  8. * <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
  9. * </ul>
  10. * @exception SWTException <ul>
  11. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  12. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  13. * </ul>
  14. *
  15. * @see SelectionListener
  16. * @see #addSelectionListener
  17. */
  18. public void removeSelectionListener(SelectionListener listener) {
  19. checkWidget();
  20. if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
  21. if (eventTable == null) return;
  22. eventTable.unhook(SWT.Selection, listener);
  23. eventTable.unhook(SWT.DefaultSelection,listener);
  24. }

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

  1. /**
  2. * Removes the listener from the collection of listeners who will
  3. * be notified when the user changes the receiver's value.
  4. *
  5. * @param listener the listener which should no longer be notified
  6. *
  7. * @exception IllegalArgumentException <ul>
  8. * <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
  9. * </ul>
  10. * @exception SWTException <ul>
  11. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  12. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  13. * </ul>
  14. *
  15. * @see SelectionListener
  16. * @see #addSelectionListener
  17. */
  18. public void removeSelectionListener (SelectionListener listener) {
  19. checkWidget ();
  20. if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
  21. if (eventTable == null) return;
  22. eventTable.unhook (SWT.Selection, listener);
  23. eventTable.unhook (SWT.DefaultSelection,listener);
  24. }

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

  1. /**
  2. * Removes the listener from the collection of listeners who will
  3. * be notified when the user changes the receiver's value.
  4. *
  5. * @param listener the listener which should no longer be notified
  6. *
  7. * @exception IllegalArgumentException <ul>
  8. * <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
  9. * </ul>
  10. * @exception SWTException <ul>
  11. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  12. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  13. * </ul>
  14. *
  15. * @see SelectionListener
  16. * @see #addSelectionListener
  17. */
  18. public void removeSelectionListener(SelectionListener listener) {
  19. checkWidget ();
  20. if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
  21. if (eventTable == null) return;
  22. eventTable.unhook (SWT.Selection, listener);
  23. eventTable.unhook (SWT.DefaultSelection,listener);
  24. }

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

  1. /**
  2. * Removes the listener from the collection of listeners who will
  3. * be notified when the user changes the receiver's value.
  4. *
  5. * @param listener the listener which should no longer be notified
  6. *
  7. * @exception IllegalArgumentException <ul>
  8. * <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
  9. * </ul>
  10. * @exception SWTException <ul>
  11. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  12. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  13. * </ul>
  14. *
  15. * @see SelectionListener
  16. * @see #addSelectionListener
  17. */
  18. public void removeSelectionListener (SelectionListener listener) {
  19. checkWidget ();
  20. if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
  21. if (eventTable == null) return;
  22. eventTable.unhook (SWT.Selection, listener);
  23. eventTable.unhook (SWT.DefaultSelection,listener);
  24. }

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

  1. /**
  2. * Removes the listener from the collection of listeners who will
  3. * be notified when the user changes the receiver's value.
  4. *
  5. * @param listener the listener which should no longer be notified
  6. *
  7. * @exception IllegalArgumentException <ul>
  8. * <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
  9. * </ul>
  10. * @exception SWTException <ul>
  11. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  12. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  13. * </ul>
  14. *
  15. * @see SelectionListener
  16. * @see #addSelectionListener
  17. */
  18. public void removeSelectionListener (SelectionListener listener) {
  19. checkWidget ();
  20. if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
  21. if (eventTable == null) return;
  22. eventTable.unhook (SWT.Selection, listener);
  23. eventTable.unhook (SWT.DefaultSelection,listener);
  24. }

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

  1. if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
  2. TypedListener typedListener = new TypedListener(listener);
  3. addListener(SWT.Selection,typedListener);

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

  1. if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
  2. TypedListener typedListener = new TypedListener (listener);
  3. addListener (SWT.Selection,typedListener);

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

  1. if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
  2. TypedListener typedListener = new TypedListener (listener);
  3. addListener (SWT.Selection,typedListener);

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

  1. if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
  2. TypedListener typedListener = new TypedListener (listener);
  3. addListener (SWT.Selection,typedListener);

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

  1. if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
  2. TypedListener typedListener = new TypedListener (listener);
  3. addListener (SWT.Selection,typedListener);

相关文章