Package org.eclipse.ui.forms.widgets

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


    buf.append("<li style=\"image\" value=\"image\">List item with an image bullet</li>");
    buf.append("<li style=\"text\" bindent=\"20\" indent=\"40\" value=\"3.\">A list item with text.</li>");
    buf.append("<li style=\"text\" bindent=\"20\" indent=\"40\" value=\"4.\">A list item with text.</li>");
    buf.append("<p>     leading blanks;      more white \n\n new lines   <br/><br/><br/> \n more <b>   bb   </b>  white  . </p>");
    buf.append("</form>");
    FormText rtext = toolkit.createFormText(form.getBody(), false);
    //rtext.setWhitespaceNormalized(false);
    td = new TableWrapData(TableWrapData.FILL);
    td.colspan = 2;
    rtext.setLayoutData(td);
    rtext.setImage("image", ExamplesPlugin.getDefault().getImageRegistry().get(ExamplesPlugin.IMG_SAMPLE));
    rtext.setColor("header", toolkit.getColors().getColor(IFormColors.TITLE));
    rtext.setFont("header", JFaceResources.getHeaderFont());
    rtext.setFont("code", JFaceResources.getTextFont());
    rtext.setText(buf.toString(), true, false);
    rtext.addHyperlinkListener(new HyperlinkAdapter() {
      public void linkActivated(HyperlinkEvent e) {
        System.out.println("Link active: "+e.getHref());
      }
    });
/*    layout.numColumns = 3;
View Full Code Here


    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;
View Full Code Here

    form = toolkit.createForm(parent);
    form.setText("Not configured");
   
    TableWrapLayout layout = new TableWrapLayout();
    form.getBody().setLayout(layout);
    FormText text = toolkit.createFormText(form.getBody(), true);
    text.setText("The Hudson plugin has not yet been configured. Use the preferences page to configure.", false, false);
   
    Hyperlink link = toolkit.createHyperlink(form.getBody(), "Open preferences", SWT.WRAP);
    link.addHyperlinkListener(new IHyperlinkListener() {
      public void linkActivated(HyperlinkEvent e) {
        new OpenPreferencesAction(getSite().getShell()).run();
View Full Code Here

    form = toolkit.createForm(parent);
    form.setText("Not configured");

    TableWrapLayout layout = new TableWrapLayout();
    form.getBody().setLayout(layout);
    FormText text = toolkit.createFormText(form.getBody(), true);
    text.setText("The Hudson plugin has not yet been configured. Use the preferences page to configure.", false, false);

    Hyperlink link = toolkit.createHyperlink(form.getBody(), "Open preferences", SWT.WRAP);
    link.addHyperlinkListener(new IHyperlinkListener() {
      public void linkActivated(HyperlinkEvent e) {
        new OpenPreferencesAction(getSite().getShell()).run();
View Full Code Here

      Composite sectionClient = toolkit.createComposite( section );
      sectionClient.setLayout( new GridLayout( 1, false ) );

      {
        FormText text = toolkit.createFormText( sectionClient, false );
        text.setText(
            "<p>To generate build instructions and export the project: <li style=\"bullet\" bindent=\"1\">Generate <a href=\"generateAnt\">ant build.xml</a> only</li><li style=\"bullet\" bindent=\"2\">Generate <a href=\"generateAndRun\">ant build.xml and run</a></li>&#160;</p>",
            true, false );
        text.addHyperlinkListener( new IHyperlinkListener() {

          @Override
          public void linkExited( final HyperlinkEvent e ) {

          }
View Full Code Here

TOP

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

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.