Package org.eclipse.ui.forms.widgets

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


        }
    };

    public AvailableBundlesPart(Composite parent, FormToolkit toolkit, int style) {
        super(parent, toolkit, style);
        Section section = getSection();
        section.setDescription("Available bundles. These can be dragged to the Run Requirements list to the right.");
        createClient(section, toolkit);
    }
View Full Code Here


    private final Text bundleDocUrl;
    private final ModificationLock lock = new ModificationLock();

    public DescriptionDeveloperPart(Composite parent, FormToolkit toolkit, int style) {
        super(parent, toolkit, style);
        Section section = getSection();
        section.setText("Developer Information");
        Composite composite = toolkit.createComposite(section);
        section.setClient(composite);
        // BUNDLE_DOCURL
        toolkit.createLabel(composite, "Documentation URL:");
        bundleDocUrl = toolkit.createText(composite, "", SWT.BORDER);
        ToolTips.setupMessageAndToolTipFromSyntax(bundleDocUrl, Constants.BUNDLE_DOCURL);
        bundleDocUrl.addModifyListener(new ModifyListener() {
View Full Code Here

     * @param toolkit
     * @param style
     */
    public RepositorySelectionPart(Composite parent, FormToolkit toolkit, int style) {
        super(parent, toolkit, style);
        Section section = getSection();
        section.setDescription("Select the repositories that will be available for resolution.");
        createClient(section, toolkit);
    }
View Full Code Here

        GridLayout layout = new GridLayout(1, false);
        composite.setLayout(layout);

        GridData gd;

        Section sectRequired = toolkit.createSection(composite, Section.TITLE_BAR | Section.EXPANDED);
        sectRequired.setText("Required Resources");

        gd = new GridData(SWT.FILL, SWT.FILL, true, true);
        gd.widthHint = 200;
        gd.heightHint = 150;
        sectRequired.setLayoutData(gd);

        Table tblRequired = toolkit.createTable(sectRequired, SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL);
        sectRequired.setClient(tblRequired);

        requiredViewer = new TableViewer(tblRequired);
        requiredViewer.setContentProvider(ArrayContentProvider.getInstance());
        requiredViewer.setLabelProvider(new ResourceLabelProvider());
        requiredViewer.setSorter(new BundleSorter());

        requiredViewer.addSelectionChangedListener(new ISelectionChangedListener() {
            @Override
            public void selectionChanged(SelectionChangedEvent event) {
                IStructuredSelection sel = (IStructuredSelection) event.getSelection();
                Resource resource = (Resource) sel.getFirstElement();

                reasonsContentProvider.setOptional(false);
                if (result != null)
                    reasonsContentProvider.setResolution(result.getResourceWirings());

                reasonsViewer.setInput(resource);
                reasonsViewer.expandToLevel(2);
            }
        });

        Section sectOptional = toolkit.createSection(composite, Section.TITLE_BAR | Section.TWISTIE);
        sectOptional.setText("Optional Resources");

        Composite cmpOptional = toolkit.createComposite(sectOptional);
        sectOptional.setClient(cmpOptional);
        cmpOptional.setLayout(new GridLayout(2, false));

        gd = new GridData(SWT.FILL, SWT.FILL, true, false);
        gd.widthHint = 200;
        sectOptional.setLayoutData(gd);

        Table tblOptional = toolkit.createTable(cmpOptional, SWT.BORDER | SWT.CHECK | SWT.FULL_SELECTION | SWT.H_SCROLL);
        tblOptional.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));

        optionalViewer = new CheckboxTableViewer(tblOptional);
        optionalViewer.setContentProvider(ArrayContentProvider.getInstance());
        optionalViewer.setLabelProvider(new ResourceLabelProvider());
        optionalViewer.setSorter(new BundleSorter());

        optionalViewer.addCheckStateListener(new ICheckStateListener() {
            @Override
            public void checkStateChanged(CheckStateChangedEvent event) {
                Resource resource = (Resource) event.getElement();
                if (event.getChecked()) {
                    checkedOptional.add(resource);
                } else {
                    checkedOptional.remove(resource);
                }
                presenter.updateButtons();
            }
        });

        Composite cmpOptionalButtons = toolkit.createComposite(cmpOptional);
        cmpOptionalButtons.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
        GridLayout gl_cmpOptionalButtons = new GridLayout(3, false);
        gl_cmpOptionalButtons.marginHeight = 0;
        gl_cmpOptionalButtons.marginWidth = 0;
        cmpOptionalButtons.setLayout(gl_cmpOptionalButtons);

        btnAddResolveOptional = toolkit.createButton(cmpOptionalButtons, "Add and Resolve", SWT.NONE);
        btnAddResolveOptional.setEnabled(false);
        btnAddResolveOptional.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                doAddResolve();
            }
        });
        btnAddResolveOptional.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, true, false));

        Button btnAllOptional = toolkit.createButton(cmpOptionalButtons, "Select All", SWT.NONE);
        btnAllOptional.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                // TODO
            }
        });
        btnAllOptional.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));

        Button btnClearOptional = toolkit.createButton(cmpOptionalButtons, "Clear All", SWT.NONE);
        btnClearOptional.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                checkedOptional.clear();
                optionalViewer.setCheckedElements(checkedOptional.toArray());
                presenter.updateButtons();
            }
        });
        btnClearOptional.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));

        Section sectReason = toolkit.createSection(composite, Section.TITLE_BAR | Section.EXPANDED);
        sectReason.setText("Reasons");

        Tree tblReasons = new Tree(sectReason, SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL);
        sectReason.setClient(tblReasons);

        gd = new GridData(SWT.FILL, SWT.FILL, true, true);
        gd.widthHint = 200;
        gd.heightHint = 150;
        sectReason.setLayoutData(gd);

        reasonsViewer = new TreeViewer(tblReasons);
        reasonsViewer.setContentProvider(reasonsContentProvider);
        reasonsViewer.setLabelProvider(new ResolutionTreeLabelProvider());
    }
