Package org.eclipse.jface.fieldassist

Examples of org.eclipse.jface.fieldassist.ComboContentAdapter


            typeCombo = ( Combo ) typeComboField.getControl();
            typeCombo.setItems( allAtNames );
            typeCombo.setText( initialType );

            // content proposal adapter
            typeCPA = new ContentProposalAdapter( typeCombo, new ComboContentAdapter(),
                new ListContentProposalProvider( typeCombo.getItems() ), null, null );
            typeCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
            typeCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );

            BaseWidgetUtils.createLabel( composite, SEP_VALUESIN, 1 );

            valuesInComboField = new DecoratedField( composite, SWT.NONE, new IControlCreator()
            {
                public Control createControl( Composite parent, int style )
                {
                    Combo combo = BaseWidgetUtils.createCombo( parent, new String[0], -1, 1 );
                    combo.setVisibleItemCount( 20 );
                    return combo;
                }
            } );
            valuesInComboField.addFieldDecoration( fieldDecoration, SWT.TOP | SWT.LEFT, true );
            valuesInComboField.getLayoutControl().setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
            valuesInCombo = ( Combo ) valuesInComboField.getControl();
            valuesInCombo.setItems( allAtNames );
            valuesInCombo.setText( initialValuesIn );

            // content proposal adapter
            valuesInCPA = new ContentProposalAdapter( valuesInCombo, new ComboContentAdapter(),
                new ListContentProposalProvider( valuesInCombo.getItems() ), null, null );
            valuesInCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
            valuesInCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );

            BaseWidgetUtils.createLabel( composite, R_CURLY, 1 );
View Full Code Here


        attributeTypeCombo = ( Combo ) attributeTypeComboField.getControl();
        attributeTypeCombo.setItems( allAtNames );
        attributeTypeCombo.setText( initialAttributeType );

        // content proposal adapter
        attributeTypeCPA = new ContentProposalAdapter( attributeTypeCombo, new ComboContentAdapter(),
            new ListContentProposalProvider( attributeTypeCombo.getItems() ), null, null );
        attributeTypeCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
        attributeTypeCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );

        BaseWidgetUtils.createLabel( composite, " = ", 1 ); //$NON-NLS-1$
View Full Code Here

        attributeTypeCombo = ( Combo ) attributeTypeComboField.getControl();
        attributeTypeCombo.setItems( possibleAttributeTypes );
        attributeTypeCombo.setText( parsedAttributeType );

        // content proposal adapter
        attributeTypeCPA = new ContentProposalAdapter (attributeTypeCombo, new ComboContentAdapter(),
            new ListContentProposalProvider( attributeTypeCombo.getItems() ), null, null );
        attributeTypeCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
        attributeTypeCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE )

        BaseWidgetUtils.createSpacer( composite, 1 );
View Full Code Here

        innerComposite = BaseWidgetUtils.createColumnContainer( composite, 5, 1 );

        String[] attributes = HistoryUtils.load( ATTRIBUTE_HISTORY_DIALOGSETTING_KEY );
        quickSearchAttributeCombo = BaseWidgetUtils.createCombo( innerComposite, attributes, -1, 1 );
        quickSearchAttributePP = new ListContentProposalProvider( attributes );
        new ExtendedContentAssistCommandAdapter( quickSearchAttributeCombo, new ComboContentAdapter(),
            quickSearchAttributePP, null, null, true );
        quickSearchAttributeCombo.addModifyListener( new ModifyListener()
        {
            public void modifyText( ModifyEvent e )
            {
                quickSearchRunButton.setEnabled( !"".equals( quickSearchAttributeCombo.getText() ) );
            }
        } );
        quickSearchAttributeCombo.addSelectionListener( new SelectionAdapter()
        {
            public void widgetDefaultSelected( SelectionEvent e )
            {
                performSearch();
            }
        } );
        GridData gd = new GridData( GridData.FILL_HORIZONTAL );
        gd.widthHint = 50;
        quickSearchAttributeCombo.setLayoutData( gd );

        String[] operators = new String[]
            { "=", "!=", "<=", ">=", "~=" };
        quickSearchOperatorCombo = BaseWidgetUtils.createReadonlyCombo( innerComposite, operators, 0, 1 );
        GridData data = new GridData();
        quickSearchOperatorCombo.setLayoutData( data );

        String[] values = HistoryUtils.load( VALUE_HISTORY_DIALOGSETTING_KEY );
        quickSearchValueCombo = BaseWidgetUtils.createCombo( innerComposite, values, -1, 1 );
        quickSearchValuePP = new ListContentProposalProvider( values );
        new ExtendedContentAssistCommandAdapter( quickSearchValueCombo, new ComboContentAdapter(), quickSearchValuePP,
            null, null, true );
        quickSearchValueCombo.addSelectionListener( new SelectionAdapter()
        {
            public void widgetDefaultSelected( SelectionEvent e )
            {
View Full Code Here

        GridData gd = new GridData();
        gd.widthHint = 180;
        rdnLine.rdnNameComboField.getLayoutControl().setLayoutData( gd );
        rdnLine.rdnNameCombo = ( Combo ) rdnLine.rdnNameComboField.getControl();

        rdnLine.rdnNameCPA = new ContentProposalAdapter( rdnLine.rdnNameCombo, new ComboContentAdapter(),
            new ListContentProposalProvider( attributeNames ), null, null );
        rdnLine.rdnNameCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
        rdnLine.rdnNameCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );

        rdnLine.rdnEqualsLabel = new Label( rdnComposite, SWT.NONE );
View Full Code Here

            }
        } );

        parser = new LdapFilterParser();
        contentAssistProcessor = new FilterContentAssistProcessor( parser );
        filterCPA = new ContentProposalAdapter( filterCombo, new ComboContentAdapter(), contentAssistProcessor,
            KeyStroke.getInstance( SWT.CTRL, ' ' ), null );
        filterCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
        filterCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );

        // auto edit strategy
