Package org.eclipse.jface.fieldassist

Examples of org.eclipse.jface.fieldassist.ContentProposalAdapter


            }
        } );

        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


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

            // 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, SEP_MAXCOUNT, 1 );
View Full Code Here

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

        // 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 );

        applyDialogFont( composite );
View Full Code Here

            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

        administrativeRoleCombo = ( Combo ) administrativeRoleComboField.getControl();
        administrativeRoleCombo.setItems( administrativeRoleValues );
        administrativeRoleCombo.setText( initialValue );

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

        applyDialogFont( composite );
View Full Code Here

        objectClassCombo = ( Combo ) objectClassComboField.getControl();
        objectClassCombo.setItems( allOcNames );
        objectClassCombo.setText( initialValue );

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

        applyDialogFont( composite );
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

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

        rdnLine.rdnNameCPA = new ContentProposalAdapter( rdnLine.rdnTypeCombo, 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

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

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

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

                    handleKeySelected(keys[0]);
                }
                // Auto completion
                SimpleContentProposalProvider proposalProvider = new SimpleContentProposalProvider(keys);
                proposalProvider.setFiltering(true);
                ContentProposalAdapter adapter = new ContentProposalAdapter(combo, new ComboContentAdapter(),
                        proposalProvider, null, null);
                adapter.setPropagateKeys(true);
                adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
                adapter.addContentProposalListener(new IContentProposalListener() {
                    @Override
                    public void proposalAccepted(IContentProposal proposal) {
                        handleKeySelected(proposal.getContent());
                    }
                });
View Full Code Here

TOP

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

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.