Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[bpel-dev] Conflict between two groups of buttons

Hey everybody,

I have conflict problem between two groups of buttons  that drives me crazy.

I have my widget that includes two groups of buttons, one group has button yesRadio and noRadio and the other includes alternativeRadio and strictRadio:


protected void createWidgets(Composite composite) {
       
        FlatFormData data;       
        Label cascadingLabel = fWidgetFactory.createLabel(composite, "Cascading:");    
        yesRadio = fWidgetFactory.createButton(composite, "Yes", SWT.RADIO);
        noRadio = fWidgetFactory.createButton(composite, "No", SWT.RADIO);
        Label alternativeLabel = fWidgetFactory.createLabel(composite, "Type:");
        alternativeRadio = fWidgetFactory.createButton(composite, "Alternative Atomic", SWT.RADIO);
        strictRadio = fWidgetFactory.createButton(composite, "Strict Atomic", SWT.RADIO);
       
        data = "" FlatFormData();
        data.left = new FlatFormAttachment(0, BPELUtil.calculateLabelWidth(cascadingLabel, STANDARD_LABEL_WIDTH_AVG));
        data.top = new FlatFormAttachment(0,  2*IDetailsAreaConstants.VSPACE);
        yesRadio.setLayoutData(data);   
        yesRadio.setData(RadioButtonIValue.VALUE, Boolean.TRUE);   
       
        data = "" FlatFormData();
        data.left = new FlatFormAttachment(yesRadio, IDetailsAreaConstants.HSPACE);
        data.top = new FlatFormAttachment(0,  2*IDetailsAreaConstants.VSPACE);
        noRadio.setLayoutData(data);
        noRadio.setData(RadioButtonIValue.VALUE, Boolean.FALSE);
       
        data = "" FlatFormData();
        data.left = new FlatFormAttachment(0, 0);
        data.top = new FlatFormAttachment(0,  2*IDetailsAreaConstants.VSPACE);
        data.right = new FlatFormAttachment(yesRadio, -IDetailsAreaConstants.HSPACE);
        cascadingLabel.setLayoutData(data);   
           
        data = "" FlatFormData();
        data.left = new FlatFormAttachment(0, BPELUtil.calculateLabelWidth(alternativeLabel, STANDARD_LABEL_WIDTH_AVG));
        data.top = new FlatFormAttachment(yesRadio, 2*IDetailsAreaConstants.VSPACE);
        alternativeRadio.setLayoutData(data);   
        alternativeRadio.setData(RadioButtonIValue.VALUE, Boolean.TRUE);
       
        data = "" FlatFormData();
        data.left = new FlatFormAttachment(alternativeRadio, IDetailsAreaConstants.HSPACE);
        data.top = new FlatFormAttachment(noRadio, 2*IDetailsAreaConstants.VSPACE);
        strictRadio.setLayoutData(data);
        strictRadio.setData(RadioButtonIValue.VALUE, Boolean.FALSE);
       
        data = "" FlatFormData();
        data.left = new FlatFormAttachment(0, 0);
        data.right = new FlatFormAttachment(alternativeRadio, -IDetailsAreaConstants.HSPACE);
        data.top = new FlatFormAttachment(cascadingLabel, 2*IDetailsAreaConstants.VSPACE);
        alternativeLabel.setLayoutData(data);
    }

And then I have written a EditController for each group of buttons as following:
   
    protected void createCascadingController () {
        fCascadingController = createEditController();   
        fCascadingController.setFeature(BPELPackage.eINSTANCE.getAtomic_Cascading() );       
        fCascadingController.setViewIValue(new RadioButtonIValue ( yesRadio , noRadio )) ;
        fCascadingController.startListeningTo(yesRadio,noRadio);
    }
   
    protected void createTypeController () {
       
        fAtomicTypeController = createEditController();   
        fAtomicTypeController.setFeature(BPELPackage.eINSTANCE.getAtomic_AlternativeAtomic() );       
        fAtomicTypeController.setViewIValue(new RadioButtonIValue ( alternativeRadio , strictRadio )) ;
        fAtomicTypeController.startListeningTo(alternativeRadio, strictRadio);
       
    }

But now there is conflict between the two groups of buttons. Can somebody tell me, are there some errors in the code above or there are some other reasons for this problem?

Thanks a lot!

Yunxiao
 






Sicher, schnell, übersichtlich - der Internet Browser vom Marktführer!

Back to the top