本文整理汇总了Java中org.eclipse.swt.widgets.Label.setSize方法的典型用法代码示例。如果您正苦于以下问题:Java Label.setSize方法的具体用法?Java Label.setSize怎么用?Java Label.setSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.widgets.Label
的用法示例。
在下文中一共展示了Label.setSize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createDialogArea
import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
/* Titre dialogue. */
this.getShell().setText("About KSP Plugin");
/* Layout */
Composite container = (Composite) super.createDialogArea(parent);
GridLayout layout = new GridLayout(1, false);
layout.marginRight = 5;
layout.marginLeft = 10;
Color white = Display.getCurrent().getSystemColor(SWT.COLOR_WHITE);
container.setBackground(white);
container.setLayout(layout);
/* Logo */
Label lblLogo = new Label(container, SWT.NONE);
lblLogo.setBackgroundImage(getImage());
lblLogo.setBackground(white);
lblLogo.setText(" ");
lblLogo.setSize(LOGO_SIZE, LOGO_SIZE);
/* Produit */
Label lblProduct = new Label(container, SWT.NONE);
lblProduct.setText("Vertigo Chroma KSP Plugin");
lblProduct.setBackground(white);
/* Version */
Version version = FrameworkUtil.getBundle(getClass()).getVersion();
String fullVersion = version.toString();
Label lblVersion = new Label(container, SWT.NONE);
lblVersion.setText("Version : " + fullVersion);
lblVersion.setBackground(white);
/* Version */
Label lblAuthor = new Label(container, SWT.NONE);
lblAuthor.setText("Author : @sebez");
lblAuthor.setBackground(white);
/* Libellé documentation */
Label lblDoc = new Label(container, SWT.NONE);
lblDoc.setText("Documentation, sources, releases are published in the KSP plugin github repository : ");
lblDoc.setBackground(white);
/* Lien vers le github */
Link link = new Link(container, SWT.NONE);
String message = "<a href=\"" + GITHUB_URL + "\">" + GITHUB_URL + "</a>";
link.setText(message);
link.setBackground(white);
link.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
Program.launch(GITHUB_URL);
}
});
return container;
}