View Full Code Here

  public void createSection(Composite parent) {
    super.createSection(parent);

    FormToolkit toolkit = getFormToolkit(parent.getDisplay());

    Section section = toolkit.createSection(parent, ExpandableComposite.TWISTIE | ExpandableComposite.TITLE_BAR);
    section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    section.setText(Messages.CloudFoundryServerStatusSection_TEXT_SERV_STAT);
    section.setExpanded(true);

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

    GridLayoutFactory.fillDefaults().numColumns(4).margins(10, 5).applyTo(composite);
    GridDataFactory.fillDefaults().grab(true, false).applyTo(composite);

    nameLabel = toolkit.createLabel(composite, ""); //$NON-NLS-1$
View Full Code Here

    }
    super.createSection(parent);

    FormToolkit toolkit = getFormToolkit(parent.getDisplay());

    Section section = toolkit.createSection(parent, ExpandableComposite.TWISTIE | ExpandableComposite.TITLE_BAR);
    section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    section.setText(Messages.SpringInsightSection_TEXT_SPRING_INSIGHT);
    section.setExpanded(false);

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

    GridLayoutFactory.fillDefaults().numColumns(1).margins(10, 5).applyTo(composite);
    GridDataFactory.fillDefaults().grab(true, false).applyTo(composite);

    new GoToSpringLinkWidget(composite, toolkit).createControl();
