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

x33g5p2x  于2022-01-16 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(139)

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

Button.setSize介绍

暂无

代码示例

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

private static void createButton(Composite parent, Color bgColor,
    boolean checked, boolean enabled) {
  Button button = new Button(parent, SWT.CHECK);
  button.setSelection(checked);
  button.setEnabled(enabled);
  button.setBackground(bgColor);
  Point bSize = button.computeSize(SWT.DEFAULT, SWT.DEFAULT);
  button.setSize(bSize);
}

代码示例来源:origin: io.takari.m2e.discovery.publisher/org.eclipse.m2e.discovery

@Override
 protected Control createContents(Composite parent) {
  Composite composite = new Composite(parent, SWT.NULL);
  composite.setLayout(new GridLayout(2, false));

  Label lblCatalogUrl = new Label(composite, SWT.NONE);
  lblCatalogUrl.setText(Messages.DiscoveryPreferencePage_catalogUrl);

  Text catalogUrl = new Text(composite, SWT.BORDER);
  catalogUrl.setEditable(false);
  catalogUrl.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
  catalogUrl.setText(MavenDiscovery.PATH);

  Button btnOpenCatalog = new Button(composite, SWT.NONE);
  btnOpenCatalog.addSelectionListener(new SelectionAdapter() {
   @Override
   public void widgetSelected(SelectionEvent e) {
    MavenDiscovery.launchWizard(workbench.getModalDialogShellProvider().getShell());
   }
  });
  btnOpenCatalog.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
  btnOpenCatalog.setSize(92, 29);
  btnOpenCatalog.setText(Messages.DiscoveryPreferencePage_openCatalog);
  new Label(composite, SWT.NONE);
  return composite;
 }
}

代码示例来源:origin: com.github.rinde/rinsim-example

runButton.setSize(RUN_BUTTON_W, RUN_BUTTON_H);
runButton.setText(START_DEMO_TEXT);

代码示例来源:origin: rinde/RinSim

runButton.setSize(RUN_BUTTON_W, RUN_BUTTON_H);
runButton.setText(START_DEMO_TEXT);

代码示例来源:origin: BiglySoftware/BiglyBT

swtButtons[i].setSize(size);
formData = (FormData) swtButtons[i].getLayoutData();
formData.width = buttonWidth;

代码示例来源:origin: net.officefloor.eclipse/net.officefloor.ui

button.setSize(buttonSize);
shell.setSize(buttonSize);

代码示例来源:origin: org.apache.uima/uimaj-ep-configurator

"Click here to search for an Analysis Engine", ENABLED);
addButton.setSize(removeButton.getSize());

相关文章

Button类方法