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

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

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

ToolBar.getEnabled介绍

暂无

代码示例

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

static Image getImage( ToolItem item ) {
 Image result;
 if( item.getEnabled() && item.getParent().getEnabled() ) {
  result = item.getImage();
 } else {
  result = item.getDisabledImage();
  if( result == null ) {
   result = item.getImage();
  }
 }
 return result;
}

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

static Image getImage( final ToolItem toolItem ) {
 Image result;
 if( toolItem.getEnabled() && toolItem.getParent().getEnabled() ) {
  result = toolItem.getImage();
 } else {
  result = toolItem.getDisabledImage();
  if( result == null ) {
   result = toolItem.getImage();
  }
 }
 return result;
}

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

@Override
public void setImage (Image image) {
  checkWidget();
  if ((style & SWT.SEPARATOR) != 0) return;
  if (image != null && image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
  super.setImage (image);
  updateImages (getEnabled () && parent.getEnabled ());
}

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

/**
 * Sets the receiver's disabled image to the argument, which may be
 * null indicating that no disabled image should be displayed.
 * <p>
 * The disabled image is displayed when the receiver is disabled.
 * </p>
 *
 * @param image the disabled 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 setDisabledImage (Image image) {
  checkWidget();
  if ((style & SWT.SEPARATOR) != 0) return;
  if (image != null && image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
  disabledImage = image;
  updateImages (getEnabled () && parent.getEnabled ());
}

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

if (image != null) updateImages (enabled && parent.getEnabled ());

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

/**
 * Sets the receiver's hot image to the argument, which may be
 * null indicating that no hot image should be displayed.
 * <p>
 * The hot image is displayed when the mouse enters the receiver.
 * </p>
 *
 * @param image the hot 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 setHotImage (Image image) {
  checkWidget();
  if ((style & SWT.SEPARATOR) != 0) return;
  if (image != null && image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
  hotImage = image;
  updateImages (getEnabled () && parent.getEnabled ());
}

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

if (!getEnabled () || !parent.getEnabled ()) {
  updateImages (false);

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

button.setImagePosition(OS.NSImageOverlaps);
button.setTitle(NSString.string());
button.setEnabled(parent.getEnabled());
widget.addSubview(button);
view = widget;

相关文章

ToolBar类方法