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

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

本文整理了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

@Override
void createHandle (int index) {
  state |= HANDLE | THEME_BACKGROUND;
  fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
  if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
  OS.gtk_widget_set_has_window (fixedHandle, true);
  long /*int*/ hAdjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 0);
  if (hAdjustment == 0) error (SWT.ERROR_NO_HANDLES);
  if ((style & SWT.HORIZONTAL) != 0) {
    handle = gtk_scale_new (OS.GTK_ORIENTATION_HORIZONTAL, hAdjustment);
  } else {
    handle = gtk_scale_new (OS.GTK_ORIENTATION_VERTICAL, hAdjustment);
  }
  if (handle == 0) error (SWT.ERROR_NO_HANDLES);
  OS.gtk_container_add (fixedHandle, handle);
  OS.gtk_scale_set_digits (handle, 0);
  OS.gtk_scale_set_draw_value (handle, false);
}

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

@Override
void createHandle (int index) {
  state |= HANDLE | THEME_BACKGROUND;
  fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
  if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
  OS.gtk_widget_set_has_window (fixedHandle, true);
  int /*long*/ hAdjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 0);
  if (hAdjustment == 0) error (SWT.ERROR_NO_HANDLES);
  if ((style & SWT.HORIZONTAL) != 0) {
    handle = gtk_scale_new (OS.GTK_ORIENTATION_HORIZONTAL, hAdjustment);
  } else {
    handle = gtk_scale_new (OS.GTK_ORIENTATION_VERTICAL, hAdjustment);
  }
  if (handle == 0) error (SWT.ERROR_NO_HANDLES);
  OS.gtk_container_add (fixedHandle, handle);
  OS.gtk_scale_set_digits (handle, 0);
  OS.gtk_scale_set_draw_value (handle, false);
}

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

@Override
void createHandle (int index) {
  state |= HANDLE | THEME_BACKGROUND;
  fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
  if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
  OS.gtk_widget_set_has_window (fixedHandle, true);
  int /*long*/ hAdjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 0);
  if (hAdjustment == 0) error (SWT.ERROR_NO_HANDLES);
  if ((style & SWT.HORIZONTAL) != 0) {
    handle = gtk_scale_new (OS.GTK_ORIENTATION_HORIZONTAL, hAdjustment);
  } else {
    handle = gtk_scale_new (OS.GTK_ORIENTATION_VERTICAL, hAdjustment);
  }
  if (handle == 0) error (SWT.ERROR_NO_HANDLES);
  OS.gtk_container_add (fixedHandle, handle);
  OS.gtk_scale_set_digits (handle, 0);
  OS.gtk_scale_set_draw_value (handle, false);
}

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

/**
 * Removes the listener from the collection of listeners who will
 * be notified when the user changes the receiver's value.
 *
 * @param listener the listener which should no longer be notified
 *
 * @exception IllegalArgumentException <ul>
 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</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>
 *
 * @see SelectionListener
 * @see #addSelectionListener
 */
public void removeSelectionListener(SelectionListener listener) {
  checkWidget();
  if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
  if (eventTable == null) return;
  eventTable.unhook(SWT.Selection, listener);
  eventTable.unhook(SWT.DefaultSelection,listener);
}

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

/**
 * Removes the listener from the collection of listeners who will
 * be notified when the user changes the receiver's value.
 *
 * @param listener the listener which should no longer be notified
 *
 * @exception IllegalArgumentException <ul>
 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</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>
 *
 * @see SelectionListener
 * @see #addSelectionListener
 */
public void removeSelectionListener (SelectionListener listener) {
  checkWidget ();
  if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
  if (eventTable == null) return;
  eventTable.unhook (SWT.Selection, listener);
  eventTable.unhook (SWT.DefaultSelection,listener);
}

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

/**
 * Removes the listener from the collection of listeners who will
 * be notified when the user changes the receiver's value.
 *
 * @param listener the listener which should no longer be notified
 *
 * @exception IllegalArgumentException <ul>
 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</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>
 *
 * @see SelectionListener
 * @see #addSelectionListener
 */
public void removeSelectionListener(SelectionListener listener) {
  checkWidget ();
  if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
  if (eventTable == null) return;
  eventTable.unhook (SWT.Selection, listener);
  eventTable.unhook (SWT.DefaultSelection,listener);
}

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

/**
 * Removes the listener from the collection of listeners who will
 * be notified when the user changes the receiver's value.
 *
 * @param listener the listener which should no longer be notified
 *
 * @exception IllegalArgumentException <ul>
 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</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>
 *
 * @see SelectionListener
 * @see #addSelectionListener
 */
public void removeSelectionListener (SelectionListener listener) {
  checkWidget ();
  if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
  if (eventTable == null) return;
  eventTable.unhook (SWT.Selection, listener);
  eventTable.unhook (SWT.DefaultSelection,listener);
}

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

/**
 * Removes the listener from the collection of listeners who will
 * be notified when the user changes the receiver's value.
 *
 * @param listener the listener which should no longer be notified
 *
 * @exception IllegalArgumentException <ul>
 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</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>
 *
 * @see SelectionListener
 * @see #addSelectionListener
 */
public void removeSelectionListener (SelectionListener listener) {
  checkWidget ();
  if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
  if (eventTable == null) return;
  eventTable.unhook (SWT.Selection, listener);
  eventTable.unhook (SWT.DefaultSelection,listener);
}

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

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

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

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

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

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

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

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

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

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

相关文章