本文整理了Java中org.eclipse.swt.widgets.Label.error()
方法的一些代码示例,展示了Label.error()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.error()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Label
类名称:Label
方法名:error
暂无
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
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);
if ((style & SWT.SEPARATOR) != 0) {
handle = gtk_separator_new (OS.GTK_ORIENTATION_VERTICAL);
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
} else {
handle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 0);
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
labelHandle = OS.gtk_label_new_with_mnemonic (null);
if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
imageHandle = OS.gtk_image_new ();
if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES);
OS.gtk_container_add (handle, labelHandle);
OS.gtk_container_add (handle, imageHandle);
if (frameHandle == 0) error (SWT.ERROR_NO_HANDLES);
OS.gtk_container_add (fixedHandle, frameHandle);
OS.gtk_container_add (frameHandle, handle);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
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);
if ((style & SWT.SEPARATOR) != 0) {
handle = gtk_separator_new (OS.GTK_ORIENTATION_VERTICAL);
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
} else {
handle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 0);
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
labelHandle = OS.gtk_label_new_with_mnemonic (null);
if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
imageHandle = OS.gtk_image_new ();
if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES);
OS.gtk_container_add (handle, labelHandle);
OS.gtk_container_add (handle, imageHandle);
if (frameHandle == 0) error (SWT.ERROR_NO_HANDLES);
OS.gtk_container_add (fixedHandle, frameHandle);
OS.gtk_container_add (frameHandle, handle);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
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);
if ((style & SWT.SEPARATOR) != 0) {
handle = gtk_separator_new (OS.GTK_ORIENTATION_VERTICAL);
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
} else {
handle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 0);
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
labelHandle = OS.gtk_label_new_with_mnemonic (null);
if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
imageHandle = OS.gtk_image_new ();
if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES);
OS.gtk_container_add (handle, labelHandle);
OS.gtk_container_add (handle, imageHandle);
if (frameHandle == 0) error (SWT.ERROR_NO_HANDLES);
OS.gtk_container_add (fixedHandle, frameHandle);
OS.gtk_container_add (frameHandle, handle);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
/**
* Sets the receiver's image to the argument, which may be
* null indicating that no image should be displayed.
*
* @param image the image to display on the receiver (may be null)
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</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 setImage (Image image) {
checkWidget ();
if ((style & SWT.SEPARATOR) != 0) return;
if (image != null && image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
this.image = image;
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
if ((bits & OS.SS_OWNERDRAW) != OS.SS_OWNERDRAW) {
bits &= ~(OS.SS_LEFTNOWORDWRAP | OS.SS_CENTER | OS.SS_RIGHT);
bits |= OS.SS_OWNERDRAW;
OS.SetWindowLong (handle, OS.GWL_STYLE, bits);
}
OS.InvalidateRect (handle, null, true);
}
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
if ((style & SWT.SEPARATOR) != 0) return;
isImage = false;
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
if ((style & SWT.SEPARATOR) != 0) return;
text = string;
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
if ((style & SWT.SEPARATOR) != 0) return;
text = string;
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
if ((style & SWT.SEPARATOR) != 0) return;
if (image != null && image.isDisposed ()) {
error (SWT.ERROR_INVALID_ARGUMENT);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
if ((style & SWT.SEPARATOR) != 0) return;
text = string;
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
if ((style & SWT.SEPARATOR) != 0) return;
内容来源于网络,如有侵权,请联系作者删除!