本文整理汇总了Java中org.eclipse.swt.custom.ScrolledComposite.setMinSize方法的典型用法代码示例。如果您正苦于以下问题:Java ScrolledComposite.setMinSize方法的具体用法?Java ScrolledComposite.setMinSize怎么用?Java ScrolledComposite.setMinSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.custom.ScrolledComposite
的用法示例。
在下文中一共展示了ScrolledComposite.setMinSize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createFeatureListTab
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void createFeatureListTab(TabFolder tabFolder, ActiveTab type) {
TabItem tabItem = new TabItem(tabFolder, SWT.NULL);
if (type == ActiveTab.ALL_FEATURES) {
tabItem.setText(ALL_FEATURES_TAB_TITLE);
} else {
tabItem.setText(UPDATES_TAB_TITLE);
}
ScrolledComposite scroll = new ScrolledComposite(tabFolder, SWT.V_SCROLL | SWT.H_SCROLL);
scroll.setLayout(new GridLayout());
scroll.setLayoutData(new GridData());
Group group = new Group(scroll, SWT.NONE);
group.setLayout(new GridLayout());
group.setLayoutData(new GridData());
listFeatures(group, type);
scroll.setContent(group);
scroll.setExpandHorizontal(true);
scroll.setExpandVertical(true);
scroll.setMinSize(group.computeSize(SWT.DEFAULT, SWT.DEFAULT));
tabItem.setControl(scroll);
}
示例2: DiskInfoTab
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
/**
* Create the DISK INFO tab.
*/
public DiskInfoTab(CTabFolder tabFolder, FormattedDisk[] disks) {
this.formattedDisks = disks;
CTabItem ctabitem = new CTabItem(tabFolder, SWT.NULL);
ctabitem.setText(textBundle.get("DiskInfoTab.Title")); //$NON-NLS-1$
tabFolder.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
getInfoTable().removeAll();
buildDiskInfoTable(getFormattedDisk(0)); // FIXME!
}
});
ScrolledComposite scrolledComposite = new ScrolledComposite(
tabFolder, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
scrolledComposite.setExpandHorizontal(true);
scrolledComposite.setExpandVertical(true);
ctabitem.setControl(scrolledComposite);
composite = new Composite(scrolledComposite, SWT.NONE);
createDiskInfoTable();
if (disks.length > 1) {
RowLayout layout = new RowLayout(SWT.VERTICAL);
layout.wrap = false;
composite.setLayout(layout);
for (int i=0; i<disks.length; i++) {
Label label = new Label(composite, SWT.NULL);
label.setText(disks[i].getDiskName());
buildDiskInfoTable(disks[i]);
}
} else {
composite.setLayout(new FillLayout());
buildDiskInfoTable(disks[0]);
}
composite.pack();
scrolledComposite.setContent(composite);
scrolledComposite.setMinSize(
composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
示例3: setViewRequiresOneDownload
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
public static void setViewRequiresOneDownload(Composite genComposite) {
if (genComposite == null || genComposite.isDisposed()) {
return;
}
Utils.disposeComposite(genComposite, false);
Label lab = new Label(genComposite, SWT.NULL);
GridData gridData = new GridData(SWT.CENTER, SWT.CENTER, true, true);
gridData.verticalIndent = 10;
lab.setLayoutData(gridData);
Messages.setLanguageText(lab, "view.one.download.only");
genComposite.layout(true);
Composite parent = genComposite.getParent();
if (parent instanceof ScrolledComposite) {
ScrolledComposite scrolled_comp = (ScrolledComposite) parent;
Rectangle r = scrolled_comp.getClientArea();
scrolled_comp.setMinSize(genComposite.computeSize(r.width, SWT.DEFAULT ));
}
}
示例4: getLayoutChangedHandler
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private Runnable getLayoutChangedHandler() {
return new Runnable() {
@Override
public void run() {
// resize the page to work around https://bugs.eclipse.org/bugs/show_bug.cgi?id=265237
Composite parent = getActivePanel().getParent();
while (parent != null) {
if (parent instanceof ScrolledComposite) {
ScrolledComposite scrolledComposite = (ScrolledComposite) parent;
scrolledComposite.setMinSize(getActivePanel().getParent().computeSize(SWT.DEFAULT, SWT.DEFAULT));
getActivePanel().layout();
return;
}
parent = parent.getParent();
}
}
};
}
示例5: FXCanvasScrollApp
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
protected FXCanvasScrollApp() {
shell = new Shell();
shell.setText(this.getClass().getSimpleName());
shell.setLayout(new FillLayout());
ScrolledComposite scrollPane = new ScrolledComposite(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
FXCanvas fxCanvas = new FXCanvas(scrollPane, SWT.BORDER);
fxCanvas.setScene(createScene(SCROLL_CONTAINER_ID));
scrollPane.setContent(fxCanvas);
scrollPane.setExpandHorizontal(true);
scrollPane.setExpandVertical(true);
fxCanvas.pack();
scrollPane.setMinSize(fxCanvas.getSize());
shell.pack();
Monitor monitor = shell.getMonitor();
Rectangle monitorRect = monitor.getClientArea();
Rectangle shellRect = shell.getBounds();
shellRect.x = Math.max(0, (monitorRect.width - shellRect.width) / 2);
shellRect.y = Math.max(0, (monitorRect.height - shellRect.height) / 2);
shell.setBounds(shellRect);
shell.open();
}
示例6: setSize
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void setSize(Composite composite) {
if (composite != null) {
// Note: The font is set here in anticipation that the class
// inheriting
// this base class may add widgets to the dialog. setSize
// is assumed to be called just before we go live.
applyDialogFont(composite);
Point minSize = composite.computeSize(SWT.DEFAULT, SWT.DEFAULT);
composite.setSize(minSize);
// set scrollbar composite's min size so page is expandable but
// has scrollbars when needed
if (composite.getParent() instanceof ScrolledComposite) {
ScrolledComposite sc1 = (ScrolledComposite) composite.getParent();
sc1.setMinSize(minSize);
sc1.setExpandHorizontal(true);
sc1.setExpandVertical(true);
}
}
}
示例7: setSize
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void setSize(Composite composite) {
if (composite != null) {
// Note: The font is set here in anticipation that the class inheriting
// this base class may add widgets to the dialog. setSize
// is assumed to be called just before we go live.
applyDialogFont(composite);
Point minSize = composite.computeSize(SWT.DEFAULT, SWT.DEFAULT);
composite.setSize(minSize);
// set scrollbar composite's min size so page is expandable but
// has scrollbars when needed
if (composite.getParent() instanceof ScrolledComposite) {
ScrolledComposite sc1 = (ScrolledComposite) composite.getParent();
sc1.setMinSize(minSize);
sc1.setExpandHorizontal(true);
sc1.setExpandVertical(true);
}
}
}
示例8: createPartControl
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@Override
public void createPartControl(final Composite parent) {
try {
final Composite outer = toolkit.createComposite(parent, SWT.NONE);
final GridLayout layout = new GridLayout(1, false);
layout.marginHeight = layout.marginWidth = 0;
outer.setLayout(layout);
final GridData layoutData = new GridData(GridData.FILL_BOTH);
outer.setLayoutData(layoutData);
createValidationComposite(outer);
final ScrolledComposite content = new ScrolledComposite(outer, SWT.H_SCROLL | SWT.V_SCROLL);
content.setExpandHorizontal(true);
content.setExpandVertical(true);
content.setLayout(layout);
content.setLayoutData(layoutData);
final Composite children = initUi(content);
content.setMinSize(children.computeSize(SWT.DEFAULT, SWT.DEFAULT));
content.setContent(children);
createBinding();
additionalTasks();
} catch (final ConnectException e) {
handle(e);
}
}
示例9: createByUser
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void createByUser(CTabFolder tabFolder) {
CTabItem bptab = new CTabItem(tabFolder, SWT.NONE);
bptab.setText(Messages.PermissionPage_5);
scUser = new ScrolledComposite(tabFolder, SWT.H_SCROLL | SWT.V_SCROLL);
scUser.setLayoutData(new GridData(GridData.FILL_BOTH));
cmpUser = new Composite(scUser, SWT.NONE);
cmpUser.setLayout(new GridLayout(2, true));
scUser.setContent(cmpUser);
// Set the minimum size
scUser.setMinSize(cmpUser.computeSize(SWT.DEFAULT, SWT.DEFAULT).x, cmpUser.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
// Expand both horizontally and vertically
scUser.setExpandHorizontal(true);
scUser.setExpandVertical(true);
bptab.setControl(scUser);
}
示例10: createByRole
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void createByRole(CTabFolder tabFolder) {
CTabItem bptab = new CTabItem(tabFolder, SWT.NONE);
bptab.setText(Messages.PermissionPage_6);
scRole = new ScrolledComposite(tabFolder, SWT.H_SCROLL | SWT.V_SCROLL);
scRole.setLayoutData(new GridData(GridData.FILL_BOTH));
cmpRole = new Composite(scRole, SWT.NONE);
cmpRole.setLayout(new GridLayout(2, true));
scRole.setContent(cmpRole);
// Set the minimum size
scRole.setMinSize(cmpRole.computeSize(SWT.DEFAULT, SWT.DEFAULT).x, cmpRole.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
// Expand both horizontally and vertically
scRole.setExpandHorizontal(true);
scRole.setExpandVertical(true);
bptab.setControl(scRole);
}
示例11: createControl
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@Override
public void createControl(Composite parent) {
//Calculate which parameters are needed and where they are needed
String datasetName = (String)connectedDataset.getPropertyActualValue(JRDesignDataset.PROPERTY_NAME);
runReferences = DeleteDatasetCommand.getDatasetUsage(connectedDataset.getRoot().getChildren(), datasetName);
missingParamOnMain = getMissingParameterOnMainDataset();
missingParamOnDataset = getMissingParameterOnDataset();
missingParamOnRun = getMissingDatasetsRun();
//Create the appropriate controls for this parameters
ScrolledComposite scrollComposite = new ScrolledComposite(parent, SWT.V_SCROLL);
scrollComposite.setExpandVertical(true);
Composite mainComposite = new Composite(scrollComposite, SWT.NONE);
scrollComposite.setContent(mainComposite);
mainComposite.setLayout(new GridLayout(1,false));
if (missingParamOnMain.isEmpty() && missingParamOnRun.isEmpty() && missingParamOnRun.isEmpty()){
new Label(mainComposite, SWT.NONE).setText(Messages.ConnectToDomainWizardPage_noChangesLabel);
} else createNotEmptyContent(mainComposite);
mainComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
scrollComposite.setMinSize(mainComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
mainComposite.setSize(mainComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
UIUtils.resizeAndCenterShell(parent.getShell(), 650, 550);
setControl(mainComposite);
}
示例12: createJExcelAPI
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void createJExcelAPI(CTabFolder tabFolder) {
CTabItem ptab = new CTabItem(tabFolder, SWT.NONE);
ptab.setText(Messages.ExcelExporterPreferencePage_60);
ScrolledComposite scompo = new ScrolledComposite(tabFolder, SWT.V_SCROLL | SWT.H_SCROLL);
scompo.setExpandHorizontal(true);
scompo.setExpandVertical(true);
Composite sc = new Composite(scompo, SWT.NONE);
sc.setLayout(new GridLayout(3, false));
BooleanFieldEditor bf = new BooleanFieldEditor(XlsExporterConfiguration.PROPERTY_CREATE_CUSTOM_PALETTE,
Messages.ExcelExporterPreferencePage_61, sc);
addField(bf);
HelpSystem.setHelp(bf.getDescriptionControl(sc), StudioPreferencePage.REFERENCE_PREFIX + bf.getPreferenceName());
addField(new BooleanFieldEditor(JxlExporterConfiguration.PROPERTY_USE_TEMP_FILE,
Messages.ExcelExporterPreferencePage_62, sc));
addField(new BooleanFieldEditor(JxlReportConfiguration.PROPERTY_COMPLEX_FORMAT,
Messages.ExcelExporterPreferencePage_63, sc));
scompo.setMinSize(sc.getSize());
scompo.setContent(sc);
ptab.setControl(scompo);
}
示例13: createJExcelAPI
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void createJExcelAPI(CTabFolder tabFolder) {
CTabItem ptab = new CTabItem(tabFolder, SWT.NONE);
ptab.setText(Messages.ExcelExporterPreferencePage_60);
ScrolledComposite scompo = new ScrolledComposite(tabFolder, SWT.V_SCROLL | SWT.H_SCROLL);
scompo.setExpandHorizontal(true);
scompo.setExpandVertical(true);
Composite sc = new Composite(scompo, SWT.NONE);
sc.setLayout(new GridLayout(3, false));
BooleanFieldEditor bf = new BooleanFieldEditor(XlsExporterConfiguration.PROPERTY_CREATE_CUSTOM_PALETTE,
Messages.ExcelExporterPreferencePage_61, sc);
addField(bf);
HelpSystem.setHelp(bf.getDescriptionControl(sc), StudioPreferencePage.REFERENCE_PREFIX + bf.getPreferenceName());
addField(new BooleanFieldEditor(NSF_EXPORT_XLS_USE_TMP_FILE, Messages.ExcelExporterPreferencePage_62, sc));
addField(new BooleanFieldEditor(NSF_EXPORT_XLS_CELL_COMPLEX_FORMAT, Messages.ExcelExporterPreferencePage_63, sc));
scompo.setMinSize(sc.getSize());
scompo.setContent(sc);
ptab.setControl(scompo);
}
示例14: createControl
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@Override
protected Control createControl(Composite parent) {
scompo = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL);
scompo.setExpandHorizontal(true);
scompo.setExpandVertical(true);
scompo.setAlwaysShowScrollBars(false);
scompo.setMinSize(100, 100);
composite = new Composite(scompo, SWT.BORDER);
composite.setBackgroundMode(SWT.INHERIT_FORCE);
composite.setBackground(parent.getBackground());
GridLayout layout = new GridLayout();
layout.marginBottom = 20;
composite.setLayout(layout);
scompo.setContent(composite);
return scompo;
}
示例15: createBParam
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void createBParam(FormToolkit toolkit, CTabFolder tabFolder) {
CTabItem bptab = new CTabItem(tabFolder, SWT.NONE);
bptab.setText(Messages.ParametersDialog_built_in_parameters);
ScrolledComposite scompo = new ScrolledComposite(tabFolder, SWT.V_SCROLL | SWT.H_SCROLL);
scompo.setExpandHorizontal(true);
scompo.setExpandVertical(true);
Composite sectionClient = toolkit.createComposite(scompo);
sectionClient.setLayout(new GridLayout(2, false));
for (JRParameter p : prompts)
if (!p.isForPrompting() || p.isSystemDefined())
createInput(toolkit, sectionClient, (JRDesignParameter) p);
sectionClient.pack();
scompo.setMinSize(sectionClient.getSize());
scompo.setContent(sectionClient);
bptab.setControl(scompo);
}