View Full Code Here

            Arrays.sort( allAtNames );

            // type combo with field decoration and content proposal
            typeCombo = BaseWidgetUtils.createCombo( composite, allAtNames, -1, 1 );
            typeCombo.setText( initialType );
            new ExtendedContentAssistCommandAdapter( typeCombo, new ComboContentAdapter(),
                new ListContentProposalProvider( typeCombo.getItems() ), null, null, true );

            BaseWidgetUtils.createLabel( composite, SEP_VALUESIN, 1 );

            // valuesIn combo with field decoration and content proposal
            valuesInCombo = BaseWidgetUtils.createCombo( composite, allAtNames, -1, 1 );
            valuesInCombo.setText( initialValuesIn );
            new ExtendedContentAssistCommandAdapter( valuesInCombo, new ComboContentAdapter(),
                new ListContentProposalProvider( valuesInCombo.getItems() ), null, null, true );

            BaseWidgetUtils.createLabel( composite, R_CURLY, 1 );

            applyDialogFont( composite );
View Full Code Here

        BaseWidgetUtils.createLabel( composite, Messages.getString( "AttributeTypeWizardPage.AttributeTypeLabel" ), 1 ); //$NON-NLS-1$

        // attribute combo with field decoration and content proposal
        attributeTypeCombo = BaseWidgetUtils.createCombo( composite, possibleAttributeTypes, -1, 1 );
        attributeTypeCombo.setText( parsedAttributeType );
        new ExtendedContentAssistCommandAdapter( attributeTypeCombo, new ComboContentAdapter(),
            new ListContentProposalProvider( possibleAttributeTypes ), null, null, true );

        BaseWidgetUtils.createSpacer( composite, 1 );
        showSubschemAttributesOnlyButton = BaseWidgetUtils.createCheckbox( composite, Messages
            .getString( "AttributeTypeWizardPage.ShowSubschemaAttributesOnly" ), //$NON-NLS-1$
View Full Code Here

        Arrays.sort( allAtNames );

        // attribute combo with field decoration and content proposal
        attributeTypeCombo = BaseWidgetUtils.createCombo( composite, allAtNames, -1, 1 );
        attributeTypeCombo.setText( initialAttributeType );
        new ExtendedContentAssistCommandAdapter( attributeTypeCombo, new ComboContentAdapter(),
            new ListContentProposalProvider( attributeTypeCombo.getItems() ), null, null, true );

        BaseWidgetUtils.createLabel( composite, " = ", 1 ); //$NON-NLS-1$

        valueText = BaseWidgetUtils.createText( composite, initialValue, 1 );
View Full Code Here

            Arrays.sort( allAtNames );

            // attribute combo with field decoration and content proposal
            attributeTypeCombo = BaseWidgetUtils.createCombo( composite, allAtNames, -1, 1 );
            attributeTypeCombo.setText( initialType );
            new ExtendedContentAssistCommandAdapter( attributeTypeCombo, new ComboContentAdapter(),
                new ListContentProposalProvider( attributeTypeCombo.getItems() ), null, null, true );

            BaseWidgetUtils.createLabel( composite, SEP_MAXCOUNT, 1 );

            maxCountSpinner = new Spinner( composite, SWT.BORDER );
View Full Code Here

TOP

Related Classes of org.eclipse.jface.fieldassist.ComboContentAdapter

Copyright © 2018 www.massapicom. 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.