本文整理汇总了Java中org.eclipse.swt.custom.ScrolledComposite.setExpandVertical方法的典型用法代码示例。如果您正苦于以下问题:Java ScrolledComposite.setExpandVertical方法的具体用法?Java ScrolledComposite.setExpandVertical怎么用?Java ScrolledComposite.setExpandVertical使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.custom.ScrolledComposite
的用法示例。
在下文中一共展示了ScrolledComposite.setExpandVertical方法的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: NotesCheckinControl
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
protected NotesCheckinControl(final Composite parent, final int style, final CheckinControlOptions options) {
super(parent, style, Messages.getString("NotesCheckinControl.Title"), CheckinSubControlType.CHECKIN_NOTES); //$NON-NLS-1$
this.options = options;
final FillLayout layout = new FillLayout();
layout.marginHeight = 0;
layout.marginWidth = 0;
setLayout(layout);
final int rootStyle = options.isForDialog() ? SWT.BORDER : SWT.NONE;
rootComposite = new ScrolledComposite(this, SWT.V_SCROLL | rootStyle);
rootComposite.setLayout(new FillLayout());
rootComposite.setExpandHorizontal(true);
rootComposite.setExpandVertical(true);
addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(final DisposeEvent e) {
if (pendingCheckin != null) {
pendingCheckin.getPendingChanges().removeAffectedTeamProjectsChangedListener(teamProjectsListener);
}
}
});
}
示例4: 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();
}
示例5: 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);
}
}
}
示例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: 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);
}
示例8: createControl
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
public void createControl(Composite parent) {
// Create a scrollable container to hold components
// This is useful when users are using a lower resolution.
ScrolledComposite comp = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL);
Composite container = new Composite(comp, SWT.NONE);
container.setLayout(new GridLayout(1, false));
container.setLayoutData(new GridData(GridData.FILL_BOTH));
createConfigurationArea(container);
createLanguagePackFilteredListArea(container);
createCoverageReportFilteredListArea(container);
setControl(container);
Dialog.applyDialogFont(container);
setPageComplete(!"".equals(fWorkingDirectoryLocationText.getText()) && !"".equals(fTranslationCatalogueLocationText.getText()));
// Scrollable container properties
comp.setContent(container);
comp.setMinHeight(500);
comp.setExpandHorizontal(true);
comp.setExpandVertical(true);
}
示例9: 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);
}
示例10: createUserParam
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void createUserParam(FormToolkit toolkit, CTabFolder tabFolder) {
if (canShowParameters()) {
CTabItem ptab = new CTabItem(tabFolder, SWT.NONE);
ptab.setText(Messages.ParametersDialog_user_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);
ptab.setControl(scompo);
}
}
示例11: createUI_568_IL_SpeedTourType_ScrolledContainer
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private Composite createUI_568_IL_SpeedTourType_ScrolledContainer(final Composite parent) {
// scrolled container
_speedTourType_ScrolledContainer = new ScrolledComposite(parent, SWT.V_SCROLL);
GridDataFactory.fillDefaults().grab(true, true).applyTo(_speedTourType_ScrolledContainer);
_speedTourType_ScrolledContainer.setExpandVertical(true);
_speedTourType_ScrolledContainer.setExpandHorizontal(true);
// container
final Composite speedTTContainer = new Composite(_speedTourType_ScrolledContainer, SWT.NONE);
GridDataFactory.fillDefaults().grab(true, true).applyTo(speedTTContainer);
GridLayoutFactory
.fillDefaults()//
.numColumns(5)
.applyTo(speedTTContainer);
_speedTourType_ScrolledContainer.setContent(speedTTContainer);
_speedTourType_ScrolledContainer.addControlListener(new ControlAdapter() {
@Override
public void controlResized(final ControlEvent e) {
_speedTourType_ScrolledContainer.setMinSize(speedTTContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
});
return speedTTContainer;
}
示例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(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);
}
示例13: 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);
}
示例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: createMenus
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void createMenus(final Composite parent) {
final ScrolledComposite scroll = new ScrolledComposite(parent, SWT.V_SCROLL);
scroll.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1));
scroll.setExpandHorizontal(true);
scroll.setExpandVertical(true);
attributesMenu = new Composite(scroll, SWT.NONE);
scroll.setContent(attributesMenu);
final GridLayout layout = new GridLayout(1, false);
layout.marginWidth = 0;
layout.marginHeight = 0;
layout.verticalSpacing = 1;
attributesMenu.setLayout(layout);
attributesMenu.setBackground(IGamaColors.WHITE.color());
fillAttributeMenu();
final Point size = attributesMenu.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
attributesMenu.setSize(size);
attributesMenu.layout(true, true);
scroll.setMinSize(size);
}