org.eclipse.ui.forms.widgets.ScrolledForm#setLayoutData ( )源码实例Demo

下面列出了org.eclipse.ui.forms.widgets.ScrolledForm#setLayoutData ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: XPagesExtensionLibrary   文件: XSPPerfPage.java
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 项目: XPagesExtensionLibrary   文件: XSPGenPage.java
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 项目: XPagesExtensionLibrary   文件: XSPPage.java
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;
}
 
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 项目: elexis-3-core   文件: InvoiceCorrectionView.java
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);
}
 
源代码6 项目: workspacemechanic   文件: MechanicDialog.java
/**
 * 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;
}