org.eclipse.swt.events.SelectionAdapter Java Examples
The following examples show how to use
org.eclipse.swt.events.SelectionAdapter.
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 Project: birt Author: eclipse File: RotatedTextBuilder.java License: Eclipse Public License 1.0 | 9 votes |
protected void createTextArea( Composite parent ) { Label lb = new Label( parent, SWT.None ); lb.setText( "Text Content:" ); //$NON-NLS-1$ txtText = new Text( parent, SWT.BORDER ); GridData gd = new GridData( GridData.FILL_HORIZONTAL ); txtText.setLayoutData( gd ); Button btnExp = new Button( parent, SWT.PUSH ); btnExp.setText( "..." ); //$NON-NLS-1$ btnExp.setToolTipText( "Invoke Expression Builder" ); //$NON-NLS-1$ btnExp.addSelectionListener( new SelectionAdapter( ) { public void widgetSelected( SelectionEvent event ) { openExpression( txtText ); } } ); }
Example #2
Source Project: hop Author: project-hop File: RadioTab.java License: Apache License 2.0 | 8 votes |
public Composite createContent( String radioText ) { Control[] existingButtons = radioGroup.getChildren(); Button button = new Button( radioGroup, SWT.RADIO ); button.setText( radioText ); props.setLook( button ); FormData fdButton = new FormData(); fdButton.top = new FormAttachment( 0 ); fdButton.left = existingButtons.length == 0 ? new FormAttachment( 0 ) : new FormAttachment( existingButtons[ existingButtons.length - 1 ], 40 ); button.setLayoutData( fdButton ); button.setSelection( existingButtons.length == 0 ); Composite content = new Composite( contentArea, SWT.NONE ); content.setVisible( existingButtons.length == 0 ); props.setLook( content ); content.setLayout( noMarginLayout ); content.setLayoutData( fdMaximize ); button.addSelectionListener( new SelectionAdapter() { @Override public void widgetSelected( SelectionEvent selectionEvent ) { for ( Control control : contentArea.getChildren() ) { control.setVisible( false ); } content.setVisible( true ); } } ); return content; }
Example #3
Source Project: depan Author: google File: NodeFilterViewPart.java License: Apache License 2.0 | 6 votes |
@Override protected Composite createCommands(Composite parent) { Composite result = Widgets.buildGridContainer(parent, 1); Button compute = Widgets.buildCompactPushButton( result, "Compute Results"); compute.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { updateResults(); } }); return result; }
Example #4
Source Project: depan Author: google File: NodeStatsViewPart.java License: Apache License 2.0 | 6 votes |
@SuppressWarnings("unused") private Group setupOptions(Composite parent) { Group result = Widgets.buildGridGroup(parent, "Statistics Options", 2); Label relSetLabel = Widgets.buildCompactLabel(result, "Edges: "); matcherChoice = new EdgeMatcherSelectorControl(result); matcherChoice.setLayoutData(Widgets.buildHorzFillData()); Button updateBtn = Widgets.buildCompactPushButton( result, "Update Statistics"); GridData updateLayout = Widgets.getLayoutData(updateBtn); updateLayout.horizontalSpan = 2; updateLayout.horizontalAlignment = SWT.TRAIL; updateBtn.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { updateStats(); } }); return result; }
Example #5
Source Project: tmxeditor8 Author: heartsome File: PromptDialog.java License: GNU General Public License v2.0 | 6 votes |
/** * Create contents of the dialog. * @param parent */ @Override protected Control createDialogArea(Composite parent) { Composite container = (Composite) super.createDialogArea(parent); Label label = new Label(container, SWT.NONE); label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1)); label.setText(Messages.getString("dialog.PromptDialog.label")); for (String toolId : toolIds) { final Button btn = new Button(container, SWT.RADIO); btn.setText(toolId); btn.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); btn.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (btn.getSelection()) { choiceResult = btn.getText(); } } }); } return container; }
Example #6
Source Project: Eclipse-Postfix-Code-Completion Author: trylimits File: SortMembersMessageDialog.java License: Eclipse Public License 1.0 | 6 votes |
private Control createLinkControl(Composite composite) { Link link= new Link(composite, SWT.WRAP | SWT.RIGHT); link.setText(DialogsMessages.SortMembersMessageDialog_description); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { openMembersSortOrderPage(); } }); link.setToolTipText(DialogsMessages.SortMembersMessageDialog_link_tooltip); GridData gridData= new GridData(GridData.FILL, GridData.CENTER, true, false); gridData.widthHint= convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);//convertWidthInCharsToPixels(60); link.setLayoutData(gridData); link.setFont(composite.getFont()); return link; }
Example #7
Source Project: neoscada Author: eclipse File: DetailsPart.java License: Eclipse Public License 1.0 | 6 votes |
private void createButton ( final Composite parent ) { this.wrapper = new Composite ( parent, SWT.NONE ); final GridLayout layout = new GridLayout ( 1, true ); layout.marginHeight = layout.marginWidth = 0; this.wrapper.setLayout ( layout ); this.startButton = new Button ( this.wrapper, SWT.PUSH ); this.startButton.setLayoutData ( new GridData ( SWT.CENTER, SWT.CENTER, true, true ) ); this.startButton.setText ( Messages.DetailsPart_startButton_label ); this.startButton.addSelectionListener ( new SelectionAdapter () { @Override public void widgetSelected ( final SelectionEvent e ) { try { start (); } catch ( final Exception ex ) { logger.error ( "Failed to start chart", ex ); //$NON-NLS-1$ StatusManager.getManager ().handle ( StatusHelper.convertStatus ( Activator.PLUGIN_ID, ex ), StatusManager.BLOCK ); } } } ); }
Example #8
Source Project: bonita-studio Author: bonitasoft File: DocumentWizardPage.java License: GNU General Public License v2.0 | 6 votes |
private Button createRadioButtonMultiple(final Composite compo) { final Button radioButtonMultiple = new Button(compo, SWT.RADIO); radioButtonMultiple.setText(Messages.radioButtonMultiple); radioButtonMultiple.setLayoutData(GridDataFactory.swtDefaults().create()); final ControlDecoration infoBonita = new ControlDecoration(radioButtonMultiple, SWT.RIGHT); infoBonita.show(); infoBonita.setImage(Pics.getImage(PicsConstants.hint)); infoBonita.setDescriptionText(Messages.radioButtonMultipleToolTip); radioButtonMultiple.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(final SelectionEvent e) { if (radioButtonMultiple.getSelection()) { updateSingleMultipleStack(true); } } }); return radioButtonMultiple; }
Example #9
Source Project: Eclipse-Postfix-Code-Completion Author: trylimits File: CustomFiltersActionGroup.java License: Eclipse Public License 1.0 | 6 votes |
@Override public void fill(Menu menu, int index) { MenuItem mi= new MenuItem(menu, SWT.CHECK, index); mi.setText("&" + fItemNumber + " " + fFilterName); //$NON-NLS-1$ //$NON-NLS-2$ /* * XXX: Don't set the image - would look bad because other menu items don't provide image * XXX: Get working set specific image name from XML - would need to cache icons */ // mi.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_JAVA_WORKING_SET)); mi.setSelection(fState); mi.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { fState= !fState; fActionGroup.setFilter(fFilterId, fState); } }); }
Example #10
Source Project: bonita-studio Author: bonitasoft File: ConfigureCoolbarItem.java License: GNU General Public License v2.0 | 6 votes |
@Override public void fill(final ToolBar toolbar, final int index, final int iconSize) { final ToolItem item = new ToolItem(toolbar, SWT.PUSH); item.setToolTipText(Messages.ConfigureButtonLabel); item.setData(SWTBotConstants.SWTBOT_WIDGET_ID_KEY, SWTBotConstants.SWTBOT_ID_CONFIGURE_TOOLITEM); if (iconSize < 0) { item.setImage(Pics.getImage(PicsConstants.coolbar_configure_48)); item.setDisabledImage(Pics.getImage(PicsConstants.coolbar_configure_disabled_48)); } else { item.setImage(Pics.getImage(PicsConstants.coolbar_configure_16)); item.setDisabledImage(Pics.getImage(PicsConstants.coolbar_configure_disabled_16)); } item.setEnabled(false); item.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(final SelectionEvent e) { final Command cmd = getCommand(); try { cmd.executeWithChecks(new ExecutionEvent()); } catch (final Exception ex) { BonitaStudioLog.error(ex); } } }); }
Example #11
Source Project: birt Author: eclipse File: ImageBuilder.java License: Eclipse Public License 1.0 | 6 votes |
private void buildEmbeddedImageList( ) { embeddedImageList = new List( inputArea, SWT.NONE | SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL ); embeddedImageList.setLayoutData( new GridData( GridData.FILL_BOTH ) ); embeddedImageList.addSelectionListener( new SelectionAdapter( ) { public void widgetSelected( SelectionEvent event ) { preview( ); modifyDialogContent( ); updateButtons( ); } } ); initList( ); }
Example #12
Source Project: Eclipse-Postfix-Code-Completion Author: trylimits File: ModifyDialogTabPage.java License: Eclipse Public License 1.0 | 6 votes |
/** * Create a new CheckboxPreference. * @param composite The composite on which the SWT widgets are added. * @param numColumns The number of columns in the composite's GridLayout. * @param preferences The map to store the values. * @param key The key to store the values. * @param values An array of two elements indicating the values to store on unchecked/checked. * @param text The label text for this Preference. * @param style SWT style flag for the button */ public ButtonPreference(Composite composite, int numColumns, Map<String, String> preferences, String key, String [] values, String text, int style) { super(preferences, key); if (values == null || text == null) throw new IllegalArgumentException(FormatterMessages.ModifyDialogTabPage_error_msg_values_text_unassigned); fValues= values; fCheckbox= new Button(composite, style); fCheckbox.setText(text); fCheckbox.setLayoutData(createGridData(numColumns, GridData.FILL_HORIZONTAL, SWT.DEFAULT)); fCheckbox.setFont(composite.getFont()); updateWidget(); fCheckbox.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { checkboxChecked(((Button)e.widget).getSelection()); } }); }
Example #13
Source Project: birt Author: eclipse File: SelectVariableDialog.java License: 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 #14
Source Project: gama Author: gama-platform File: EditorMenu.java License: GNU General Public License v3.0 | 6 votes |
private void createOverviewToggle(final Menu menu) { final MenuItem overview = new MenuItem(menu, SWT.CHECK); overview.setText(" Show markers overview"); overview.setSelection(getEditor().isOverviewRulerVisible()); overview.setImage(GamaIcons.create("toggle.overview").image()); overview.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(final SelectionEvent e) { final boolean shown = getEditor().isOverviewRulerVisible(); if (shown) { getEditor().hideOverviewRuler(); } else { getEditor().showOverviewRuler(); } } }); }
Example #15
Source Project: tmxeditor8 Author: heartsome File: PluginConfigManageDialog.java License: GNU General Public License v2.0 | 6 votes |
private void createSwitchCmp(Composite tparent) { Composite cmp = new Composite(tparent, SWT.NONE); GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(cmp); GridLayoutFactory.swtDefaults().numColumns(3).applyTo(cmp); Label switchLbl = new Label(cmp, SWT.NONE); switchLbl.setText(Messages.getString("dialog.PluginConfigManageDialog.switchLbl")); switchTxt = new Text(cmp, SWT.BORDER); GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(switchTxt); switchBrowseBtn = new Button(cmp, SWT.NONE); switchBrowseBtn.setText(Messages.getString("dialog.PluginConfigManageDialog.switchBrowseBtn")); switchBrowseBtn.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { String fileLocation = browseFile(Messages.getString("dialog.PluginConfigManageDialog.dialogTitle2"), null, null); switchTxt.setText(fileLocation == null ? "" : fileLocation); } }); }
Example #16
Source Project: texlipse Author: eclipse File: StyleListFieldEditor.java License: Eclipse Public License 1.0 | 6 votes |
/** * Creates and returns the contents of an area of the dialog which appears * below the message and above the button bar. * * This implementation creates two labels and two textfields. * * @param parent parent composite to contain the custom area * @return the custom area control, or <code>null</code> */ protected Control createCustomArea(Composite parent) { Composite composite = new Composite(parent, SWT.NULL); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); composite.setLayout(new GridLayout()); skVarList = new List(composite, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); skVarList.setLayoutData(new GridData(GridData.FILL_BOTH)); skVarList.setItems(items); skVarList.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { selections = skVarList.getSelectionIndices(); }}); return composite; }
Example #17
Source Project: nebula Author: eclipse File: TransitionManager.java License: Eclipse Public License 2.0 | 6 votes |
/** * Constructs a transition manager to handle transitions on the provided * transitionable object. * @param transitionable the transitionable object to perform transitions on */ public TransitionManager(final Transitionable transitionable) { _transitionable = transitionable; _listeners = new ArrayList<TransitionListener>(); backgroundColor = Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND); //the selected item before the one to be transitioned to _lastItem = transitionable.getSelection(); transitionable.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { try { //the item to be transitioned to int currentItem = _transitionable.getSelection(); startTransition(_lastItem, currentItem, transitionable.getDirection(currentItem, _lastItem)); //now the item transition ends on will be used //to start transition from next time _lastItem = currentItem; } catch(Exception e) { e.printStackTrace(); } }}); }
Example #18
Source Project: spotbugs Author: spotbugs File: ReportConfigurationTab.java License: GNU Lesser General Public License v2.1 | 6 votes |
private void createPriorityGroup(Composite parent) { Composite prioGroup = new Composite(parent, SWT.NONE); prioGroup.setLayout(new GridLayout(2, false)); Label minPrioLabel = new Label(prioGroup, SWT.NONE); minPrioLabel.setText(getMessage("property.minPriority")); minPrioLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false)); minPriorityCombo = new Combo(prioGroup, SWT.DROP_DOWN | SWT.READ_ONLY); minPriorityCombo.add(ProjectFilterSettings.HIGH_PRIORITY); minPriorityCombo.add(ProjectFilterSettings.MEDIUM_PRIORITY); minPriorityCombo.add(ProjectFilterSettings.LOW_PRIORITY); minPriorityCombo.setText(propertyPage.getOriginalUserPreferences().getFilterSettings().getMinPriority()); minPriorityCombo.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false)); minPriorityCombo.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { String data = minPriorityCombo.getText(); getCurrentProps().getFilterSettings().setMinPriority(data); } }); }
Example #19
Source Project: nebula Author: eclipse File: CheckBoxGroup.java License: Eclipse Public License 2.0 | 6 votes |
private void createCheckBoxButton() { button = new Button(this, SWT.CHECK); final GridData gdButton = new GridData(GridData.BEGINNING, GridData.CENTER, true, false); gdButton.horizontalIndent = 15; button.setLayoutData(gdButton); button.setSelection(true); button.pack(); button.addSelectionListener(new SelectionAdapter() { /** * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent) */ @Override public void widgetSelected(final SelectionEvent e) { e.doit = fireSelectionListeners(e); if (!e.doit) { return; } if (button.getSelection()) { activate(); } else { deactivate(); } } }); }
Example #20
Source Project: elexis-3-core Author: elexis File: ContactSorterSwitcher.java License: Eclipse Public License 1.0 | 6 votes |
@Override public void fill(Menu menu, int index){ for (final ContactSelectorViewerComparator.sorter sortMethod : ContactSelectorViewerComparator.sorter .values()) { MenuItem temp = new MenuItem(menu, SWT.CHECK, index); temp.setData(sortMethod); temp.setText(sortMethod.label); temp.setSelection(ContactSelectorViewerComparator.getSelectedSorter() .equals(sortMethod)); temp.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e){ ContactSelectorViewerComparator.setSelectedSorter(sortMethod); } }); } }
Example #21
Source Project: nebula Author: eclipse File: ColumnsSnippet.java License: Eclipse Public License 2.0 | 6 votes |
private static void createForceSelection(final Shell shell, final ColumnBrowserWidget cbw, final ColumnItem item) { final Button button = new Button(shell, SWT.PUSH); button.setLayoutData(new GridData(GridData.END, GridData.FILL, false, false)); button.setText("Force selection"); button.addSelectionListener(new SelectionAdapter() { /** * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent) */ @Override public void widgetSelected(final SelectionEvent e) { cbw.select(item); } }); }
Example #22
Source Project: Eclipse-Postfix-Code-Completion Author: trylimits File: ChangeParametersControl.java License: Eclipse Public License 1.0 | 6 votes |
private Button createEditButton(Composite buttonComposite) { Button button= new Button(buttonComposite, SWT.PUSH); button.setText(RefactoringMessages.ChangeParametersControl_buttons_edit); button.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); SWTUtil.setButtonDimensionHint(button); button.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { try { ParameterInfo[] selected= getSelectedElements(); Assert.isTrue(selected.length == 1); ParameterInfo parameterInfo= selected[0]; ParameterEditDialog dialog= new ParameterEditDialog(getShell(), parameterInfo, fMode.canChangeTypes(), fMode.canChangeDefault(), fTypeContext); dialog.open(); fListener.parameterChanged(parameterInfo); fTableViewer.update(parameterInfo, PROPERTIES); } finally { fTableViewer.getControl().setFocus(); } } }); return button; }
Example #23
Source Project: xds-ide Author: excelsior-oss File: TabPageNewLines.java License: Eclipse Public License 1.0 | 6 votes |
private void mkChkbox(final NewlineSetting ss, int initValue, final boolean isBefore) { // initValue: 0 - don't insert, remove if any // 1,2.. lines to insert, // -1 - do nothing // -2 - don't show control // Now we use only -1, 1 or -2 (but formatter may support all) if (initValue == -1 || initValue == 1) { final Button cb = SWTFactory.createCheckbox(fPropsGroup, isBefore ? Messages.TabPageNewLines_InsNewlineBefore : Messages.TabPageNewLines_InsNewlineAfter, 2); optsControls.add(cb); cb.setSelection(initValue == 1); cb.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { int val = cb.getSelection() ? 1 : -1; if (isBefore) { fp.setInsNewLineBefore(ss, val); } else { fp.setInsNewLineAfter(ss, val); } fPreview.setProfile(fp); } }); } }
Example #24
Source Project: pentaho-kettle Author: pentaho File: DirectoryDialogButtonListenerFactory.java License: Apache License 2.0 | 6 votes |
public static final SelectionAdapter getSelectionAdapter( final Shell shell, final Text destination ) { // Listen to the Browse... button return new SelectionAdapter() { public void widgetSelected( SelectionEvent e ) { DirectoryDialog dialog = new DirectoryDialog( shell, SWT.OPEN ); if ( destination.getText() != null ) { String fpath = destination.getText(); // String fpath = StringUtil.environmentSubstitute(destination.getText()); dialog.setFilterPath( fpath ); } if ( dialog.open() != null ) { String str = dialog.getFilterPath(); destination.setText( str ); } } }; }
Example #25
Source Project: xds-ide Author: excelsior-oss File: SDKsPreferencePage.java License: Eclipse Public License 1.0 | 5 votes |
@Override public void createControl(Composite parent) { super.createControl(parent); getDefaultsButton().setVisible(false); getApplyButton().setEnabled(false); getApplyButton().addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { getApplyButton().setEnabled(false); } }); }
Example #26
Source Project: elexis-3-core Author: elexis File: GenericSelectionComposite.java License: Eclipse Public License 1.0 | 5 votes |
@Override protected Control createDialogArea(Composite parent){ Composite ret = (Composite) super.createDialogArea(parent); ScrolledComposite sc = new ScrolledComposite(ret, SWT.H_SCROLL | SWT.V_SCROLL); Composite child = new Composite(sc, SWT.NONE); child.setLayout(new GridLayout()); GridData data = new GridData(SWT.FILL, SWT.FILL, true, true); data.heightHint = 400; sc.setLayoutData(data); Label title = new Label(child, SWT.NONE); title.setText("Auswahl:"); // create the UI for (Object object : input) { Button button = new Button(child, SWT.CHECK); button.setText(getLabel(object)); button.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e){ if (button.getSelection()) { selection.add(object); } else { selection.remove(object); } } }); buttonMap.put(object, button); } sc.setMinSize(child.computeSize(SWT.DEFAULT, SWT.DEFAULT)); sc.setExpandHorizontal(true); sc.setExpandVertical(true); sc.setContent(child); updateSelectionUi(); return ret; }
Example #27
Source Project: eip-designer Author: lbroudoux File: ServiceActivatorPropertiesEditionPartImpl.java License: Apache License 2.0 | 5 votes |
/** * */ protected Composite createToChannelsAdvancedReferencesTable(Composite parent) { String label = getDescription(EipViewsRepository.ServiceActivator.Properties.toChannels, EipMessages.ServiceActivatorPropertiesEditionPart_ToChannelsLabel); this.toChannels = new ReferencesTable(label, new ReferencesTableListener() { public void handleAdd() { addToChannels(); } public void handleEdit(EObject element) { editToChannels(element); } public void handleMove(EObject element, int oldIndex, int newIndex) { moveToChannels(element, oldIndex, newIndex); } public void handleRemove(EObject element) { removeFromToChannels(element); } public void navigateTo(EObject element) { } }); this.toChannels.setHelpText(propertiesEditionComponent.getHelpContent(EipViewsRepository.ServiceActivator.Properties.toChannels, EipViewsRepository.SWT_KIND)); this.toChannels.createControls(parent); this.toChannels.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { if (e.item != null && e.item.getData() instanceof EObject) { propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ServiceActivatorPropertiesEditionPartImpl.this, EipViewsRepository.ServiceActivator.Properties.toChannels, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData())); } } }); GridData toChannelsData = new GridData(GridData.FILL_HORIZONTAL); toChannelsData.horizontalSpan = 3; this.toChannels.setLayoutData(toChannelsData); this.toChannels.disableMove(); toChannels.setID(EipViewsRepository.ServiceActivator.Properties.toChannels); toChannels.setEEFType("eef::AdvancedReferencesTable"); //$NON-NLS-1$ return parent; }
Example #28
Source Project: hop Author: project-hop File: CommonTransformDialog.java License: Apache License 2.0 | 5 votes |
protected Button buildGetFieldsButton( final Composite parent, final SelectionAdapter listener ) { // get fields button wGet = new Button( parent, SWT.PUSH ); updateGetFieldsButtonStatus(); wGet.setText( BaseMessages.getString( PKG, "CommonTransformDialog.Button.GetFields" ) ); //$NON-NLS-1$ props.setLook( wGet ); wGet.setLayoutData( new FormDataBuilder().right( 100, 0 ).bottom( 100, 0 ).result() ); wGet.addSelectionListener( listener ); return wGet; }
Example #29
Source Project: gwt-eclipse-plugin Author: gwt-plugins File: WebAppHostPageSelectionDialog.java License: Eclipse Public License 1.0 | 5 votes |
protected void createExternalUI(Composite parent) { createExternalRootContentArea(parent); SWTFactory.createVerticalSpacer(parent, 16); useProjectFileCheckbox = new Button(parent, SWT.CHECK); useProjectFileCheckbox.setText("Select an HTML page:"); useProjectFileCheckbox.setSelection(true); useProjectFileCheckbox.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { boolean enabled = useProjectFileCheckbox.getSelection(); useFile = enabled; SWTUtilities.setEnabledRecursive(fileSelectionGroup, enabled); if (enabled) { updateStatus(oldStatus); } else { // save the current status so that if the user re-enables the file // selector, // if it was in a bad state (ie, no selection), that state is // restored. if (status != null) { oldStatus = status; } else { oldStatus = OK_STATUS; } // it's ok to blast the current state because it doesn't depend on // anything new added to the UI (specifically, the external server // text) updateStatus(OK_STATUS); } updateUrlLabelText(); } }); }
Example #30
Source Project: google-cloud-eclipse Author: GoogleCloudPlatform File: NewDataflowProjectWizardLandingPage.java License: Apache License 2.0 | 5 votes |
private SelectionListener templateVersionListener() { return new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { updateArchetypeVersion(); } }; }