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

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

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

ToolBar.setBounds介绍

暂无

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

public void update() {
 Rectangle rect = toolBar.getBounds();
 if ( connectDropdown != null && !connectDropdown.isDisposed() ) {
  if ( spoon.rep != null ) {
   StringBuilder connectionLabel = new StringBuilder();
   if ( spoon.rep.getUserInfo() != null ) {
    connectionLabel.append( spoon.rep.getUserInfo().getLogin() );
    connectionLabel.append( "  |  " );
   }
   StringBuilder connectionLabelTip = new StringBuilder( connectionLabel.toString() );
   if ( repoConnectController != null && repoConnectController.getConnectedRepository() != null ) {
    connectionLabel.append( truncateName( spoon.getRepositoryName() ) );
    connectionLabelTip.append( spoon.getRepositoryName() );
   }
   connectDropdown.setText( connectionLabel.toString() );
   connectDropdown.setToolTipText( connectionLabelTip.toString() );
  } else {
   connectDropdown.setText( BaseMessages.getString( PKG, "RepositoryConnectMenu.Connect" ) );
  }
 }
 // This fixes some SWT goofiness
 toolBar.pack();
 toolBar.setBounds( rect );
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.intro

@Override
  protected void layout(Composite composite, boolean changed) {
    boolean vertical = (getOrientation() & SWT.VERTICAL) != 0;
    int marginWidth = vertical | isPlain() ? 1 : simple ? 4 : 7;
    int marginHeight = !vertical | isPlain() ? 1 : simple ? 4 : 7;
    Point tsize = toolBarManager.getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT, changed);
    Rectangle carea = composite.getClientArea();
    int x = carea.x + (getLocation() == SideValue.LEFT ? 0 : marginWidth);
    int y = carea.y + marginHeight;
    if (vertical) {
      toolBarManager.getControl().setBounds(x, y, carea.width - marginWidth, tsize.y);
    } else {
      toolBarManager.getControl().setBounds(x, y, tsize.x, carea.height - marginHeight);
    }
  }
}

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

chevron.setBounds (parent.fixRectangle (
  itemBounds.x + width - CHEVRON_LEFT_MARGIN - CHEVRON_IMAGE_WIDTH - CHEVRON_HORIZONTAL_TRIM,
  itemBounds.y,

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

chevron.setBounds (parent.fixRectangle (
  itemBounds.x + width - CHEVRON_LEFT_MARGIN - CHEVRON_IMAGE_WIDTH - CHEVRON_HORIZONTAL_TRIM,
  itemBounds.y,

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

chevron.setBounds (parent.fixRectangle (
  itemBounds.x + width - CHEVRON_LEFT_MARGIN - CHEVRON_IMAGE_WIDTH - CHEVRON_HORIZONTAL_TRIM,
  itemBounds.y,

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

chevron.setBounds (parent.fixRectangle (
  itemBounds.x + width - CHEVRON_LEFT_MARGIN - CHEVRON_IMAGE_WIDTH - CHEVRON_HORIZONTAL_TRIM,
  itemBounds.y,

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

chevron.setBounds( parent.fixRectangle( itemBounds.x + width
  - CHEVRON_LEFT_MARGIN - CHEVRON_IMAGE_WIDTH
  - CHEVRON_HORIZONTAL_TRIM, itemBounds.y, CHEVRON_IMAGE_WIDTH

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.forms

if (tbsize != null && getToolBarAlignment() == SWT.TOP) {
  ToolBar tbar = toolBarManager.getControl();
  tbar.setBounds(x + width - 1 - tbsize.x - HMARGIN, yloc
      + row1Height - 1 - tbsize.y, tbsize.x, tbsize.y);
  tbar.setBounds(x + width - 1 - tbsize.x - HMARGIN, yloc,
      tbsize.x, tbsize.y);
  tw = tbsize.x + SPACING;

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.forms

if (tbsize != null && getToolBarAlignment() == SWT.TOP) {
  ToolBar tbar = toolBarManager.getControl();
  tbar.setBounds(x + width - 1 - tbsize.x - HMARGIN, yloc
      + row1Height - 1 - tbsize.y, tbsize.x, tbsize.y);
  tbar.setBounds(x + width - 1 - tbsize.x - HMARGIN, yloc,
      tbsize.x, tbsize.y);
  tw = tbsize.x + SPACING;

相关文章

ToolBar类方法