Java Code Examples for org.eclipse.ui.forms.widgets.FormToolkit#createScrolledForm()
The following examples show how to use
org.eclipse.ui.forms.widgets.FormToolkit#createScrolledForm() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SankeyMiniViewAction.java From olca-app with Mozilla Public License 2.0 | 6 votes |
private Composite createForm(Composite parent) { FormToolkit toolkit = new FormToolkit(Display.getCurrent()); ScrolledForm form = toolkit.createScrolledForm(parent); Composite body = form.getBody(); body.setLayout(new FillLayout()); toolkit.paintBordersFor(body); SashForm sash = new SashForm(body, SWT.VERTICAL); toolkit.adapt(sash, true, true); Section section = toolkit.createSection(sash, ExpandableComposite.NO_TITLE | ExpandableComposite.EXPANDED); section.setText(""); Composite composite = toolkit.createComposite(section, SWT.NONE); composite.setLayout(new GridLayout()); section.setClient(composite); toolkit.paintBordersFor(composite); return composite; }
Example 2
Source File: CompositeProcessorPropertiesEditionPartForm.java From eip-designer with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} * * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart# * createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) * */ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) { ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent); Form form = scrolledForm.getForm(); view = form.getBody(); GridLayout layout = new GridLayout(); layout.numColumns = 3; view.setLayout(layout); createControls(widgetFactory, view); return scrolledForm; }
Example 3
Source File: ServiceRefPropertiesEditionPartForm.java From eip-designer with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} * * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart# * createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) * */ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) { ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent); Form form = scrolledForm.getForm(); view = form.getBody(); GridLayout layout = new GridLayout(); layout.numColumns = 3; view.setLayout(layout); createControls(widgetFactory, view); return scrolledForm; }
Example 4
Source File: InvoiceCorrectionView.java From elexis-3-core with Eclipse Public License 1.0 | 5 votes |
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); }
Example 5
Source File: FormsPart.java From codeexamples-eclipse with Eclipse Public License 1.0 | 5 votes |
@PostConstruct public void createPartControl(Composite parent) { FormToolkit toolkit = new FormToolkit(parent.getDisplay()); ScrolledForm form = toolkit.createScrolledForm(parent); toolkit.decorateFormHeading(form.getForm()); form.setText("Eclipse Forms API Example"); createFirstSection(parent, toolkit); createSecondSection(form, toolkit); }
Example 6
Source File: GatewayPropertiesEditionPartForm.java From eip-designer with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} * * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart# * createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) * */ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) { ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent); Form form = scrolledForm.getForm(); view = form.getBody(); GridLayout layout = new GridLayout(); layout.numColumns = 3; view.setLayout(layout); createControls(widgetFactory, view); return scrolledForm; }
Example 7
Source File: AdapterPropertiesEditionPartForm.java From eip-designer with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} * * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart# * createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) * */ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) { ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent); Form form = scrolledForm.getForm(); view = form.getBody(); GridLayout layout = new GridLayout(); layout.numColumns = 3; view.setLayout(layout); createControls(widgetFactory, view); return scrolledForm; }
Example 8
Source File: ConditionalRoutePropertiesEditionPartForm.java From eip-designer with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} * * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart# * createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) * */ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) { ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent); Form form = scrolledForm.getForm(); view = form.getBody(); GridLayout layout = new GridLayout(); layout.numColumns = 3; view.setLayout(layout); createControls(widgetFactory, view); return scrolledForm; }
Example 9
Source File: InvocableEndpointPropertiesEditionPartForm.java From eip-designer with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} * * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart# * createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) * */ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) { ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent); Form form = scrolledForm.getForm(); view = form.getBody(); GridLayout layout = new GridLayout(); layout.numColumns = 3; view.setLayout(layout); createControls(widgetFactory, view); return scrolledForm; }
Example 10
Source File: RouterPropertiesEditionPartForm.java From eip-designer with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} * * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart# * createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) * */ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) { ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent); Form form = scrolledForm.getForm(); view = form.getBody(); GridLayout layout = new GridLayout(); layout.numColumns = 3; view.setLayout(layout); createControls(widgetFactory, view); return scrolledForm; }
Example 11
Source File: FilterPropertiesEditionPartForm.java From eip-designer with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} * * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart# * createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) * */ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) { ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent); Form form = scrolledForm.getForm(); view = form.getBody(); GridLayout layout = new GridLayout(); layout.numColumns = 3; view.setLayout(layout); createControls(widgetFactory, view); return scrolledForm; }
Example 12
Source File: ServiceActivatorPropertiesEditionPartForm.java From eip-designer with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} * * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart# * createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) * */ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) { ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent); Form form = scrolledForm.getForm(); view = form.getBody(); GridLayout layout = new GridLayout(); layout.numColumns = 3; view.setLayout(layout); createControls(widgetFactory, view); return scrolledForm; }
Example 13
Source File: ServiceInvocationPropertiesEditionPartForm.java From eip-designer with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} * * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart# * createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) * */ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) { ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent); Form form = scrolledForm.getForm(); view = form.getBody(); GridLayout layout = new GridLayout(); layout.numColumns = 3; view.setLayout(layout); createControls(widgetFactory, view); return scrolledForm; }
Example 14
Source File: SplitterPropertiesEditionPartForm.java From eip-designer with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} * * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart# * createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) * */ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) { ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent); Form form = scrolledForm.getForm(); view = form.getBody(); GridLayout layout = new GridLayout(); layout.numColumns = 3; view.setLayout(layout); createControls(widgetFactory, view); return scrolledForm; }
Example 15
Source File: ChannelPropertiesEditionPartForm.java From eip-designer with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} * * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart# * createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) * */ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) { ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent); Form form = scrolledForm.getForm(); view = form.getBody(); GridLayout layout = new GridLayout(); layout.numColumns = 3; view.setLayout(layout); createControls(widgetFactory, view); return scrolledForm; }
Example 16
Source File: EnricherPropertiesEditionPartForm.java From eip-designer with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} * * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart# * createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) * */ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) { ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent); Form form = scrolledForm.getForm(); view = form.getBody(); GridLayout layout = new GridLayout(); layout.numColumns = 3; view.setLayout(layout); createControls(widgetFactory, view); return scrolledForm; }
Example 17
Source File: ContentFilterPropertiesEditionPartForm.java From eip-designer with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} * * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart# * createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) * */ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) { ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent); Form form = scrolledForm.getForm(); view = form.getBody(); GridLayout layout = new GridLayout(); layout.numColumns = 3; view.setLayout(layout); createControls(widgetFactory, view); return scrolledForm; }
Example 18
Source File: RecipientListRouterPropertiesEditionPartForm.java From eip-designer with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} * * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart# * createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) * */ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) { ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent); Form form = scrolledForm.getForm(); view = form.getBody(); GridLayout layout = new GridLayout(); layout.numColumns = 3; view.setLayout(layout); createControls(widgetFactory, view); return scrolledForm; }
Example 19
Source File: MechanicDialog.java From workspacemechanic with Eclipse Public License 1.0 | 4 votes |
/** * 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; }
Example 20
Source File: OpenMiniatureViewAction.java From olca-app with Mozilla Public License 2.0 | 4 votes |
@Override protected Control createContents(final Composite parent) { FormToolkit toolkit = new FormToolkit(Display.getCurrent()); ScrolledForm scrolledForm = toolkit.createScrolledForm(parent); Composite body = scrolledForm.getBody(); body.setLayout(new FillLayout()); toolkit.paintBordersFor(body); SashForm sashForm = new SashForm(body, SWT.VERTICAL); toolkit.adapt(sashForm, true, true); Section categorySection = toolkit .createSection(sashForm, ExpandableComposite.NO_TITLE | ExpandableComposite.EXPANDED); categorySection.setText(""); Composite composite = toolkit.createComposite(categorySection, SWT.NONE); composite.setLayout(new GridLayout()); categorySection.setClient(composite); toolkit.paintBordersFor(composite); final Scale scale = new Scale(composite, SWT.NONE); scale.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); final double[] values = GraphConfig.ZOOM_LEVELS; final int increment = 100 / (values.length - 1); scale.setIncrement(increment); scale.setMinimum(0); scale.setMaximum(100); Controls.onSelect(scale, (e) -> { zoomManager.setZoom(values[scale.getSelection() / increment]); }); scale.setSelection(increment * (values.length - 1) / 2); Canvas canvas = new Canvas(composite, SWT.BORDER); canvas.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); lws = new LightweightSystem(canvas); thumbnail = new ScrollableThumbnail(port); thumbnail.setSource(figure); lws.setContents(thumbnail); disposeListener = new DisposeListener() { @Override public void widgetDisposed(final DisposeEvent e) { if (thumbnail != null) { thumbnail.deactivate(); thumbnail = null; } if (control != null && !control.isDisposed()) control.removeDisposeListener(disposeListener); close(); } }; control.addDisposeListener(disposeListener); return super.createContents(parent); }