List<VFSScheme> availableVFSSchemes = getAvailableVFSSchemes(); availableVFSSchemes.forEach( scheme -> wLocation.add( scheme.schemeName ) ); wLocation.addListener( SWT.Selection, event -> { this.selectedVFSScheme = availableVFSSchemes.get( wLocation.getSelectionIndex() ); this.wPath.setText( "" );
fdSubStep.width = 250; wSubStep.setLayoutData( fdSubStep ); wSubStep.getCComboWidget().addListener( SWT.FocusIn, this::populateSubSteps );
wOK.addListener( SWT.Selection, lsOK ); wbTable.addListener( SWT.Selection, lsbTable ); wDatefrom.addListener( SWT.Selection, lsDatefrom ); wDatefrom.addListener( SWT.FocusOut, lsDatefrom );
wMessageField.getCComboWidget().addListener( SWT.FocusIn, lsMessageFocus );
wType.addListener( SWT.Selection, new Listener() { public void handleEvent( Event arg0 ) { enableDisableControls();
fieldDropDownCombo.getCComboWidget().addListener( SWT.FocusIn, focusListener ); return fieldDropDownCombo;
ComboVar widget = (ComboVar) combo; if ( lsFocusInTabItem != null ) { widget.getCComboWidget().addListener( SWT.FocusIn, lsFocusInTabItem ); } else { widget.setItems( opt );
private void createEnterpriseAppsControls(Composite labelsGroup) { enterpriseApplicationLabel = new Label(labelsGroup, SWT.NONE); enterpriseApplicationLabel.setText(ManifestUIResourceHandler.EAR_Project_Name__UI__UI_); availableAppsCombo = new CCombo(labelsGroup, SWT.READ_ONLY | SWT.BORDER); GridData gd = new GridData(GridData.FILL_HORIZONTAL); availableAppsCombo.setLayoutData(gd); availableAppsCombo.addListener(SWT.Selection, this); }
if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Selection,typedListener); addListener (SWT.DefaultSelection,typedListener);
if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Selection,typedListener); addListener (SWT.DefaultSelection,typedListener);
/** * Adds the listener to the collection of listeners who will * be notified when the receiver's text is modified, by sending * it one of the messages defined in the <code>ModifyListener</code> * interface. * * @param listener the listener which should be notified * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @see ModifyListener * @see #removeModifyListener */ public void addModifyListener (ModifyListener listener) { checkWidget(); if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Modify, typedListener); } /**
/** * Adds the listener to the collection of listeners who will * be notified when the receiver's text is modified, by sending * it one of the messages defined in the <code>ModifyListener</code> * interface. * * @param listener the listener which should be notified * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @see ModifyListener * @see #removeModifyListener */ public void addModifyListener (ModifyListener listener) { checkWidget(); if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Modify, typedListener); } /**
/** * Adds the listener to the collection of listeners who will * be notified when the receiver's text is modified, by sending * it one of the messages defined in the <code>ModifyListener</code> * interface. * * @param listener the listener which should be notified * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @see ModifyListener * @see #removeModifyListener */ public void addModifyListener( ModifyListener listener ) { checkWidget(); if( listener == null ) { SWT.error( SWT.ERROR_NULL_ARGUMENT ); } TypedListener typedListener = new TypedListener( listener ); addListener( SWT.Modify, typedListener ); }
/** * Adds the listener to the collection of listeners who will * be notified when the receiver's text is verified, by sending * it one of the messages defined in the <code>VerifyListener</code> * interface. * * @param listener the listener which should be notified * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @see VerifyListener * @see #removeVerifyListener * */ public void addVerifyListener( VerifyListener listener ) { checkWidget(); if( listener == null ) { SWT.error( SWT.ERROR_NULL_ARGUMENT ); } TypedListener typedListener = new TypedListener( listener ); addListener( SWT.Verify, typedListener ); }
/** * Adds the listener to the collection of listeners who will * be notified when the receiver's text is modified, by sending * it one of the messages defined in the <code>ModifyListener</code> * interface. * * @param listener the listener which should be notified * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @see ModifyListener * @see #removeModifyListener */ public void addModifyListener (ModifyListener listener) { checkWidget(); if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Modify, typedListener); } /**
/** * Adds the listener to the collection of listeners who will * be notified when the receiver's text is verified, by sending * it one of the messages defined in the <code>VerifyListener</code> * interface. * * @param listener the listener which should be notified * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @see VerifyListener * @see #removeVerifyListener * * @since 3.3 */ public void addVerifyListener (VerifyListener listener) { checkWidget(); if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Verify,typedListener); } void arrowEvent (Event event) {
/** * Adds the listener to the collection of listeners who will * be notified when the receiver's text is verified, by sending * it one of the messages defined in the <code>VerifyListener</code> * interface. * * @param listener the listener which should be notified * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @see VerifyListener * @see #removeVerifyListener * * @since 3.3 */ public void addVerifyListener (VerifyListener listener) { checkWidget(); if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Verify,typedListener); } void arrowEvent (Event event) {
/** * Adds the listener to the collection of listeners who will * be notified when the receiver's text is verified, by sending * it one of the messages defined in the <code>VerifyListener</code> * interface. * * @param listener the listener which should be notified * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @see VerifyListener * @see #removeVerifyListener * * @since 3.3 */ public void addVerifyListener (VerifyListener listener) { checkWidget(); if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Verify,typedListener); } void arrowEvent (Event event) {
/** * New C combo with tip. * * @param parent the parent * @param tip the tip * @return the c combo */ protected CCombo newCComboWithTip(Composite parent, String tip) { CCombo ccombo = new CCombo(parent, SWT.FLAT | SWT.READ_ONLY); toolkit.adapt(ccombo, false, false); ccombo.setToolTipText(tip); ccombo.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING)); ccombo.addListener(SWT.Selection, this); // Make the CCombo's border visible since CCombo is NOT a widget supported // by FormToolkit. // needed apparently by RedHat Linux ccombo.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TREE_BORDER); return ccombo; }
@Override protected Control createEditorControl(Widget item) { TreeItem treeItem = (TreeItem)item; if (treeItem != null) { Object data = treeItem.getData(); if (data instanceof GenPackage) { GenPackage genPackage = (GenPackage)data; ModelExporter.ReferencedGenPackageExportInfo genPackageInfo = getModelExporter().getReferencedGenPackageExportInfo(genPackage); if (genPackageInfo.isValidReference()) { CCombo combo = new CCombo(treeItem.getParent(), SWT.READ_ONLY | SWT.FLAT); combo.addListener(SWT.Selection, this); initializeCombo(combo, genPackage); return combo; } } } return null; }