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

x33g5p2x  于2022-01-29 转载在 其他  
字(10.8k)|赞(0)|评价(0)|浏览(102)

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

Shell.error介绍

暂无

代码示例

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

@Override
public boolean print (GC gc) {
  checkWidget ();
  if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
  if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
  return false;
}

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

public boolean print (GC gc) {
  checkWidget ();
  if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
  if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
  return false;
}

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

@Override
public boolean print (GC gc) {
  checkWidget ();
  if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
  if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
  return false;
}

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

@Override
public boolean print (GC gc) {
  checkWidget ();
  if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
  if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
  return false;
}

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

@Override
public boolean print (GC gc) {
  checkWidget ();
  if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
  if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
  return false;
}

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

void setMinimumSizeInPixels (Point size) {
  checkWidget ();
  if (size == null) error (SWT.ERROR_NULL_ARGUMENT);
  setMinimumSizeInPixels (size.x, size.y);
}

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

void setMinimumSizeInPixels (Point size) {
  checkWidget ();
  if (size == null) error (SWT.ERROR_NULL_ARGUMENT);
  setMinimumSizeInPixels (size.x, size.y);
}

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

void setMinimumSizeInPixels (Point size) {
  checkWidget ();
  if (size == null) error (SWT.ERROR_NULL_ARGUMENT);
  setMinimumSizeInPixels (size.x, size.y);
}

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

/**
 * Sets the receiver's minimum size to the size specified by the argument.
 * If the new minimum size is larger than the current size of the receiver,
 * the receiver is resized to the new minimum size.
 *
 * @param size the new minimum size for the receiver
 *
 * @exception IllegalArgumentException <ul>
 *    <li>ERROR_NULL_ARGUMENT - if the point 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>
 * 
 * @since 3.1
 */
public void setMinimumSize (Point size) {
  checkWidget();
  if (size == null) error (SWT.ERROR_NULL_ARGUMENT);
  setMinimumSize (size.x, size.y);
}

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

/**
 * Sets the receiver's minimum size to the size specified by the argument.
 * If the new minimum size is larger than the current size of the receiver,
 * the receiver is resized to the new minimum size.
 *
 * @param size the new minimum size for the receiver
 *
 * @exception IllegalArgumentException <ul>
 *    <li>ERROR_NULL_ARGUMENT - if the point 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>
 *
 * @since 1.3
 */
public void setMinimumSize( Point size ) {
 checkWidget();
 if( size == null ) {
  error( SWT.ERROR_NULL_ARGUMENT );
 }
 setMinimumSize( size.x, size.y );
}

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

public void setText (String string) {
  checkWidget();
  if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
  if (window == null) return;
  super.setText (string);
  NSString str = NSString.stringWith(string);
  window.setTitle(str);
}

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

Shell (Display display, Shell parent, int style, int /*long*/ handle, boolean embedded) {
  super ();
  checkSubclass ();
  if (display == null) display = Display.getCurrent ();
  if (display == null) display = Display.getDefault ();
  if (!display.isValidThread ()) {
    error (SWT.ERROR_THREAD_INVALID_ACCESS);
  }
  if (parent != null && parent.isDisposed ()) {
    error (SWT.ERROR_INVALID_ARGUMENT);
  }
  this.center = parent != null && (style & SWT.SHEET) != 0;
  this.style = checkStyle (parent, style);
  this.parent = parent;
  this.display = display;
  this.handle = handle;
  if (handle != 0 && !embedded) {
    state |= FOREIGN_HANDLE;
  }
  reskinWidget();
  createWidget ();
}

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

/**
 * Sets the receiver's minimum size to the size specified by the argument.
 * If the new minimum size is larger than the current size of the receiver,
 * the receiver is resized to the new minimum size.
 *
 * @param size the new minimum size for the receiver
 *
 * @exception IllegalArgumentException <ul>
 *    <li>ERROR_NULL_ARGUMENT - if the point 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>
 *
 * @since 3.1
 */
public void setMinimumSize (Point size) {
  checkWidget ();
  if (size == null) error (SWT.ERROR_NULL_ARGUMENT);
  size = DPIUtil.autoScaleUp(size);
  setMinimumSizeInPixels(size.x, size.y);
}

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

Shell (Display display, Shell parent, int style, int /*long*/ handle, boolean embedded) {
  super ();
  checkSubclass ();
  if (display == null) display = Display.getCurrent ();
  if (display == null) display = Display.getDefault ();
  if (!display.isValidThread ()) {
    error (SWT.ERROR_THREAD_INVALID_ACCESS);
  }
  if (parent != null && parent.isDisposed ()) {
    error (SWT.ERROR_INVALID_ARGUMENT);
  }
  this.center = parent != null && (style & SWT.SHEET) != 0;
  this.style = checkStyle (parent, style);
  this.parent = parent;
  this.display = display;
  if (handle != 0) {
    if (embedded) {
      this.handle = handle;
    } else {
      shellHandle = handle;
      state |= FOREIGN_HANDLE;
    }
  }
  reskinWidget();
  createWidget (0);
}

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

