本文整理汇总了Java中org.eclipse.jface.action.StatusLineLayoutData类的典型用法代码示例。如果您正苦于以下问题:Java StatusLineLayoutData类的具体用法?Java StatusLineLayoutData怎么用?Java StatusLineLayoutData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StatusLineLayoutData类属于org.eclipse.jface.action包,在下文中一共展示了StatusLineLayoutData类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: fill
import org.eclipse.jface.action.StatusLineLayoutData; //导入依赖的package包/类
public void fill(Composite parent) {
super.fill(parent);
Composite container = new Composite(parent, SWT.NONE);
GridLayout gl = new GridLayout(2, false);
gl.marginWidth = 5;
gl.marginHeight = 3;
container.setLayout(gl);
progressBar = new ProgressBar(container, SWT.SMOOTH);
GridData gdPprogressBar = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);
gdPprogressBar.heightHint = 16;
gdPprogressBar.widthHint = 130;
progressBar.setLayoutData(gdPprogressBar);
progressBar.setMinimum(0); // 最小值
progressBar.setMaximum(100);// 最大值
progressBar.setSelection(progressValue);
progressBar.setToolTipText(defaultMessage);
label = new Label(container, SWT.None);
label.setText(progressValue + "%");
StatusLineLayoutData data = new StatusLineLayoutData();
container.setLayoutData(data);
}
开发者ID:heartsome,项目名称:tmxeditor8,代码行数:25,代码来源:XLIFFEditorStatusLineItemWithProgressBar.java
示例2: createControl
import org.eclipse.jface.action.StatusLineLayoutData; //导入依赖的package包/类
@Override
protected Control createControl(final Composite parent) {
createListeners();
mapPane.addMapPaneListener(mapPaneListener);
mapPane.getMapContent().addMapBoundsListener(this);
final Composite mainComposite = new Composite(parent, SWT.NONE);
final GridLayout gridLayout = new GridLayout(1, false);
mainComposite.setLayout(gridLayout);
final StatusLineLayoutData statusLineLayoutData = new StatusLineLayoutData();
// statusLineLayoutData.widthHint = 500;
mainComposite.setLayoutData(statusLineLayoutData);
crsButton = new Button(mainComposite, SWT.PUSH);
final GridData crsButtonGD = new GridData(SWT.BEGINNING, SWT.CENTER, false, false);
crsButtonGD.widthHint = 300;
crsButton.setLayoutData(crsButtonGD);
final CoordinateReferenceSystem crs = getCrs();
displayCRS(crs);
crsButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(final SelectionEvent e) {
final CRSChooserDialog dialog = new CRSChooserDialog(crsButton.getShell(), getCrs());
dialog.setBlockOnOpen(true);
dialog.open();
final CoordinateReferenceSystem newCrs = dialog.getResult();
mapPane.setCrs(newCrs);
mapPane.redraw();
displayCRS(newCrs);
}
});
return mainComposite;
}
开发者ID:gama-platform,项目名称:gama,代码行数:36,代码来源:CrsStatusBarButton.java
示例3: fill
import org.eclipse.jface.action.StatusLineLayoutData; //导入依赖的package包/类
public void fill(Composite parent) {
super.fill(parent);
Composite container = new Composite(parent, SWT.NONE);
GridLayout gl = new GridLayout(1, false);
gl.marginWidth = 0;
gl.marginHeight = 0;
gl.marginTop = 0;
gl.marginRight = 0;
gl.marginBottom = 0;
container.setLayout(gl);
// progressBar = new ProgressBar(container, SWT.SMOOTH);
// GridData gdPprogressBar = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);
// gdPprogressBar.heightHint = 16;
// gdPprogressBar.widthHint = 130;
// progressBar.setLayoutData(gdPprogressBar);
// progressBar.setMinimum(0); // 最小值
// progressBar.setMaximum(100);// 最大值
// progressBar.setSelection(progressValue);
// progressBar.setToolTipText(defaultMessage);
GC gc = new GC(statusLine);
int widthHint = gc.textExtent("100%").x;
// int height = gc.textExtent("100%").y;
gc.dispose();
label = new Label(container, SWT.NONE);
GridData gd = new GridData(SWT.LEFT, SWT.CENTER, false, true, 1, 1);
gd.widthHint = widthHint;
label.setLayoutData(gd);
label.setText(progressValue + "%");
StatusLineLayoutData data = new StatusLineLayoutData();
container.setLayoutData(data);
}
开发者ID:heartsome,项目名称:translationstudio8,代码行数:37,代码来源:XLIFFEditorStatusLineItemWithProgressBar.java
示例4: fill
import org.eclipse.jface.action.StatusLineLayoutData; //导入依赖的package包/类
@Override
public void fill(Composite parent) {
/*
//
Label separator = new Label(parent, SWT.SEPARATOR);
CLabel label = new CLabel(parent, SWT.NONE);
GridLayout layout = new GridLayout(1, Boolean.FALSE);
layout.horizontalSpacing = 20;
parent.setLayout(layout);
// StatusLineLayoutData statusLineLayoutData = new StatusLineLayoutData();
// label.setLayoutData(statusLineLayoutData);
label.setLayout(new GridLayout(1, Boolean.FALSE));
label.setData(new GridData(30, 30));
label.setText(text);
label.setImage(image);
// Composite composite = toolkit.createComposite(parent);
// parent.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_BLUE));
*/
StatusLineLayoutData statusLineLayoutData = new StatusLineLayoutData();
parent.setLayoutData(statusLineLayoutData);
new Label(parent, SWT.SEPARATOR);
CLabel title = new CLabel(parent, SWT.NONE);
title.setText("2013 Alm-iStack Collaborative Tool Software");
title.setImage(ImageProvider.IMG_COPYRIGHT);
new Label(parent, SWT.SEPARATOR);
CLabel about = new CLabel(parent, SWT.NONE);
about.setText("About");
new Label(parent, SWT.SEPARATOR);
CLabel recycleBin = new CLabel(parent, SWT.NONE);
recycleBin.setText("Recycle Bin");
recycleBin.setImage(ImageProvider.IMG_BIN_EMTY);
}
开发者ID:jaloncad,项目名称:redmine.rap,代码行数:48,代码来源:FooterContribution.java
注:本文中的org.eclipse.jface.action.StatusLineLayoutData类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论