Package org.eclipse.ui.forms.widgets

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


  protected void createFormContent(IManagedForm mform) {
    setHelpAvailable(false);
    getShell().setText("Grouping");

    FormToolkit toolkit = mform.getToolkit();
    Form form = mform.getForm().getForm();
    form.setMessage("Specify how the elements should be structured",
        IMessageProvider.INFORMATION);
    toolkit.decorateFormHeading(form);

    form.getBody().setLayout(new GridLayout());
    Section section = toolkit.createSection(form.getBody(), Section.TITLE_BAR);
    section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    section.setText("Groups");

    Composite parent = toolkit.createComposite(section);
    parent.setLayout(new GridLayout(3, false));
View Full Code Here


        layout.marginHeight = 0;
        layout.marginWidth = 0;
        top.setLayout(layout);
       
        FormToolkit kit = new FormToolkit(parent.getDisplay());
        Form form = kit.createForm(top);
        GridData grid = new GridData(GridData.FILL_BOTH);
        grid.widthHint = 400;
        form.setLayoutData(grid);
        form.setText("Welcome to JSmooth !");
        TableWrapLayout wraplayout = new TableWrapLayout();
        form.getBody().setLayout(wraplayout);
        HyperlinkGroup hypergroup = kit.getHyperlinkGroup();
        hypergroup.setActiveForeground(display.getSystemColor(SWT.COLOR_BLUE));
        hypergroup.setForeground(display.getSystemColor(SWT.COLOR_BLUE));
        hypergroup.setHyperlinkUnderlineMode(HyperlinkGroup.UNDERLINE_HOVER);
       
        Label label = kit.createSeparator(form.getBody(), SWT.HORIZONTAL);
        TableWrapData wrapgrid = new TableWrapData(TableWrapData.FILL_GRAB);
        label.setLayoutData(wrapgrid);
       
        FormText text = kit.createFormText(form.getBody(), true);
        wrapgrid = new TableWrapData(TableWrapData.FILL);
        text.setLayoutData(wrapgrid);
        text.setText(JSmoothResources.TEXT_HELP_WELCOME, true, false);
       
        return top;
View Full Code Here

  public Object getValue(Object target) throws IllegalArgumentException,
      IllegalAccessException, InvocationTargetException,
      SecurityException, NoSuchFieldException {
    Object value = super.getValue(target);
    if (value == null) {
      Form form = (Form) target;
      return form.getHead();
    }
    return value;
  }
View Full Code Here

  }

  public void setValue(Object target, Object value)
      throws IllegalArgumentException, IllegalAccessException,
      InvocationTargetException, SecurityException, NoSuchFieldException {
    Form form = null;
    if (target instanceof ScrolledForm) {
      ScrolledForm scrolledForm = (ScrolledForm) target;
      form = scrolledForm.getForm();
    }
    else if (target instanceof Form) {
View Full Code Here

    toolkit = new FormToolkit(parent.getDisplay());
    form = toolkit.createScrolledForm(parent);
    messageManager = form.getMessageManager();

    Form formChild = form.getForm();
    String header = getFormHeader();
    if (header != null) {
      formChild.setText(header);
    }
    toolkit.decorateFormHeading(formChild);
    form.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

    //form.getBody().setLayout(new GridLayout(1, false));
View Full Code Here

    GridDataFactory.fillDefaults().grab(true, true).applyTo(sashForm);
    return sashForm;
  }

  private Form createForm(Composite parent, final FormToolkit toolkit) {
    Form newForm = toolkit.createForm(parent);

    Image repoImage = UIIcons.REPOSITORY.createImage();
    UIUtils.hookDisposal(newForm, repoImage);
    newForm.setImage(repoImage);
    newForm.setText(UIText.RebaseInteractiveView_NoSelection);
    GridDataFactory.fillDefaults().grab(true, true).applyTo(newForm);
    toolkit.decorateFormHeading(newForm);
    GridLayoutFactory.swtDefaults().applyTo(newForm.getBody());

    return newForm;
  }
View Full Code Here

        }
        toolkit.getHyperlinkGroup().setHyperlinkUnderlineMode(
            HyperlinkSettings.UNDERLINE_HOVER);

        // Define presentation title color and image.
        Form mainForm = toolkit.createForm(container);
        Color fg = sharedStyleManager.getColor(toolkit, "title.fg"); //$NON-NLS-1$
        if (fg != null)
            mainForm.setForeground(fg);
        Image bgImage = sharedStyleManager.getImage("title.image", null, null); //$NON-NLS-1$
        if (bgImage != null) {
            mainForm.setBackgroundImage(bgImage);
            String repeat = sharedStyleManager
                .getProperty("title.image.repeat"); //$NON-NLS-1$
            if (repeat != null && repeat.equalsIgnoreCase("true")) //$NON-NLS-1$

                mainForm.setBackgroundImageTiled(true);
        }

        mainPageBook = createMainPageBook(toolkit, mainForm);
        // Add this presentation as a listener to model.
        getModel().addPropertyListener(this);
View Full Code Here

        welcomeLink = createStaticPage(parent);
    }


    private Hyperlink createStaticPage(Composite parent) {
        Form mainForm = toolkit.createForm(parent);
        Composite body = mainForm.getBody();

        GridLayout gl = new GridLayout();
        body.setLayout(gl);
        String label = Messages.StaticHTML_welcome;
        Hyperlink link = toolkit.createHyperlink(body, label, SWT.WRAP);
View Full Code Here

    FormColors colors = toolkit.getColors();
    Color top = colors.getColor(IFormColors.H_GRADIENT_END);
    Color bot = colors.getColor(IFormColors.H_GRADIENT_START);

    // create the base form
    Form form = toolkit.createForm(parent);
    form.setText(title);
    form.setTextBackground(new Color[] { top, bot }, new int[] { 100 }, true);
    FormLayout layout = new FormLayout();
    layout.marginTop = 10;
    layout.marginBottom = 10;
    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();
View Full Code Here

      // our form is not disposed but the head of it's contained form is.
      IManagedForm mform = getManagedForm();
      if(mform != null) {
        ScrolledForm sform = mform.getForm();
        if(sform != null) {
          Form form = sform.getForm();
          if(form != null) {
            Composite head = form.getHead();
            if(head != null && !head.isDisposed()) {
              mform.getMessageManager().removeMessages();
            }
          }
        }
View Full Code Here

TOP

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

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.