Shell (Display display, Shell parent, int style, long /*int*/ handle, boolean embedded) {
  super ();
  checkSubclass ();
  if (display == null) display = Display.getCurrent ();
  if (display == null) display = Display.getDefault ();
  if (!display.isValidThread ()) {
    error (SWT.ERROR_THREAD_INVALID_ACCESS);
  }
  if (parent != null && parent.isDisposed ()) {
    error (SWT.ERROR_INVALID_ARGUMENT);
  }
  this.center = parent != null && (style & SWT.SHEET) != 0;
  this.style = checkStyle (parent, style);
  this.parent = parent;
  this.display = display;
  if (handle != 0) {
    if (embedded) {
      this.handle = handle;
    } else {
      shellHandle = handle;
      state |= FOREIGN_HANDLE;
    }
  }
  reskinWidget();
  createWidget (0);
}

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

/**
 * Removes the listener from the collection of listeners who will
 * be notified when operations are performed on the receiver.
 *
 * @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 ShellListener
 * @see #addShellListener
 */
public void removeShellListener( ShellListener listener ) {
 checkWidget();
 if( listener == null ) {
  error( SWT.ERROR_NULL_ARGUMENT );
 }
 removeListener( SWT.Close, listener );
 removeListener( SWT.Activate, listener );
 removeListener( SWT.Deactivate, 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 operations are performed on the receiver.
 *
 * @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 ShellListener
 * @see #addShellListener
 */
public void removeShellListener (ShellListener listener) {
  checkWidget ();
  if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
  if (eventTable == null) return;
  eventTable.unhook (SWT.Close, listener);
  eventTable.unhook (SWT.Iconify,listener);
  eventTable.unhook (SWT.Deiconify,listener);
  eventTable.unhook (SWT.Activate, listener);
  eventTable.unhook (SWT.Deactivate, listener);
}

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

/**
 * Removes the listener from the collection of listeners who will
 * be notified when operations are performed on the receiver.
 *
 * @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 ShellListener
 * @see #addShellListener
 */
public void removeShellListener(ShellListener listener) {
  checkWidget();
  if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
  if (eventTable == null) return;
  eventTable.unhook(SWT.Activate, listener);
  eventTable.unhook(SWT.Close, listener);
  eventTable.unhook(SWT.Deactivate, listener);
  eventTable.unhook(SWT.Iconify,listener);
  eventTable.unhook(SWT.Deiconify,listener);
}

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

void createBalloonTipHandle () {
  balloonTipHandle = OS.CreateWindowEx (
    0,
    new TCHAR (0, OS.TOOLTIPS_CLASS, true),
    null,
    OS.TTS_ALWAYSTIP | OS.TTS_NOPREFIX | OS.TTS_BALLOON,
    OS.CW_USEDEFAULT, 0, OS.CW_USEDEFAULT, 0,
    handle,
    0,
    OS.GetModuleHandle (null),
    null);
  if (balloonTipHandle == 0) error (SWT.ERROR_NO_HANDLES);
  if (ToolTipProc == 0) {
    ToolTipProc = OS.GetWindowLongPtr (balloonTipHandle, OS.GWLP_WNDPROC);
  }
  /*
  * Feature in Windows.  Despite the fact that the
  * tool tip text contains \r\n, the tooltip will
  * not honour the new line unless TTM_SETMAXTIPWIDTH
  * is set.  The fix is to set TTM_SETMAXTIPWIDTH to
  * a large value.
  */
  OS.SendMessage (balloonTipHandle, OS.TTM_SETMAXTIPWIDTH, 0, 0x7FFF);
  display.addControl (balloonTipHandle, this);
  OS.SetWindowLongPtr (balloonTipHandle, OS.GWLP_WNDPROC, display.windowProc);
}

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

int /*long*/ createToolTipHandle (int /*long*/ parent) {
  int /*long*/ toolTipHandle = OS.CreateWindowEx (
    0,
    new TCHAR (0, OS.TOOLTIPS_CLASS, true),
    null,
    OS.TTS_ALWAYSTIP | OS.TTS_NOPREFIX,
    OS.CW_USEDEFAULT, 0, OS.CW_USEDEFAULT, 0,
    parent,
    0,
    OS.GetModuleHandle (null),
    null);
  if (toolTipHandle == 0) error (SWT.ERROR_NO_HANDLES);
  if (ToolTipProc == 0) {
    ToolTipProc = OS.GetWindowLongPtr (toolTipHandle, OS.GWLP_WNDPROC);
  }
  /*
  * Feature in Windows.  Despite the fact that the
  * tool tip text contains \r\n, the tooltip will
  * not honour the new line unless TTM_SETMAXTIPWIDTH
  * is set.  The fix is to set TTM_SETMAXTIPWIDTH to
  * a large value.
  */
  OS.SendMessage (toolTipHandle, OS.TTM_SETMAXTIPWIDTH, 0, 0x7FFF);
  display.addControl (toolTipHandle, this);
  OS.SetWindowLongPtr (toolTipHandle, OS.GWLP_WNDPROC, display.windowProc);
  return toolTipHandle;
}

相关文章

微信公众号

最新文章

更多

Shell类方法