View Full Code Here

      return true;
    }
  }

  private void createApplicationsSection() {
    Section section = getSection();
    section.setLayout(new GridLayout());
    GridDataFactory.fillDefaults().grab(true, true).applyTo(section);
    section.setText(Messages.COMMONTXT_APPLICATIONS);
    section.setDescription(Messages.ApplicationMasterPart_TEXT_APP_DESCRIP);

    Composite client = toolkit.createComposite(section);
    client.setLayout(new GridLayout());
    GridDataFactory.fillDefaults().grab(true, true).applyTo(client);
    section.setClient(client);

    Composite headerComposite = toolkit.createComposite(section, SWT.NONE);
    RowLayout rowLayout = new RowLayout();
    rowLayout.marginTop = 0;
    rowLayout.marginBottom = 0;
    headerComposite.setLayout(rowLayout);
    headerComposite.setBackground(null);

    ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
    toolBarManager.createControl(headerComposite);

    applicationsViewer = new TableViewer(toolkit.createTable(client, SWT.NONE));
    applicationsViewer.setContentProvider(new TreeContentProvider());
    applicationsViewer.setLabelProvider(new ServerLabelProvider() {
      @Override
      public Image getImage(Object element) {
        Image image = super.getImage(element);

        if (element instanceof IModule) {
          IModule module = (IModule) element;
          CloudFoundryApplicationModule appModule = editorPage.getCloudServer()
              .getExistingCloudModule(module);
          if (appModule != null && appModule.getErrorMessage() != null) {
            return CloudFoundryImages.getImage(new DecorationOverlayIcon(image,
                CloudFoundryImages.OVERLAY_ERROR, IDecoration.BOTTOM_LEFT));
          }
        }

        return image;
      }

      @Override
      public String getText(Object element) {
        // This is the WTP module name (usually, it's the workspace
        // project name)
        String moduleName = super.getText(element);

        // However, the user has the option to specify a different name
        // when pushing an app, which is used as the cf app name. If
        // they are different, and the
        // corresponding workspace project is accessible, show both.
        // Otherwise, show the cf app name.

        if (element instanceof IModule) {

          IModule module = (IModule) element;

          // Find the corresponding Cloud Foundry-aware application
          // Module.
          CloudFoundryApplicationModule appModule = cloudServer.getExistingCloudModule((IModule) element);

          if (appModule != null) {
            String cfAppName = appModule.getDeployedApplicationName();

            if (cfAppName != null) {

              // Be sure not to show a null WTP module name,
              // although
              // that should not be encountered
              if (moduleName != null
                  && !cfAppName.equals(moduleName)
                  && CloudFoundryProperties.isModuleProjectAccessible.testProperty(
                      new IModule[] { module }, cloudServer)) {
                moduleName = cfAppName + " (" + moduleName + ")"; //$NON-NLS-1$ //$NON-NLS-2$
              }
              else {
                moduleName = cfAppName;
              }
            }
          }
        }

        return moduleName;
      }

    });
    applicationsViewer.setInput(new CloudApplication[0]);
    applicationsViewer.setSorter(new CloudFoundryViewerSorter());

    applicationsViewer.addSelectionChangedListener(new ISelectionChangedListener() {

      public void selectionChanged(SelectionChangedEvent event) {
        IStructuredSelection selection = (IStructuredSelection) event.getSelection();
        IModule module = (IModule) selection.getFirstElement();

        if (currentModule != module) {
          currentModule = module;
          getManagedForm().fireSelectionChanged(ApplicationMasterPart.this, selection);
        }
      }
    });
    GridDataFactory.fillDefaults().grab(true, true).hint(250, SWT.DEFAULT).applyTo(applicationsViewer.getControl());

    int ops = DND.DROP_COPY | DND.DROP_LINK | DND.DROP_DEFAULT;
    Transfer[] transfers = new Transfer[] { LocalSelectionTransfer.getTransfer() };
    ApplicationViewersDropAdapter listener = new ApplicationViewersDropAdapter(applicationsViewer);
    applicationsViewer.addDropSupport(ops, transfers, listener);

    // create context menu
    MenuManager menuManager = new MenuManager();
    menuManager.setRemoveAllWhenShown(true);
    menuManager.addMenuListener(new IMenuListener() {

      public void menuAboutToShow(IMenuManager manager) {
        fillApplicationsContextMenu(manager);
      }
    });

    Menu menu = menuManager.createContextMenu(applicationsViewer.getControl());
    applicationsViewer.getControl().setMenu(menu);
    editorPage.getSite().registerContextMenu(menuManager, applicationsViewer);

    Action addRemoveApplicationAction = new Action(Messages.ApplicationMasterPart_TEXT_ADD_REMOVE,
        ImageResource.getImageDescriptor(ImageResource.IMG_ETOOL_MODIFY_MODULES)) {
      @Override
      public void run() {
        ModifyModulesWizard wizard = new ModifyModulesWizard(cloudServer.getServerOriginal());
        WizardDialog dialog = new WizardDialog(getSection().getShell(), wizard);
        dialog.open();
      }
    };
    toolBarManager.add(addRemoveApplicationAction);

    // Fix for STS-2996. Moved from CloudFoundryApplicationsEditorPage
    toolBarManager.add(new RefreshApplicationEditorAction(editorPage));
    toolBarManager.update(true);
    section.setTextClient(headerComposite);

    getManagedForm().getToolkit().paintBordersFor(client);
  }
