Package org.eclipse.ui.forms.widgets

Examples of org.eclipse.ui.forms.widgets.ScrolledFormText


        lblNewLabel.setText("Description:");

        Composite cmpDescription = new Composite(container, SWT.BORDER);
        cmpDescription.setBackground(tree.getBackground());

        txtDescription = new ScrolledFormText(cmpDescription, SWT.V_SCROLL | SWT.H_SCROLL, false);
        FormText formText = new FormText(txtDescription, SWT.NO_FOCUS);
        txtDescription.setFormText(formText);
        txtDescription.setBackground(tree.getBackground());
        formText.setBackground(tree.getBackground());
        formText.setForeground(tree.getForeground());
View Full Code Here


        lblNewLabel.setText("Description:");

        Composite cmpDescription = new Composite(container, SWT.BORDER);
        cmpDescription.setBackground(tree.getBackground());

        txtDescription = new ScrolledFormText(cmpDescription, SWT.V_SCROLL | SWT.H_SCROLL, false);
        FormText formText = new FormText(txtDescription, SWT.NO_FOCUS);
        txtDescription.setFormText(formText);
        txtDescription.setBackground(tree.getBackground());
        formText.setBackground(tree.getBackground());
        formText.setForeground(tree.getForeground());
View Full Code Here

    form.getBody().setLayout(new FillLayout());
    return form;
  }
 
  private static ScrolledFormText createFormText(Composite parent, FormToolkit toolkit) {
    final ScrolledFormText sftext = new ScrolledFormText(parent, SWT.WRAP | SWT.NO_FOCUS | SWT.V_SCROLL, false);
    final FormText text = toolkit.createFormText(sftext, false);
    sftext.setFormText(text);
    text.marginWidth = 1;
    text.marginHeight = 0;
    text.setHyperlinkSettings(toolkit.getHyperlinkGroup());
    text.setMenu(parent.getMenu());
    text.setWhitespaceNormalized(false);
View Full Code Here

    layout.marginLeft = 10;
    layout.marginRight = 10;
    form.getBody().setLayout(layout);

    // Scrolled text
    ScrolledFormText scrolledFormText = new ScrolledFormText(form.getBody(), true);
    FormText text = toolkit.createFormText(scrolledFormText, true);

    scrolledFormText.setAlwaysShowScrollBars(false);

    StringBuilder builder = new StringBuilder();
    for (final String currentText : texts) {
      builder.append("<p>").append(currentText).append("</p>");
    }

    text.setText(String.format("<form>%s</form>", builder.toString()), true, false);

    FormData data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(100);
    data.width = 150;
    data.height = 100;
    scrolledFormText.setLayoutData(data);

    scrolledFormText.setFormText(text);
    scrolledFormText.setBackground(ColorConstants.white);

    return parent;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.forms.widgets.ScrolledFormText

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.