本文整理匯總了Java中org.eclipse.ui.forms.widgets.ScrolledForm.setLayoutData方法的典型用法代碼示例。如果您正苦於以下問題:Java ScrolledForm.setLayoutData方法的具體用法?Java ScrolledForm.setLayoutData怎麽用?Java ScrolledForm.setLayoutData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.ui.forms.widgets.ScrolledForm
的用法示例。
在下文中一共展示了ScrolledForm.setLayoutData方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: initialize
import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
private ScrolledForm initialize() {
GridLayout ourLayout = new GridLayout(1, false);
ourLayout.marginHeight = 0;
ourLayout.marginWidth = 0;
setLayout(ourLayout);
setBackground(getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
ScrolledForm scrolledForm = toolkit.createScrolledForm(this);
scrolledForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
Composite formatComposite = XSPEditorUtil.createFormComposite(scrolledForm);
XSPEditorUtil.createCLabel(formatComposite, "Performance Properties", 2); // $NLX-XSPPerfPage.PerformanceProperties-1$
createLeftSide(formatComposite);
createRightSide(formatComposite);
return scrolledForm;
}
示例2: initialize
import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
private ScrolledForm initialize() {
setParentPropertyName("xspProperties"); // $NON-NLS-1$
GridLayout ourLayout = new GridLayout(1, false);
ourLayout.marginHeight = 0;
ourLayout.marginWidth = 0;
setLayout(ourLayout);
setBackground(getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
ScrolledForm scrolledForm = toolkit.createScrolledForm(this);
scrolledForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
Composite formatComposite = XSPEditorUtil.createFormComposite(scrolledForm);
XSPEditorUtil.createCLabel(formatComposite, "Page Generation Properties", 2); // $NLX-XSPGenPage.PageGenerationProperties-1$
createLeftSide(formatComposite);
createRightSide(formatComposite);
return scrolledForm;
}
示例3: initialize
import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
private ScrolledForm initialize() {
//setParentPropertyName("xspProperties"); // $NON-NLS-1$
GridLayout ourLayout = new GridLayout(1, false);
ourLayout.marginHeight = 0;
ourLayout.marginWidth = 0;
setLayout(ourLayout);
setBackground(getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
ScrolledForm scrolledForm = toolkit.createScrolledForm(this);
scrolledForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
Composite formatComposite = XSPEditorUtil.createFormComposite(scrolledForm);
XSPEditorUtil.createCLabel(formatComposite, "XPage Properties", 2); // $NLX-XSPPage.XPageProperties-1$
createLeftSide(formatComposite);
createRightSide(formatComposite);
return scrolledForm;
}
示例4: initialize
import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
protected void initialize() {
GridLayout ourLayout = new GridLayout(1, false);
ourLayout.marginHeight = 0;
ourLayout.marginWidth = 0;
setLayout(ourLayout);
setBackground(getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
// Create the scrolled form
ScrolledForm scrolledForm = _toolkit.createScrolledForm(this);
scrolledForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
Composite composite = XSPEditorUtil.createFormComposite(scrolledForm);
_mainLabel = XSPEditorUtil.createCLabel(composite, getPageTitle(), 2);
// Create each side
createLeftSide(composite);
createRightSide(composite);
}
示例5: construct
import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
@Override
public Control construct(Composite parent) {
// TODO Auto-generated method stub
final FormToolkit toolkit = new FormToolkit(parent.getDisplay());
final ScrolledForm form = toolkit.createScrolledForm(parent);
form.setLayoutData(new GridData(GridData.FILL_BOTH));
form.setText("Form with subpages");
form.setFocus();
form.getBody().setLayout(new GridLayout());
ScrolledPageBook pageBook = toolkit.createPageBook(form.getBody(),
SWT.V_SCROLL | SWT.H_SCROLL);
// pageBook.showEmptyPage();
Composite page1 = pageBook.createPage("First Page");
Text text1 = toolkit.createText(page1, "First Page", SWT.MULTI
| SWT.WRAP);
page1.setLayout(new GridLayout());
text1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.heightHint = 0;
pageBook.setLayoutData(gd);
Composite page2 = pageBook.createPage("Second Page");
Text text2 = toolkit.createText(page1, "Second Page", SWT.MULTI
| SWT.WRAP);
page2.setLayout(new GridLayout());
text2.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
pageBook.showPage("First Page");
// pageBook.showPage(page2);
pageBook.getCurrentPage();
return null;
}
示例6: createComponents
import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
public void createComponents(FallDTO fallDTO){
this.setBackground(UiDesk.getColor(UiDesk.COL_WHITE));
FormToolkit tk = UiDesk.getToolkit();
ScrolledForm form = tk.createScrolledForm(this);
form.setBackground(UiDesk.getColor(UiDesk.COL_WHITE));
form.setLayoutData(SWTHelper.getFillGridData(1, true, 1, false));
Composite body = form.getBody();
GridLayout gd1 = new GridLayout();
gd1.marginWidth = 0;
gd1.marginHeight = 0;
body.setLayout(gd1);
ExpandableComposite expandable = WidgetFactory.createExpandableComposite(tk, form, ""); //$NON-NLS-1$
expandable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
expandable.setExpanded(false);
expandable.setText("Fallangaben");
expandable.addExpansionListener(new ExpansionAdapter() {
@Override
public void expansionStateChanged(ExpansionEvent e){
invoiceComposite.updateScrollBars();
}
});
Composite group = tk.createComposite(expandable, SWT.NONE);
GridLayout gd = new GridLayout(2, false);
gd.marginWidth = 0;
gd.marginHeight = 0;
group.setLayout(gd);
group.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
expandable.setClient(group);
fallDetailBlatt2 = new FallDetailBlatt2(group, fallDTO, true);
GridData gd2 = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1);
gd2.heightHint = 340;
fallDetailBlatt2.setLayoutData(gd2);
}
示例7: createForm
import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
/**
* Add a form to the supplied Composite.
*/
private Control createForm(Composite parent) {
final FormToolkit toolkit = new FormToolkit(parent.getDisplay());
final ScrolledForm form = toolkit.createScrolledForm(parent);
/*
* For the life of me I can't understand why I have to supply
* a GridData instance to the form object in order to get the form
* to fill the dialog area.
*
* BTW, I only found this out through trial and error.
*/
form.setLayoutData(new GridData(GridData.FILL_BOTH));
TableWrapLayout layout = new TableWrapLayout();
layout.numColumns = 2;
layout.horizontalSpacing = 15;
layout.verticalSpacing = 10;
form.getBody().setLayout(layout);
form.getBody().setLayoutData(new TableWrapData(
TableWrapData.FILL_GRAB, TableWrapData.FILL_GRAB, 1, 3));
for (Task item : items) {
// add an expandable description of the task, with a pretty title
ExpandableComposite ec = toolkit.createExpandableComposite(form.getBody(),
ExpandableComposite.TREE_NODE | ExpandableComposite.CLIENT_INDENT);
ec.setText(item.getTitle());
Label label = toolkit.createLabel(ec, item.getDescription(), SWT.WRAP);
ec.setClient(label);
ec.addExpansionListener(new ExpansionAdapter() {
@Override
public void expansionStateChanged(ExpansionEvent e) {
form.reflow(true);
}
});
ec.setExpanded(true);
ec.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
// add a combo box allowing the user to select the repair action to take
createDecisionCombo(form.getBody(), item);
}
return parent;
}