private Control getConsumerTabControl(Composite tabFolder) {
    Composite composite = new Composite(tabFolder, SWT.NONE);
    GridLayout gl = new GridLayout(2, false);
    composite.setLayout(gl);

    _nameText = createLabelAndText(composite, Messages.label_name);

    _hostText = createLabelAndText(composite, Messages.label_hostStar);
    _portText = createLabelAndText(composite, Messages.label_port);
    _usernameText = createLabelAndText(composite, Messages.label_userName);
    _passwordText = createLabelAndText(composite, Messages.label_password);
    _passwordText.setEchoChar('*');
    _securedCheckbox = createCheckbox(composite, Messages.label_secured, 2);

    Group consumeGroup = new Group(composite, SWT.NONE);
    consumeGroup.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false, 2, 1));
    consumeGroup.setLayout(new GridLayout(2, false));
    consumeGroup.setText(Messages.label_consumerOptions);

    getToolkit().createLabel(consumeGroup, Messages.label_accountType, SWT.NONE);
    _accountTypeCombo = new ComboViewer(consumeGroup);
    _accountTypeCombo.getControl().setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false));
    _accountTypeCombo.setContentProvider(ArrayContentProvider.getInstance());
    _accountTypeCombo.setLabelProvider(new LabelProvider());
    MailConsumerAccountType[] accountTypes =
        new MailConsumerAccountType[] {MailConsumerAccountType.IMAP, MailConsumerAccountType.POP3};
    _accountTypeCombo.setInput(accountTypes);
    getToolkit().adapt(_accountTypeCombo.getControl(), true, true);

    _folderNameText = createLabelAndText(consumeGroup, Messages.label_folderName);
    _fetchSizeText = createLabelAndText(consumeGroup, Messages.label_fetchSize, 2);
    _unseenCheckbox = createCheckbox(consumeGroup, Messages.label_unreadOnly, 2);
    _deleteCheckbox = createCheckbox(consumeGroup, Messages.label_delete, 2);

    _opSelectorComposite = new OperationSelectorComposite(composite, SWT.NONE, this);
    _opSelectorComposite.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false, 2, 1));
    _opSelectorComposite.setLayout(new GridLayout(2, false));
    _opSelectorComposite.addChangeListener(
        new ChangeListener() {
          @Override
          public void stateChanged(ChangeEvent e) {
            handleModify(_opSelectorComposite);
          }
        });

    return composite;
  }
Beispiel #2
0
  private Control getSchedulerTabControl(Composite tabFolder) {
    Composite composite = new Composite(tabFolder, SWT.NONE);
    GridLayout gl = new GridLayout(2, false);
    composite.setLayout(gl);

    _nameText = createLabelAndText(composite, Messages.label_name);

    _configURIText = createLabelAndText(composite, Messages.label_configUriStar);

    if (getTargetObject() != null && getTargetObject() instanceof Service) {
      _opSelectorComposite = new OperationSelectorComposite(composite, SWT.NONE);
      _opSelectorComposite.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false, 2, 1));
      _opSelectorComposite.setLayout(new GridLayout(2, false));
      _opSelectorComposite.addChangeListener(
          new ChangeListener() {
            @Override
            public void stateChanged(ChangeEvent e) {
              handleModify(_opSelectorComposite);
            }
          });
    }

    return composite;
  }