Examples of RadioButtonsGroup


Examples of net.sourceforge.ztail.ui.wrappers.RadioButtonsGroup

    LayoutUtils.setLeft(in_1.getContainer(), 0);
    LayoutUtils.setRight(in_1.getContainer(), findBtn.getContainer(), -5, SWT.LEFT);
    input = in_1.getText();
    input.setFocus();
   
    directionGroup = new RadioButtonsGroup(shell);
    directionGroup.labelCaption = "Direction:";
    directionGroup.addButton("Up");
    directionGroup.addButton("Down");
    directionGroup.buildUp();
    directionGroup.getByName("Down").setSelection(true);
View Full Code Here

Examples of org.eclipse.sapphire.ui.forms.swt.RadioButtonsGroup

                    final PropertyEditorAssistDecorator decorator = new PropertyEditorAssistDecorator( part, property, typeSelectorComposite );
                    decorator.control().setLayoutData( gdhindent( gdvalign( gd(), ( style == Style.DROP_DOWN_LIST ? SWT.TOP : SWT.CENTER ) ), ( showLabel ? 3 : 0 ) ) );
                   
                    if( style == Style.RADIO_BUTTONS )
                    {
                        final RadioButtonsGroup radioButtonsGroup = new RadioButtonsGroup( typeSelectorComposite, false );
                        radioButtonsGroup.setLayoutData( gdhfill() );
                       
                        final Map<ElementType,Button> typeToButton = new HashMap<ElementType,Button>();
                        final Map<Button,ElementType> buttonToType = new HashMap<Button,ElementType>();
                       
                        for( final ElementType type : allPossibleTypes )
                        {
                            final String label = type.getLabel( true, CapitalizationType.FIRST_WORD_ONLY, false );
                            final Button button = radioButtonsGroup.addRadioButton( label );
                            typeToButton.put( type, button );
                            buttonToType.put( button, type );
                            decorator.addEditorControl( button );
                            actionPresentationKeyboard.attach( button );
                            attachHelp( button, property );
                        }
                       
                        final Button noneButton = radioButtonsGroup.addRadioButton( noneSelection.text() );
                        noneButton.setVisible( false );
                        decorator.addEditorControl( noneButton );
                        actionPresentationKeyboard.attach( noneButton );
                        attachHelp( noneButton, property );
                       
                        updateUserInterfaceOp = new Runnable()
                        {
                            public void run()
                            {
                                if( Display.getCurrent() == null )
                                {
                                    radioButtonsGroup.getDisplay().asyncExec( this );
                                    return;
                                }
                               
                                final Element subModelElement = ( (ElementHandle<?>) property ).content();
                                final Button button;
                               
                                if( subModelElement == null )
                                {
                                    button = noneButton;
                                    noneButton.setVisible( true );
                                }
                                else
                                {
                                    button = typeToButton.get( subModelElement.type() );
                                    noneButton.setVisible( false );
                                }
                               
                                if( radioButtonsGroup.getSelection() != button )
                                {
                                    radioButtonsGroup.setSelection( button );
                                }
                               
                                radioButtonsGroup.setEnabled( property.enabled() );
                            }
                        };
                               
                        radioButtonsGroup.addSelectionListener
                        (
                            new SelectionAdapter()
                            {
                                @Override
                                public void widgetSelected( final SelectionEvent event )
                                {
                                    try
                                    {
                                        final ElementHandle<?> handle = (ElementHandle<?>) property;
                                        final Button button = radioButtonsGroup.getSelection();
                                       
                                        if( button == noneButton )
                                        {
                                            handle.clear();
                                        }
View Full Code Here

Examples of org.eclipse.sapphire.ui.forms.swt.RadioButtonsGroup

            decorator = createDecorator( composite );
            decorator.addEditorControl( composite );
            decorator.control().setLayoutData( gdvindent( gdvalign( gd(), SWT.TOP ), 4 ) );
           
            this.control = new RadioButtonsGroup( composite, true );
            this.control.setLayoutData( gdhfill() );
        }
        else
        {
            final Composite composite = createMainComposite( parent );
            composite.setLayout( glspacing( glayout( 2, 0, 0 ), 2 ) );
           
            decorator = createDecorator( composite );
            decorator.addEditorControl( composite );
           
            decorator.control().setLayoutData( gdvalign( gd(), SWT.CENTER ) );

            this.control = new RadioButtonsGroup( composite, false );
            this.control.setLayoutData( gdhfill() );
        }
   
        this.binding = new RadioButtonGroupBinding( this, this.control );           
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.