Examples of FieldDecoration


Examples of com.centraview.valuelist.FieldDecoration

        lookupDecorationFlag = false;
      }
    }

    if (decoratorMap != null && decoratorMap.containsKey(indexInteger) && lookupDecorationFlag) {
      FieldDecoration decoration = null;
      if (folderName != null && folderName.equals(MailFolderVO.DRAFTS_FOLDER_NAME)) {
        decoration = (FieldDecoration) decoratorMap.get(new Integer(ValueListConstants.ICON_INDEX_FOLDER));
      } else if (folderName != null && folderName.equals(MailFolderVO.TEMPLATES_FOLDER_NAME)) {
        decoration = (FieldDecoration) decoratorMap.get(new Integer(ValueListConstants.ICON_INDEX_EMAIL_TEMPLATES));
      } else if (listTypeInteger.intValue() == ValueListConstants.ITEM_LIST_TYPE && lookupType != null && lookupType.equals("lookup")) {
View Full Code Here

Examples of org.eclipse.jface.fieldassist.FieldDecoration

    }

    public void createContents(Composite parent) {
        FormToolkit toolkit = getManagedForm().getToolkit();

        FieldDecoration assistDecor = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
        KeyStroke assistKeyStroke = null;
        try {
            assistKeyStroke = KeyStroke.getInstance("Ctrl+Space");
        } catch (ParseException x) {
            // Ignore
        }

        Section mainSection = toolkit.createSection(parent, Section.TITLE_BAR);
        mainSection.setText(title);

        mainComposite = toolkit.createComposite(mainSection);
        mainSection.setClient(mainComposite);

        toolkit.createLabel(mainComposite, "Pattern:");
        txtName = toolkit.createText(mainComposite, "", SWT.BORDER);
        ControlDecoration decPattern = new ControlDecoration(txtName, SWT.LEFT | SWT.TOP, mainComposite);
        decPattern.setImage(assistDecor.getImage());
        if (assistKeyStroke == null) {
            decPattern.setDescriptionText("Content assist is available. Start typing to activate");
        } else {
            decPattern.setDescriptionText(MessageFormat.format("Content assist is available. Press {0} or start typing to activate", assistKeyStroke.format()));
        }
View Full Code Here

Examples of org.eclipse.jface.fieldassist.FieldDecoration

        try {
            assistKeyStroke = KeyStroke.getInstance("Ctrl+Space");
        } catch (ParseException x) {
            // Ignore
        }
        FieldDecoration contentAssistDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);

        Composite composite = toolkit.createComposite(section);
        section.setClient(composite);

        toolkit.createLabel(composite, "Version:");
        txtVersion = toolkit.createText(composite, "", SWT.BORDER);
        ToolTips.setupMessageAndToolTipFromSyntax(txtVersion, Constants.BUNDLE_VERSION);

        Hyperlink linkActivator = toolkit.createHyperlink(composite, "Activator:", SWT.NONE);
        txtActivator = toolkit.createText(composite, "", SWT.BORDER);
        ToolTips.setupMessageAndToolTipFromSyntax(txtActivator, Constants.BUNDLE_ACTIVATOR);

        toolkit.createLabel(composite, "Declarative Services:");
        cmbComponents = new Combo(composite, SWT.READ_ONLY);
        cmbComponents.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));

        // Content Proposal for the Activator field
        ContentProposalAdapter activatorProposalAdapter = null;

        ActivatorClassProposalProvider proposalProvider = new ActivatorClassProposalProvider();
        activatorProposalAdapter = new ContentProposalAdapter(txtActivator, new TextContentAdapter(), proposalProvider, assistKeyStroke, UIConstants.autoActivationCharacters());
        activatorProposalAdapter.addContentProposalListener(proposalProvider);
        activatorProposalAdapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
        activatorProposalAdapter.setLabelProvider(new JavaContentProposalLabelProvider());
        activatorProposalAdapter.setAutoActivationDelay(1000);

        // Decorator for the Activator field
        ControlDecoration decorActivator = new ControlDecoration(txtActivator, SWT.LEFT | SWT.CENTER, composite);
        decorActivator.setImage(contentAssistDecoration.getImage());
        if (assistKeyStroke == null) {
            decorActivator.setDescriptionText("Content Assist is available. Start typing to activate");
        } else {
            decorActivator.setDescriptionText(MessageFormat.format("Content Assist is available. Press {0} or start typing to activate", assistKeyStroke.format()));
        }
