org.eclipse.jface.layout.GridDataFactory Java Examples
The following examples show how to use
org.eclipse.jface.layout.GridDataFactory.
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: RunConfigurationWizardPage.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
@Override public void createControl(Composite parent) { Composite mainComposite = new Composite(parent, SWT.NONE); mainComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); mainComposite.setLayout(GridLayoutFactory.fillDefaults().create()); Label loginHint = new Label(mainComposite, SWT.WRAP); loginHint.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create()); loginHint.setText(Messages.runLoginMessage); textWidget = new TextWidget.Builder() .labelAbove() .withLabel(Messages.authenticatedUser) .fill() .grabHorizontalSpace() .withProposalProvider(userProposalProvider) .createIn(mainComposite); setControl(mainComposite); }
Example #2
Source File: FrameMakerPreferencePage.java From translationstudio8 with GNU General Public License v2.0 | 6 votes |
@Override protected Control createContents(Composite parent) { Composite tparent = new Composite(parent, SWT.NONE); tparent.setLayout(new GridLayout()); tparent.setLayoutData(new GridData(GridData.FILL_BOTH)); Group groupCommon = new Group(tparent, SWT.NONE); groupCommon.setLayout(new GridLayout()); groupCommon.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); groupCommon.setText(Messages.getString("preference.FrameMakerPreferencePage.groupCommon")); HsImageLabel imageLabel = new HsImageLabel( Messages.getString("preference.FrameMakerPreferencePage.imageLabel"), Activator.getImageDescriptor(Constants.PREFERENCE_FRAMEMAKER_32)); Composite cmpCommon = imageLabel.createControl(groupCommon); cmpCommon.setLayout(new GridLayout()); cmpCommon.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); btnMaster = new Button(cmpCommon, SWT.CHECK); btnMaster.setText(Messages.getString("preference.FrameMakerPreferencePage.btnMaster")); GridDataFactory.fillDefaults().applyTo(btnMaster); imageLabel.computeSize(); btnMaster.setSelection(preferenceStore.getBoolean(Constants.FRAMEMAKER_FILTER)); return parent; }
Example #3
Source File: DeployPreferencesDialog.java From google-cloud-eclipse with Apache License 2.0 | 6 votes |
@Override protected Control createDialogArea(Composite parent) { Composite area = (Composite) super.createDialogArea(parent); Composite container = new Composite(area, SWT.NONE); content = createDeployPreferencesPanel(container, project, loginService, this::handleLayoutChange, new ProjectRepository(googleApiFactory)); GridDataFactory.fillDefaults().grab(true, false).applyTo(content); // we pull in Dialog's content margins which are zeroed out by TitleAreaDialog GridDataFactory.fillDefaults().grab(true, true).applyTo(container); GridLayoutFactory.fillDefaults() .margins(LayoutConstants.getMargins().x, LayoutConstants.getMargins().y) .generateLayout(container); TitleAreaDialogSupport.create(this, content.getDataBindingContext()) .setValidationMessageProvider(new ValidationMessageProvider() { @Override public int getMessageType(ValidationStatusProvider statusProvider) { int type = super.getMessageType(statusProvider); setValid(type != IMessageProvider.ERROR); return type; } }); return area; }
Example #4
Source File: MoveConnectorWizardPage.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
private void createExecutionEventControl(final EMFDataBindingContext dbc, final Composite parent) { final Label eventLabel = new Label(parent, SWT.NONE); eventLabel.setLayoutData(GridDataFactory.swtDefaults().span(2, 1).create()); eventLabel.setText(Messages.connectorEventLabel); final Composite eventRadioGroup = new Composite(parent, SWT.NONE); eventRadioGroup.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create()); eventRadioGroup.setLayout(GridLayoutFactory.fillDefaults().numColumns(2).extendedMargins(20, 0, 0, 15).create()); final Button inRadio = createRadioButton(eventRadioGroup, Messages.bind(Messages.connectorInChoice, ConnectorEvent.ON_ENTER.name())); final Button outRadio = createRadioButton(eventRadioGroup, Messages.bind(Messages.connectorOutChoice, ConnectorEvent.ON_FINISH.name())); final SelectObservableValue eventObservable = new SelectObservableValue(String.class); eventObservable.addOption(ConnectorEvent.ON_ENTER.name(), SWTObservables.observeSelection(inRadio)); eventObservable.addOption(ConnectorEvent.ON_FINISH.name(), SWTObservables.observeSelection(outRadio)); dbc.bindValue(eventObservable, connectorEventObservable); }
Example #5
Source File: SelectUserConnectorDefinitionWizardPage.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
@Override public void createControl(final Composite parent) { super.createControl(parent); final Composite composite = (Composite) getControl() ; removeButton = new Button(composite, SWT.PUSH) ; removeButton.setText(Messages.remove) ; removeButton.setLayoutData(GridDataFactory.swtDefaults().hint(85, SWT.DEFAULT).create()) ; removeButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(final SelectionEvent e) { deleteConnectorRessources(); } }) ; removeButton.setEnabled(false) ; }
Example #6
Source File: WebBrowserViewer.java From APICloud-Studio with GNU General Public License v3.0 | 6 votes |
private void createNavigationBar(Composite parent) { toolBarManager = new ToolBarManager(SWT.FLAT); toolBarManager.add(consoleAction); toolBarManager.add(backAction); toolBarManager.add(forwardAction); toolBarManager.add(stopAction); toolBarManager.add(refreshAction); ToolBar toolbar = toolBarManager.createControl(parent); toolbar.setLayoutData(GridDataFactory.fillDefaults().create()); urlCombo = new Combo(parent, SWT.DROP_DOWN); urlCombo.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create()); urlCombo.addListener(SWT.DefaultSelection, new Listener() { @Override public void handleEvent(Event e) { setURL(urlCombo.getText()); } }); ToolBarManager toolBarManager2 = new ToolBarManager(SWT.FLAT); toolBarManager2.add(goAction); toolbar = toolBarManager2.createControl(parent); toolbar.setLayoutData(GridDataFactory.fillDefaults().create()); }
Example #7
Source File: BonitaTreeViewer.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
/** * Creates the default tree and sets it as the control. The default styles * will show scrollbars as needed, and allows for multiple selection. * * @param parent * The parent for the Tree * @return the control */ @Override public Control createControl(final Composite parent) { parent.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE)); final Composite mainComposite = new Composite(parent, SWT.BORDER); mainComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); mainComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).margins(5, 10).create()); mainComposite.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE)); final TreeViewer treeViewer = createFilteredTree(mainComposite); treeViewer.setLabelProvider(adapterFactoryLabelProvider); treeViewer.setContentProvider(adapterFactoryContentProvider); addFilters(treeViewer); treeViewer.addSelectionChangedListener( new TabbedPropertySynchronizerListener(editPartResolver, new TabbedPropertySelectionProviderRegistry(), PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getActivePage())); setControl(mainComposite); return mainComposite; }
Example #8
Source File: HTMLPreferencePage.java From APICloud-Studio with GNU General Public License v3.0 | 6 votes |
@Override protected Composite createContentAssistOptions(Composite parent) { Composite caOptions = super.createContentAssistOptions(parent); final Composite fieldEditorGroup = new Composite(parent, SWT.NONE); fieldEditorGroup.setLayoutData(GridDataFactory.fillDefaults().span(2, 1).create()); // Auto-insert closing tags BooleanFieldEditor closingTag = new BooleanFieldEditor(IPreferenceConstants.HTML_AUTO_CLOSE_TAG_PAIRS, Messages.HTMLPreferencePage_AutoInsertCloseTagLabel, fieldEditorGroup); addField(closingTag); // Hit remote URLs for src/href path children proposals BooleanFieldEditor remoteHREFProposals = new BooleanFieldEditor( IPreferenceConstants.HTML_REMOTE_HREF_PROPOSALS, Messages.HTMLPreferencePage_TraverseRemoteURIsForPathAssistLabel, fieldEditorGroup); addField(remoteHREFProposals); return caOptions; }
Example #9
Source File: SelectVariableDialog.java From birt with Eclipse Public License 1.0 | 6 votes |
@Override protected Control createDialogArea( Composite parent ) { Composite content = new Composite( parent, SWT.NONE ); content.setLayoutData( GridDataFactory.swtDefaults( ).hint( 300, SWT.DEFAULT ).create( ) ); content.setLayout( GridLayoutFactory.swtDefaults( ) .numColumns( 2 ) .margins( 15, 15 ) .create( ) ); new Label( content, SWT.NONE ).setText( Messages.getString("SelectVariableDialog.AvailableVariables") ); //$NON-NLS-1$ variablesCombo = new Combo( content, SWT.READ_ONLY ); variablesCombo.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); variablesCombo.setVisibleItemCount( 30 ); variablesCombo.addSelectionListener( new SelectionAdapter( ) { public void widgetSelected( SelectionEvent e ) { validate( ); } } ); UIUtil.bindHelp( parent, IHelpContextIds.SELECT_VARIABLE_DIALOG_ID ); return content; }
Example #10
Source File: UsersWizardPage.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
protected void setDefaultUserInformationGroup(final Group defaultGroup) { defaultGroup.setText(Messages.defaultInformationGroupTitle); defaultGroup.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).create()); defaultGroup.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); final Composite globalComposite = new Composite(defaultGroup, SWT.FILL); globalComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).margins(5, 5).create()); globalComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); final Composite tablesComposite = new Composite(globalComposite, SWT.FILL); tablesComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(3).equalWidth(true).create()); tablesComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); createGeneralDataTable(tablesComposite); createBusinessCardTable(tablesComposite); createPersonalDataTable(tablesComposite); final Composite membershipsComposite = new Composite(globalComposite, SWT.NONE); membershipsComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).create()); membershipsComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); createMembershipsTable(membershipsComposite); }
Example #11
Source File: LogUploadDesign.java From ldparteditor with MIT License | 6 votes |
/** * Create contents of the dialog. * * @param parent */ @Override protected Control createDialogArea(Composite parent) { Composite cmp_container = (Composite) super.createDialogArea(parent); GridLayout gridLayout = (GridLayout) cmp_container.getLayout(); gridLayout.verticalSpacing = 10; gridLayout.horizontalSpacing = 10; Label lbl_specify = new Label(cmp_container, SWT.NONE); lbl_specify.setText(I18n.E3D_LogUploadData); Label lbl_separator = new Label(cmp_container, SWT.SEPARATOR | SWT.HORIZONTAL); lbl_separator.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1)); final StyledText styledText = new StyledText(cmp_container, SWT.BORDER | SWT.V_SCROLL | SWT.MULTI | SWT.WRAP | SWT.READ_ONLY); styledText.setText(source); styledText.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).span(2, 1).create()); cmp_container.pack(); return cmp_container; }
Example #12
Source File: SelectDataWizardPage.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
public void createDocumentTableViewerComposite(final Composite parent, final DataBindingContext dbc) { documentTableViewerComposite = new Composite(parent, SWT.NONE); documentTableViewerComposite.setLayout(GridLayoutFactory.swtDefaults().create()); documentTableViewerComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); final TableViewer documentTableViewer = new TableViewer(documentTableViewerComposite, SWT.BORDER | SWT.SINGLE | SWT.NO_FOCUS | SWT.H_SCROLL | SWT.V_SCROLL); documentTableViewer.getTable() .setLayoutData(GridDataFactory.fillDefaults().grab(true, true).hint(200, 100).create()); final ObservableListContentProvider contentProvider = new ObservableListContentProvider(); documentTableViewer.setContentProvider(contentProvider); documentTableViewer.setLabelProvider(new DocumentStyledLabelProvider()); documentTableViewer.setInput(new WritableList(availableDocuments, ProcessPackage.Literals.DOCUMENT)); final IViewerObservableValue observeSingleSelection = ViewersObservables .observeSingleSelection(documentTableViewer); dbc.bindValue(observeSingleSelection, selectedDataObservable, updateValueStrategy().withValidator(createDefaultValueAlreadyDefinedValidator()).create(), null); documentButton.addSelectionListener(createDocumentSelectionAdapter()); }
Example #13
Source File: PageComponentSwitchBuilder.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
public Section createGroupControl(final Composite composite, final Group object) { final String desc = getDescription(object.getId()); int style = Section.NO_TITLE_FOCUS_BOX | Section.TWISTIE | Section.CLIENT_INDENT; if (desc != null && !desc.isEmpty()) { style = style | Section.DESCRIPTION; } final Section groupSection = new Section(composite, style); groupSection.setText(getLabel(object.getId())); groupSection.setFont(BonitaStudioFontRegistry.getBoldFont()); if (desc != null && !desc.isEmpty()) { groupSection.setDescription(desc); } groupSection.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); groupSection.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).span(2, 1).create()); return groupSection; }
Example #14
Source File: IterationPropertySection.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
private void createInputForCardinalityGroup(final TabbedPropertySheetWidgetFactory widgetFactory, final Composite dataContent) { final Group inputGroup = widgetFactory.createGroup(dataContent, Messages.input); inputGroup.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); inputGroup.setLayout(GridLayoutFactory.fillDefaults().numColumns(3).spacing(5, 3).create()); final Label label = widgetFactory.createLabel(inputGroup, Messages.numberOfInstancesToCreate, SWT.NONE); label.setLayoutData(GridDataFactory.swtDefaults().align(SWT.RIGHT, SWT.CENTER).create()); final ExpressionViewer cardinalityExpression = new ExpressionViewer(inputGroup, SWT.BORDER, widgetFactory); cardinalityExpression.getControl() .setLayoutData(GridDataFactory.fillDefaults().grab(true, false).span(2, 1).create()); cardinalityExpression.addFilter(new AvailableExpressionTypeFilter( new String[] { ExpressionConstants.CONSTANT_TYPE, ExpressionConstants.VARIABLE_TYPE, ExpressionConstants.PARAMETER_TYPE, ExpressionConstants.SCRIPT_TYPE })); cardinalityExpression.setExpressionNameResolver(new DefaultExpressionNameResolver("numberOfInstancesToCreate")); final IObservableValue selectionObservable = ViewersObservables.observeSingleSelection(selectionProvider); context.bindValue(ViewersObservables.observeInput(cardinalityExpression), selectionObservable); context.bindValue(ViewersObservables.observeSingleSelection(cardinalityExpression), CustomEMFEditObservables.observeDetailValue(Realm.getDefault(), selectionObservable, ProcessPackage.Literals.MULTI_INSTANTIABLE__CARDINALITY_EXPRESSION)); }
Example #15
Source File: UsersWizardPage.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
protected Control createContactInfoControl(final Composite parent, final EReference ref) { final Composite detailsInfoComposite = new Composite(parent, SWT.NONE); detailsInfoComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).minSize(0, 0).create()); detailsInfoComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(2).equalWidth(false).create()); createEmailField(detailsInfoComposite, ref); createPhoneField(detailsInfoComposite, ref); createMobileField(detailsInfoComposite, ref); createFaxField(detailsInfoComposite, ref); createWebSiteField(detailsInfoComposite, ref); createBuildingInfoFields(detailsInfoComposite, ref); createAddressField(detailsInfoComposite, ref); createAddressInfoFields(detailsInfoComposite, ref); createCountryField(detailsInfoComposite, ref); return detailsInfoComposite; }
Example #16
Source File: AdditionalResourcesPropertySection.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
@Override protected void createContent(Composite parent) { Composite mainComposite = getWidgetFactory().createComposite(parent); mainComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(2).margins(10, 10).create()); mainComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); LocalResourceManager resourceManager = new LocalResourceManager(JFaceResources.getResources(), mainComposite); descriptionStyler = new AdditionalResourceStyler(resourceManager.createColor(ColorConstants.SIMPLE_TYPE_RGB)); createButtons(mainComposite); createViewer(mainComposite); DataBindingContext ctx = new DataBindingContext(); ComputedValue<Boolean> selectionNotNullObservable = new ComputedValueBuilder<Boolean>() .withSupplier(() -> selectionObservable.getValue() != null) .build(); ctx.bindValue(WidgetProperties.enabled().observe(editButton), selectionNotNullObservable); ctx.bindValue(WidgetProperties.enabled().observe(removeButton), selectionNotNullObservable); }
Example #17
Source File: GroovyEditorDocumentationDialogTray.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
@Override protected Control createContents(final Composite parent) { final Composite mainComposite = new Composite(parent, SWT.NONE); mainComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); mainComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).margins(0, 0).create()); createFunctionCategories(mainComposite); final SashForm sashForm = new SashForm(mainComposite, SWT.VERTICAL); sashForm.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).hint(250, 250).minSize(100, SWT.DEFAULT).create()); final GridLayout gridLaout = GridLayoutFactory.fillDefaults().numColumns(1).margins(0, 2).create(); sashForm.setLayout(gridLaout); createFunctionsList(sashForm); createFunctionDocumentaion(sashForm); sashForm.setWeights(new int[] { 1, 1 }); return mainComposite; }
Example #18
Source File: OperationsComposite.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
protected OperationViewer createOperationViewer() { final OperationViewer viewer = new OperationViewer(operationComposite, widgetFactory, getEditingDomain(), actionExpressionFilter, storageExpressionFilter, isPageFlowContext); viewer.setLayoutData(GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).create()); if (eObjectContext != null) { viewer.setContext(eObjectContext); } if (storageExpressionNatureProvider != null) { viewer.setStorageExpressionNatureProvider(storageExpressionNatureProvider); } if (actionExpressionNatureProvider != null) { viewer.setActionExpressionNatureProvider(actionExpressionNatureProvider); } for (final IExpressionValidator validator : validators) { viewer.addActionExpressionValidator(validator); } return viewer; }
Example #19
Source File: TransitionOrderingPropertySection.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
protected void createList(final Composite mainComposite) { final List list = getWidgetFactory().createList(mainComposite, SWT.BORDER | SWT.V_SCROLL); list.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).hint(SWT.DEFAULT, 90).create()); listViewer = new ListViewer(list); listViewer.setContentProvider(new ObservableListContentProvider<Element>()); listViewer.setLabelProvider(new LabelProvider(){ @Override public String getText(final Object element) { if(element != null && element instanceof Connection){ final String transitionName = ((Connection) element).getName(); return transitionName +" -- "+((Connection) element).getTarget().getName(); } return super.getText(element); } }); listViewer.addSelectionChangedListener(new ISelectionChangedListener() { @Override public void selectionChanged(final SelectionChangedEvent event) { updateButtonsEnablement(); } }); }
Example #20
Source File: GenericInfoPopupDialog.java From APICloud-Studio with GNU General Public License v3.0 | 6 votes |
@Override protected Control createDialogArea(Composite parent) { Composite main = new Composite(parent, SWT.NONE); main.setLayout(GridLayoutFactory.swtDefaults().create()); main.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); if (clickListener != null) { main.addMouseListener(clickListener); } Label infoLabel = new Label(main, SWT.WRAP); infoLabel.setText(message); infoLabel.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); if (clickListener != null) { infoLabel.addMouseListener(clickListener); } return main; }
Example #21
Source File: AddElementDialog.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
private void createNoteComposite(Composite compostie) { // 自定义属性名称 Label lblNote = new Label(compostie, SWT.NONE); lblNote.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 2, 1)); lblNote.setText(Messages.getString("tmxeditor.addElementDialog.noteContent")); txtNoteContent = new Text(compostie, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL); txtNoteContent.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent e) { getButton(Dialog.OK).setEnabled(!txtNoteContent.getText().isEmpty()); } }); GridDataFactory.swtDefaults().hint(SWT.DEFAULT, 60).span(2, 1).align(SWT.FILL, SWT.FILL).grab(true, true) .applyTo(txtNoteContent); }
Example #22
Source File: DocumentWizardPage.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
private void createDocumentTypeRadioButtonComposition(final Composite parent, final EMFDataBindingContext emfDataBindingContext) { final Composite compo = new Composite(parent, SWT.NONE); compo.setLayout(GridLayoutFactory.fillDefaults().numColumns(4).spacing(10, 5).create()); compo.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create()); final Button radioButtonNone = createRadioButtonNone(compo); final Button radioButtonContract = createRadioButtonContract(compo); final Button radioButtonInternal = createRadioButtonInternal(compo); final Button radioButtonExternal = createRadioButtonExternal(compo); final SelectObservableValue documentTypeObservableValue = new SelectObservableValue(DocumentType.class); documentTypeObservableValue.addOption(DocumentType.NONE, SWTObservables.observeSelection(radioButtonNone)); documentTypeObservableValue.addOption(DocumentType.CONTRACT, SWTObservables.observeSelection(radioButtonContract)); documentTypeObservableValue.addOption(DocumentType.EXTERNAL, SWTObservables.observeSelection(radioButtonExternal)); documentTypeObservableValue.addOption(DocumentType.INTERNAL, SWTObservables.observeSelection(radioButtonInternal)); final IObservableValue documentTypeObservable = EMFObservables.observeValue(document, ProcessPackage.Literals.DOCUMENT__DOCUMENT_TYPE); emfDataBindingContext.bindValue( documentTypeObservableValue, documentTypeObservable); documentTypeObservable.addValueChangeListener(new IValueChangeListener() { @Override public void handleValueChange(final ValueChangeEvent event) { validate(emfDataBindingContext); } }); }
Example #23
Source File: ManageOrganizationWizardPage.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
protected void createButtons(final Composite parent) { final Composite buttonComposite = new Composite(parent,SWT.NONE) ; buttonComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).margins(0, 0).spacing(0, 3).create()) ; buttonComposite.setLayoutData(GridDataFactory.fillDefaults().grab(false, true).indent(0, 25).create()); createAddButton(buttonComposite); createRemoveButton(buttonComposite); updateButtons(); }
Example #24
Source File: SelectExamplePage.java From statecharts with Eclipse Public License 1.0 | 5 votes |
protected void createTreeViewer(Composite container) { viewer = new TreeViewer(container, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI); GridDataFactory.fillDefaults().grab(true, true).applyTo(viewer.getControl()); viewer.setContentProvider(new ExampleContentProvider()); viewer.setLabelProvider(new DelegatingStyledCellLabelProvider(new ExampleLabelProvider())); viewer.addSelectionChangedListener(this); }
Example #25
Source File: DataViewer.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
private void createButtons(Composite parent) { Composite buttonsComposite = widgetFactory.createComposite(parent, SWT.NONE); buttonsComposite.setLayoutData(GridDataFactory.fillDefaults().grab(false, true).create()); buttonsComposite.setLayout(GridLayoutFactory.fillDefaults().spacing(3, 3).create()); addButtons(buttonsComposite); }
Example #26
Source File: SelectArtifactToDeployPage.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
@Override public Control createControl(Composite parent, IWizardContainer wizardContainer, DataBindingContext ctx) { Composite mainComposite = new Composite(parent, SWT.INHERIT_FORCE); mainComposite.setLayout(GridLayoutFactory.swtDefaults() .create()); mainComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); Composite viewerAndButtonsComposite = new Composite(mainComposite, SWT.INHERIT_FORCE); viewerAndButtonsComposite.setLayout( GridLayoutFactory.fillDefaults().numColumns(2).spacing(LayoutConstants.getSpacing().x, 1).create()); viewerAndButtonsComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); new Label(viewerAndButtonsComposite, SWT.NONE); // column filler createSearchAndCollapseComposite(ctx, viewerAndButtonsComposite); createSelectButtonComposite(viewerAndButtonsComposite); createViewer(ctx, viewerAndButtonsComposite); createArtifactCounter(viewerAndButtonsComposite); createDeployOptions(ctx, viewerAndButtonsComposite); checkedElementsObservable = fileStoreViewer.checkedElementsObservable(); defaultSelection(); searchObservableValue.addValueChangeListener(e -> applySearch(e.diff.getNewValue())); checkedElementsObservable.addSetChangeListener(event -> { if (!filtering) { mergeSets(); updateCleanDeployEnablement(); updateUserProposals(); updateEnvironmentEnablement(); } }); mergeSets(); updateUserProposals(); updateCleanDeployEnablement(); updateEnvironmentEnablement(); return mainComposite; }
Example #27
Source File: SelectDatabaseOutputTypeWizardPage.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
protected Button createScriptModeControl(Composite parent) { final Button scriptModeRadio = new Button(parent, SWT.RADIO); scriptModeRadio.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).indent(15, 20).create()); scriptModeRadio.setText(Messages.scriptMode); scriptModeRadio.setFont(BonitaStudioFontRegistry.getActiveFont()); final Composite descriptionComposite = new Composite(parent, SWT.NONE); descriptionComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).indent(45, -5).create()); descriptionComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).margins(0, 0).create()); final Label scriptingDescriptionLabel = new Label(descriptionComposite, SWT.WRAP); scriptingDescriptionLabel.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create()); scriptingDescriptionLabel.setText(Messages.scriptModeDescription); alwaysUseScriptCheckbox = new Button(descriptionComposite, SWT.CHECK); alwaysUseScriptCheckbox.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create()); alwaysUseScriptCheckbox.setText(Messages.alwaysUseScriptingMode); alwaysUseScriptCheckbox.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { preferenceStore.setValue(BonitaPreferenceConstants.ALWAYS_USE_SCRIPTING_MODE, alwaysUseScriptCheckbox.getSelection()); } }); return scriptModeRadio; }
Example #28
Source File: ThrowEventSection.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
private Button createAddEventButton(final Composite buttonsComposite) { final Button addMessageEventButton = getWidgetFactory().createButton(buttonsComposite, Messages.addConnector, SWT.FLAT); addMessageEventButton.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).hint(85, SWT.DEFAULT).create()); addMessageEventButton.addListener(SWT.Selection, new Listener() { @Override public void handleEvent(final Event event) { new WizardDialog(ThrowEventSection.this.getPart().getSite().getShell(), createMessageEventWizard(ModelHelper.getMainProcess(getEObject()),null)).open(); refresh(); } }); addMessageEventButton.setToolTipText(Messages.connectorAdd_tooltip); return addMessageEventButton; }
Example #29
Source File: BonitaPreferenceDialog.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
protected Label createItemLabel(final Composite composite, final Color backgroundColor, final String text) { final Composite labelContainer = new Composite(composite, SWT.NONE); GridDataFactory.fillDefaults().hint(LABEL_WIDTH, SWT.DEFAULT).applyTo(labelContainer); final GridLayout layout = new GridLayout(1, true); layout.marginWidth = 0; layout.marginHeight = 0; labelContainer.setLayout(layout); labelContainer.setBackground(backgroundColor); layout.marginBottom = 0; final Label label = new Label(labelContainer, SWT.CENTER); GridDataFactory.fillDefaults().grab(true, false).align(SWT.CENTER, SWT.CENTER).applyTo(label); label.setText(text); label.setBackground(backgroundColor); return label; }
Example #30
Source File: AbstractBonitaDescriptionSection.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
@Override public void createControls(final Composite parent, final TabbedPropertySheetPage aTabbedPropertySheetPage) { super.createControls(parent, aTabbedPropertySheetPage); propertySectionHistory = new PropertySectionHistory(getClass().getSimpleName()); propertySectionHistory.load(); parent.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).margins(0, 0).create()); parent.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); tabbedPropertySheetPage = aTabbedPropertySheetPage; final TabbedPropertySheetWidgetFactory widgetFactory = tabbedPropertySheetPage.getWidgetFactory(); form = widgetFactory.createForm(parent); form.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).margins(0, 0).create()); form.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); form.setText(getSectionTitle()); final Composite formBodyComposite = form.getBody(); formBodyComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).margins(0, 0).create()); formBodyComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); togglePropertyHelpContributionItem = new TogglePropertyHelpContributionItem(widgetFactory, form, getSectionDescription(),getDescriptionSeverity(), propertySectionHistory); updateToolbar(form.getToolBarManager()); form.getToolBarManager().add(togglePropertyHelpContributionItem); form.getToolBarManager().update(true); createContent(formBodyComposite); form.update(); form.setFocus(); }