当前位置: 首页>>代码示例>>Java>>正文


Java MessageLine类代码示例

本文整理汇总了Java中org.eclipse.ui.internal.MessageLine的典型用法代码示例。如果您正苦于以下问题:Java MessageLine类的具体用法?Java MessageLine怎么用?Java MessageLine使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MessageLine类属于org.eclipse.ui.internal包,在下文中一共展示了MessageLine类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createButtonBar

import org.eclipse.ui.internal.MessageLine; //导入依赖的package包/类
protected Control createButtonBar(Composite parent) {
      Font font = parent.getFont();
      Composite composite = new Composite(parent, SWT.NULL);
      GridLayout layout = new GridLayout();
      if (!fStatusLineAboveButtons) {
          layout.numColumns = 2;
      }
      layout.marginHeight = 0;
      layout.marginLeft = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
      layout.marginWidth = 0;
      composite.setLayout(layout);
      composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
      composite.setFont(font);

      if (!fStatusLineAboveButtons && isHelpAvailable()) {
      	createHelpControl(composite);
      }
      fStatusLine = new MessageLine(composite);
      fStatusLine.setAlignment(SWT.LEFT);
      GridData statusData = new GridData(GridData.FILL_HORIZONTAL);
      fStatusLine.setErrorStatus(null);
      fStatusLine.setFont(font);
      if (fStatusLineAboveButtons && isHelpAvailable()) {
      	statusData.horizontalSpan = 2;
      	createHelpControl(composite);
      }
      fStatusLine.setLayoutData(statusData);

/*
 * Create the rest of the button bar, but tell it not to
 * create a help button (we've already created it).
 */
boolean helpAvailable = isHelpAvailable();
setHelpAvailable(false);
super.createButtonBar(composite);
setHelpAvailable(helpAvailable);
      return composite;
  }
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:39,代码来源:SelectionStatusDialog.java

示例2: createButtonBar

import org.eclipse.ui.internal.MessageLine; //导入依赖的package包/类
protected Control createButtonBar(Composite parent)
{

  Composite composite = new Composite(parent, SWT.NONE);
  // create a layout with spacing and margins appropriate for the font
  // size.
  GridLayout layout = new GridLayout();
  layout.numColumns = 0; // this is incremented by createButton
  layout.makeColumnsEqualWidth = true;
  layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
  layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
  layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
  layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
  composite.setLayout(layout);
  GridData data = new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.VERTICAL_ALIGN_CENTER);
  composite.setLayoutData(data);
  composite.setFont(parent.getFont());
  // Add the buttons to the button bar.
  createButtonsForButtonBar(composite);

  Composite statusComposite = new Composite(composite, SWT.NONE);
  GridLayout statusLayout = new GridLayout();
  statusLayout.numColumns = 1;
  statusLayout.marginHeight = 0;
  statusLayout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
  statusComposite.setLayout(statusLayout);
  statusComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

  fStatusLine = new MessageLine(statusComposite);
  fStatusLine.setAlignment(SWT.LEFT);
  fStatusLine.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  fStatusLine.setErrorStatus(null); 
  applyDialogFont(statusComposite);
  return composite;
}
 
开发者ID:matthias-wolff,项目名称:dLabPro-Plugin,代码行数:36,代码来源:StatusDialog.java


注:本文中的org.eclipse.ui.internal.MessageLine类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。