View Full Code Here

Examples of org.eclipse.jface.fieldassist.FieldDecoration

        try {
            assistKeyStroke = KeyStroke.getInstance("Ctrl+Space");
        } catch (ParseException x) {
            // Ignore
        }
        FieldDecoration contentAssistDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);

        Composite composite = toolkit.createComposite(section);
        section.setClient(composite);

        toolkit.createLabel(composite, "Version:");
        txtVersion = toolkit.createText(composite, "", SWT.BORDER);
        ToolTips.setupMessageAndToolTipFromSyntax(txtVersion, Constants.BUNDLE_VERSION);

        Hyperlink linkActivator = toolkit.createHyperlink(composite, "Activator:", SWT.NONE);
        txtActivator = toolkit.createText(composite, "", SWT.BORDER);
        ToolTips.setupMessageAndToolTipFromSyntax(txtActivator, Constants.BUNDLE_ACTIVATOR);

        toolkit.createLabel(composite, "Declarative Services:");
        cmbComponents = new Combo(composite, SWT.READ_ONLY);

        // Content Proposal for the Activator field
        ContentProposalAdapter activatorProposalAdapter = null;

        ActivatorClassProposalProvider proposalProvider = new ActivatorClassProposalProvider();
        activatorProposalAdapter = new ContentProposalAdapter(txtActivator, new TextContentAdapter(), proposalProvider, assistKeyStroke, UIConstants.autoActivationCharacters());
        activatorProposalAdapter.addContentProposalListener(proposalProvider);
        activatorProposalAdapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
        activatorProposalAdapter.setLabelProvider(new JavaContentProposalLabelProvider());
        activatorProposalAdapter.setAutoActivationDelay(1000);

        // Decorator for the Activator field
        ControlDecoration decorActivator = new ControlDecoration(txtActivator, SWT.LEFT | SWT.CENTER, composite);
        decorActivator.setImage(contentAssistDecoration.getImage());
        decorActivator.setMarginWidth(3);
        if (assistKeyStroke == null) {
            decorActivator.setDescriptionText("Content Assist is available. Start typing to activate");
        } else {
            decorActivator.setDescriptionText(MessageFormat.format("Content Assist is available. Press {0} or start typing to activate", assistKeyStroke.format()));
View Full Code Here

Examples of org.eclipse.jface.fieldassist.FieldDecoration

    /**
     *
     */
    private void decorateComponents()
    {
        FieldDecoration infoDecor = FieldDecorationRegistry.getDefault().getFieldDecoration(
            FieldDecorationRegistry.DEC_INFORMATION);

        ControlDecoration txtBSNDecor = new ControlDecoration(txtBSN, SWT.LEFT
            | SWT.CENTER);
        txtBSNDecor.setImage(infoDecor.getImage());
        txtBSNDecor.setDescriptionText("The unique name of this bundle - should follow reverse domain name pattern");
       
        ControlDecoration txtVersionDecor = new ControlDecoration(txtVersion, SWT.LEFT
            | SWT.CENTER);
        txtVersionDecor.setImage(infoDecor.getImage());
        txtVersionDecor.setDescriptionText("The version of this bundle");
       
        ControlDecoration txtNameDecor = new ControlDecoration(txtName, SWT.LEFT
            | SWT.CENTER);
        txtNameDecor.setImage(infoDecor.getImage());
        txtNameDecor.setDescriptionText("Defines a human-readable name for the bundle");

        ControlDecoration txtDescDecor = new ControlDecoration(txtDescription, SWT.LEFT
            | SWT.CENTER);
        txtDescDecor.setImage(infoDecor.getImage());
        txtDescDecor.setDescriptionText("Defines a short human-readable description for the bundle");

        ControlDecoration txtVendorDecor = new ControlDecoration(txtVendor, SWT.LEFT
            | SWT.CENTER);
        txtVendorDecor.setImage(infoDecor.getImage());
        txtVendorDecor.setDescriptionText("The name of the company, organisation or individual providing the bundle");
    }
View Full Code Here

Examples of org.eclipse.jface.fieldassist.FieldDecoration

        else
        {
            txtSelection = new Text(composite, SWT.BORDER);
            ControlDecoration selectionDecor = new ControlDecoration(txtSelection,
                SWT.LEFT | SWT.TOP);
            FieldDecoration proposalDecor = FieldDecorationRegistry.getDefault().getFieldDecoration(
                FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
            selectionDecor.setImage(proposalDecor.getImage());
            selectionDecor.setDescriptionText(proposalDecor.getDescription());

            ExclusionContentProposalProvider<E> proposalProvider = new ExclusionContentProposalProvider<E>(
                elements, filter, descriptor);

            proposalAdapter = new ContentProposalAdapter(txtSelection,
View Full Code Here

Examples of org.eclipse.jface.fieldassist.FieldDecoration

        else
        {
            txtSelection = new Text(composite, SWT.BORDER);
            ControlDecoration selectionDecor = new ControlDecoration(txtSelection,
                SWT.LEFT | SWT.TOP);
            FieldDecoration proposalDecor = FieldDecorationRegistry.getDefault().getFieldDecoration(
                FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
            selectionDecor.setImage(proposalDecor.getImage());
            selectionDecor.setDescriptionText(proposalDecor.getDescription());
   
            ExclusionContentProposalProvider<E> proposalProvider = new ExclusionContentProposalProvider<E>(
                elements, filter, descriptor);
   
            proposalAdapter = new ContentProposalAdapter(txtSelection,
View Full Code Here

Examples of org.eclipse.jface.fieldassist.FieldDecoration

            ControlDecoration feedback = input.getFeedback();
           
            feedback.setDescriptionText(warning);
           
            FieldDecorationRegistry decorations = FieldDecorationRegistry.getDefault();
            FieldDecoration errorDecoration = decorations.getFieldDecoration(FieldDecorationRegistry.DEC_WARNING);
            feedback.setImage(errorDecoration.getImage());
            feedback.show();
        }
        Control control = getControl();
        if (control != null && !control.isDisposed()) {
            control.setToolTipText(warning);
View Full Code Here

Examples of org.eclipse.jface.fieldassist.FieldDecoration

               
                feedback.setDescriptionText(warning);
               
                FieldDecorationRegistry decorations = FieldDecorationRegistry.getDefault();
                if( isRequired ){
                    FieldDecoration requiredDecoration = decorations.getFieldDecoration(FieldDecorationRegistry.DEC_REQUIRED);
                    feedback.setImage(requiredDecoration.getImage());
                } else {
                    FieldDecoration warningDecoration = decorations.getFieldDecoration(FieldDecorationRegistry.DEC_WARNING );
                    feedback.setImage(warningDecoration.getImage());
                }
                feedback.show();
            }
            Control control = getControl();
            if (control != null && !control.isDisposed()) {
View Full Code Here

Examples of org.eclipse.jface.fieldassist.FieldDecoration

        if( input != null && input.getFeedback() != null ){
            ControlDecoration feedback = input.getFeedback();
           
            feedback.setDescriptionText(error);
            FieldDecorationRegistry decorations = FieldDecorationRegistry.getDefault();
            FieldDecoration warningDecoration = decorations.getFieldDecoration(FieldDecorationRegistry.DEC_WARNING);
            feedback.setImage(warningDecoration.getImage());
            feedback.show();
        }
        Control control = getControl();
        if (control != null && !control.isDisposed()) {
            control.setToolTipText(error+":"+exception);
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.