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

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

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

ToolBar.layoutItems介绍

暂无

代码示例

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

void destroyItem( ToolItem item ) {
 itemHolder.remove( item );
 layoutItems();
}

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

void createItem( ToolItem item, int index ) {
 itemHolder.insert( item, index );
 layoutItems();
}

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

@Override
public void setFont( Font font ) {
 super.setFont( font );
 layoutItems();
}

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

/**
 * Sets the width of the receiver, for <code>SEPARATOR</code> ToolItems.
 *
 * @param width the new width
 *
 * @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 setWidth( int width ) {
 checkWidget();
 if( ( style & SWT.SEPARATOR ) != 0 && width >= 0 ) {
  computedWidth = false;
  this.width = width;
  parent.layoutItems();
 }
}

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

/**
 * 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>
 * @since 1.2
 */
public void setHotImage( Image image ) {
 checkWidget();
 if( ( style & SWT.SEPARATOR ) == 0 ) {
  hotImage = image;
  parent.layoutItems();
 }
}

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

/**
 * 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>
 *
 * @since 1.2
 */
public void setDisabledImage( Image image ) {
 checkWidget();
 if( ( style & SWT.SEPARATOR ) == 0 ) {
  disabledImage = image;
  parent.layoutItems();
 }
}

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

@Override
public void setImage( Image image ) {
 checkWidget();
 if( ( style & SWT.SEPARATOR ) == 0 ) {
  super.setImage( image );
  parent.layoutItems();
 }
}

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

void setWidthInPixels (int width) {
  if ((style & SWT.SEPARATOR) == 0) return;
  if (width < 0) return;
  int /*long*/ hwnd = parent.handle;
  TBBUTTONINFO info = new TBBUTTONINFO ();
  info.cbSize = TBBUTTONINFO.sizeof;
  info.dwMask = OS.TBIF_SIZE;
  info.cx = cx = (short) width;
  OS.SendMessage (hwnd, OS.TB_SETBUTTONINFO, id, info);
  parent.layoutItems ();
}

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

@Override
public void setBounds( Rectangle bounds ) {
 Point oldSize = getSize();
 super.setBounds( bounds );
 if( !oldSize.equals( getSize() ) ) {
  layoutItems();
 }
}

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

parent.layoutItems();

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

layoutItems ();

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

@Override
public void setFont (Font font) {
  checkWidget ();
  setDropDownItems (false);
  super.setFont (font);
  setDropDownItems (true);
  /*
  * Bug in Windows.  When WM_SETFONT is sent to a tool bar
  * that contains only separators, causes the bitmap and button
  * sizes to be set.  The fix is to reset these sizes after the font
  * has been changed when the tool bar contains only separators.
  */
  int index = 0;
  int mask = SWT.PUSH | SWT.CHECK | SWT.RADIO | SWT.DROP_DOWN;
  while (index < items.length) {
    ToolItem item = items [index];
    if (item != null && (item.style & mask) != 0) break;
    index++;
  }
  if (index == items.length) {
    OS.SendMessage (handle, OS.TB_SETBITMAPSIZE, 0, 0);
    OS.SendMessage (handle, OS.TB_SETBUTTONSIZE, 0, 0);
  }
  layoutItems ();
}

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

OS.SendMessage (hwnd, OS.WM_SETFONT, hFont, 0);
parent.setDropDownItems (true);
parent.layoutItems ();

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

layoutItems ();
return result;

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

layoutItems ();

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

int /*long*/ hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
OS.SendMessage (hwnd, OS.WM_SETFONT, hFont, 0);
parent.layoutItems ();

相关文章

ToolBar类方法