View Full Code Here

    getManagedForm().getToolkit().paintBordersFor(client);
  }

  private void createRoutesDomainsSection() {

    Section routeSection = toolkit.createSection(getSection().getParent(), Section.TITLE_BAR | Section.DESCRIPTION
        | Section.TWISTIE);
    routeSection.setLayout(new GridLayout());
    GridDataFactory.fillDefaults().grab(true, true).applyTo(routeSection);
    routeSection.setText(Messages.ApplicationMasterPart_TEXT_ROUTES);
    routeSection.setExpanded(true);

    routeSection.clientVerticalSpacing = 0;

    Composite client = toolkit.createComposite(routeSection);
    client.setLayout(new GridLayout(1, false));
    GridDataFactory.fillDefaults().grab(true, true).applyTo(client);
    routeSection.setClient(client);

    Button button = toolkit.createButton(client, Messages.ApplicationMasterPart_TEXT_REMOVE_BUTTON, SWT.PUSH);
    GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(button);

    button.addSelectionListener(new SelectionAdapter() {
View Full Code Here

  public void createSection(Composite parent) {
    Control[] children = parent.getChildren();
   
    for(Control child: children) {
      if (child instanceof Section) {
        Section section = (Section) child;
        if (Messages.DisablePublishSection_TEXT_PUBLISHING.equals(section.getText())) {
          section.setEnabled(false);
          section.setText(NLS.bind(Messages.DisablePublishSection_TEXT_PUBLISHING, Messages.DisablePublishSection_MANUAL));
//          Control[] sectionChildren = section.getChildren();
//          for(Control sectionChild: sectionChildren) {
//            if (sectionChild instanceof Composite) {
//              Composite composite = (Composite) sectionChild;
//              Control[] compositeChildren = composite.getChildren();
View Full Code Here

  public void createSection(Composite parent) {
    super.createSection(parent);

    FormToolkit toolkit = getFormToolkit(parent.getDisplay());

    Section section = toolkit.createSection(parent, ExpandableComposite.TWISTIE | ExpandableComposite.TITLE_BAR);
    section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    section.setText(sectionTitle);

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

    GridLayout layout = new GridLayout();
    composite.setLayout(layout);
    composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

    Composite topComposite = new Composite(composite, SWT.NONE);
    topComposite.setLayout(new GridLayout(2, false));
    topComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));

    Label emailLabel = toolkit.createLabel(topComposite, Messages.COMMONTXT_EMAIL_WITH_COLON, SWT.NONE);
    emailLabel.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
    emailLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));

    emailText = toolkit.createText(topComposite, ""); //$NON-NLS-1$
    emailText.setEditable(false);
    emailText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    emailText.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
    if (cfServer.getUsername() != null) {
      emailText.setText(cfServer.getUsername());
    }
    emailText.addModifyListener(new DataChangeListener(DataType.EMAIL));

    Label passwordLabel = toolkit.createLabel(topComposite, Messages.COMMONTXT_PW, SWT.NONE);
    passwordLabel.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
    passwordLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));

    passwordText = toolkit.createText(topComposite, "", SWT.PASSWORD); //$NON-NLS-1$
    passwordText.setEditable(false);
    passwordText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    passwordText.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
    if (cfServer.getPassword() != null) {
      passwordText.setText(cfServer.getPassword());
    }
    passwordText.addModifyListener(new DataChangeListener(DataType.PASSWORD));

    Label label = toolkit.createLabel(topComposite, Messages.COMMONTXT_URL);
    label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
    label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));

    urlText = toolkit.createText(topComposite, "", SWT.NONE); //$NON-NLS-1$
    urlText.setEditable(false);
    urlText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    urlText.setData(FormToolkit.KEY_DRAW_BORDER, Boolean.FALSE);
    if (cfServer.getUrl() != null) {
      urlText.setText(CloudUiUtil.getDisplayTextFromUrl(cfServer.getUrl(), cfServer.getServer().getServerType()
          .getId()));
    }

    Label orgLabel = toolkit.createLabel(topComposite, Messages.CloudFoundryAccountSection_LABEL_ORG, SWT.NONE);
    orgLabel.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
    orgLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));

    orgText = toolkit.createText(topComposite, "", SWT.NONE); //$NON-NLS-1$
    orgText.setEditable(false);
    orgText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    orgText.setData(FormToolkit.KEY_DRAW_BORDER, Boolean.FALSE);
    if (cfServer.getCloudFoundrySpace() != null && cfServer.getCloudFoundrySpace().getOrgName() != null) {
      orgText.setText(cfServer.getCloudFoundrySpace().getOrgName());
    }

    Label spaceLabel = toolkit.createLabel(topComposite, Messages.CloudFoundryAccountSection_LABEL_SPACE, SWT.NONE);
    spaceLabel.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
    spaceLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));

    spaceText = toolkit.createText(topComposite, "", SWT.NONE); //$NON-NLS-1$
    spaceText.setEditable(false);
    spaceText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    spaceText.setData(FormToolkit.KEY_DRAW_BORDER, Boolean.FALSE);
    if (cfServer.getCloudFoundrySpace() != null && cfServer.getCloudFoundrySpace().getSpaceName() != null) {
      spaceText.setText(cfServer.getCloudFoundrySpace().getSpaceName());
    }

    // urlWidget = new CloudUrlWidget(cfServer);
    // urlWidget.createControls(topComposite);
    // urlWidget.getUrlCombo().addModifyListener(new
    // DataChangeListener(DataType.URL));
    //
    final Composite buttonComposite = toolkit.createComposite(composite);

    buttonComposite.setLayout(new GridLayout(4, false));
    GridDataFactory.fillDefaults().align(SWT.END, SWT.FILL).grab(true, false).applyTo(buttonComposite);

    final Composite validateComposite = toolkit.createComposite(composite);
    validateComposite.setLayout(new GridLayout(1, false));
    validateComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));

    validateLabel = toolkit.createLabel(validateComposite, "", SWT.NONE); //$NON-NLS-1$
    validateLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));

    createCloneServerArea(buttonComposite, toolkit);

    final Button changePasswordButton = toolkit.createButton(buttonComposite,
        Messages.CloudFoundryAccountSection_BUTTON_CHANGE_PW, SWT.PUSH);

    // Pivotal Tracker: 54644658 - Disable for CF 1.5.0 until fixed.
    changePasswordButton.setEnabled(false);

    changePasswordButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
    changePasswordButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        if (server.isDirty()) {
          boolean confirm = MessageDialog.openQuestion(getShell(),
              Messages.CloudFoundryAccountSection_DIALOG_UNSAVE_TITLE,
              Messages.CloudFoundryAccountSection_DIALOG_UNSAVE_BODY);
          if (!confirm) {
            return;
          }
        }

        UpdatePasswordDialog dialog = new UpdatePasswordDialog(getShell(), cfServer.getUsername());

        if (dialog.open() == IDialogConstants.OK_ID) {
          final String newPassword = dialog.getPassword();
          String errorMsg = CloudUiUtil.updatePassword(newPassword, cfServer, server);

          if (errorMsg != null) {
            validateLabel.setText(errorMsg);
            validateLabel.setForeground(validateLabel.getDisplay().getSystemColor(SWT.COLOR_RED));
          }
          else {
            validateLabel.setText(Messages.CloudFoundryAccountSection_LABEL_PW_CHANGED);
            passwordText.setText(newPassword);
          }
        }
      }
    });

    final Button validateButton = toolkit.createButton(buttonComposite,
        Messages.CloudFoundryAccountSection_BUTTON_VALIDATE_ACCOUNT, SWT.PUSH);
    validateButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
    validateButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent event) {
        final String url = cfServer.getUrl();
        final String userName = emailText.getText();
        final String password = passwordText.getText();
        final String org = orgText.getText();
        final String space = spaceText.getText();
        try {
          CloudUiUtil.validateCredentials(userName, password, url, false,
              cfServer.getSelfSignedCertificate(), null);

          if (org != null && space != null) {
            validateLabel.setText(Messages.VALID_ACCOUNT);
            validateLabel.setForeground(validateLabel.getDisplay().getSystemColor(SWT.COLOR_BLACK));
          }
          else {
            String errorMsg = null;
            if (org == null) {
              errorMsg = Messages.ERROR_INVALID_ORG;
            }
            else if (space == null) {
              errorMsg = Messages.ERROR_INVALID_SPACE;
            }
            validateLabel.setText(errorMsg);
            validateLabel.setForeground(validateLabel.getDisplay().getSystemColor(SWT.COLOR_RED));
          }

        }
        catch (CoreException e) {
          validateLabel.setText(e.getMessage());
        }
        buttonComposite.layout(new Control[] { validateButton });
        validateComposite.layout(new Control[] { validateLabel });
      }
    });

    // Create signup button only if the server is not local or micro
    if (CloudFoundryURLNavigation.canEnableCloudFoundryNavigation(cfServer)) {
      Button cfSignup = toolkit.createButton(buttonComposite,
          CloudFoundryConstants.PUBLIC_CF_SERVER_SIGNUP_LABEL, SWT.PUSH);
      cfSignup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
      cfSignup.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent event) {
          IServer iServer = cfServer.getServer();
          if (iServer != null) {
            String signupURL = CloudFoundryBrandingExtensionPoint.getSignupURL(cfServer.getServerId(),
                cfServer.getUrl());
            if (signupURL != null) {
              CloudFoundryURLNavigation nav = new CloudFoundryURLNavigation(signupURL);
              nav.navigate();
            }
          }
        }
      });
    }

    toolkit.paintBordersFor(topComposite);
    section.setExpanded(true);

    ServerEventHandler.getDefault().addServerListener(this);
  }
View Full Code Here

TOP

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

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.