Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.TabItem


  private void createGeneralGroup(TabFolder parent) {
    Composite group = new Composite(parent, SWT.NONE);
    group.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    group.setLayout(LayoutUtils.createGridLayout(1, 10, 10));

    TabItem item = new TabItem(parent, SWT.None);
    item.setText(Messages.FeedsPreferencePage_GENERAL);
    item.setControl(group);

    /* Auto-Reload */
    Composite autoReloadContainer = new Composite(group, SWT.NONE);
    autoReloadContainer.setLayout(LayoutUtils.createGridLayout(3, 0, 0));
    autoReloadContainer.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
View Full Code Here


  private void createReadingGroup(TabFolder parent) {
    Composite group = new Composite(parent, SWT.NONE);
    group.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    group.setLayout(LayoutUtils.createGridLayout(1, 10, 10));

    TabItem item = new TabItem(parent, SWT.None);
    item.setText(Messages.FeedsPreferencePage_READING);
    item.setControl(group);

    /* Mark read after millis */
    Composite markReadAfterContainer = new Composite(group, SWT.None);
    markReadAfterContainer.setLayout(LayoutUtils.createGridLayout(3, 0, 0));

View Full Code Here

  private void createDisplayGroup(TabFolder parent) {
    Composite group = new Composite(parent, SWT.NONE);
    group.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    group.setLayout(LayoutUtils.createGridLayout(2, 10, 10));

    TabItem item = new TabItem(parent, SWT.None);
    item.setText(Messages.FeedsPreferencePage_DISPLAY);
    item.setControl(group);

    /* Filter Settings */
    Label filterLabel = new Label(group, SWT.None);
    filterLabel.setText(Messages.FeedsPreferencePage_FILTER_NEWS);

View Full Code Here

  private void createColumnsGroup(TabFolder parent) {
    Composite group = new Composite(parent, SWT.NONE);
    group.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    group.setLayout(LayoutUtils.createGridLayout(1, 10, 10));

    TabItem item = new TabItem(parent, SWT.None);
    item.setText(Messages.FeedsPreferencePage_COLUMNS);
    item.setControl(group);

    fColumnSelectionControl = new NewsColumnSelectionControl(group, SWT.NONE);
    fColumnSelectionControl.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    fColumnSelectionControl.setInput(NewsColumnViewModel.loadFrom(fGlobalScope));
  }
View Full Code Here

  private void createCleanUpGroup(TabFolder parent) {
    Composite group = new Composite(parent, SWT.NONE);
    group.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    group.setLayout(LayoutUtils.createGridLayout(2, 10, 10, 5, 5, false));

    TabItem item = new TabItem(parent, SWT.None);
    item.setText(Messages.FeedsPreferencePage_CLEAN_UP);
    item.setControl(group);

    /* Explanation Label */
    Label explanationLabel = new Label(group, SWT.WRAP);
    explanationLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false, 2, 1));
    explanationLabel.setText(Messages.FeedsPreferencePage_CLEAN_UP_INFO);
View Full Code Here

        Composite fieldEditorParent = getFieldEditorParent();

        TabFolder tabFolder = new TabFolder(fieldEditorParent, SWT.TOP);
        tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));

        TabItem tabPrefs = new TabItem(tabFolder, SWT.NONE);
        tabPrefs.setText(BytecodeOutlinePlugin
          .getResourceString("BCOPreferencePage.defaultsGroup"));

        TabItem tabCompare = new TabItem(tabFolder, SWT.NONE);
        tabCompare.setText(BytecodeOutlinePlugin
            .getResourceString("BCOPreferencePage.compareGroup"));

        TabItem tabMisc = new TabItem(tabFolder, SWT.NONE);
        tabMisc.setText(BytecodeOutlinePlugin
            .getResourceString("BCOPreferencePage.miscGroup"));

        Group viewGroup = new Group(tabFolder, SWT.NONE);
        viewGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
        tabPrefs.setControl(viewGroup);

        Group compareGroup = new Group(tabFolder, SWT.NONE);
        compareGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
        tabCompare.setControl(compareGroup);

        rateGroup = new Group(tabFolder, SWT.NONE);
        GridData gridData = new GridData(GridData.FILL_BOTH);
        GridLayout layout = new GridLayout();
        layout.numColumns = 1;
        rateGroup.setLayout(layout);
        rateGroup.setLayoutData(gridData);
        tabMisc.setControl(rateGroup);

        SupportPanel.createSupportLinks(rateGroup);


        addField(new BooleanFieldEditor(
View Full Code Here

        final TabFolder tabFolder = new TabFolder(schedulerGroup, SWT.NONE);
        final GridData gridData_1 = new GridData(GridData.FILL, GridData.FILL, true, true, 1, 4);
        gridData_1.heightHint = 178;
        tabFolder.setLayoutData(gridData_1);

        final TabItem propertiesTabItem = new TabItem(tabFolder, SWT.NONE);
        propertiesTabItem.setText("Properties");

        final Group group = new Group(tabFolder, SWT.NONE);
        final GridLayout gridLayout_2 = new GridLayout();
        gridLayout_2.numColumns = 3;
        group.setLayout(gridLayout_2);
        propertiesTabItem.setControl(group);


        final Label lblName = new Label(group, SWT.NONE);
        lblName.setText("Name");

        cboConnectname = new Combo(group, SWT.NONE);

        cboConnectname.setItems(listener.getProfileNames());
        cboConnectname.addModifyListener(new ModifyListener() {
          public void modifyText(final ModifyEvent e) {
            setEnabled();

          }
        });
        final GridData gridData_2 = new GridData(GridData.FILL, GridData.CENTER, true, false, 2, 1);
        cboConnectname.setLayoutData(gridData_2);
        cboConnectname.addSelectionListener(new SelectionAdapter() {
          public void widgetSelected(final SelectionEvent e) {
            //if( !cboConnectname.getText().equals(currProfile.get("name")))
            if( !cboConnectname.getText().equals(currProfile.getProfilename()))
              initForm();
          }
        });

        //if(!shell.isDisposed())
        //cboConnectname.setText(listener.getCurrProfileName());


        final Label protocolLabel = new Label(group, SWT.NONE);
        protocolLabel.setText("Protocol");

        cboProtokol = new Combo(group, SWT.NONE);
        cboProtokol.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 2, 1));
        cboProtokol.setItems(new String[] {"FTP", "SFTP"});

        cboProtokol.select(0);

        final Label hostnameOrIpLabel = new Label(group, SWT.NONE);
        hostnameOrIpLabel.setText("Host Name or IP Address");

        txtHost = new Text(group, SWT.BORDER);
        txtHost.addModifyListener(new ModifyListener() {
          public void modifyText(final ModifyEvent e) {
            setEnabled();
          }
        });
        txtHost.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false, 2, 1));

        final Label portLabel = new Label(group, SWT.NONE);
        portLabel.setText("Port");

        txtPort = new Text(group, SWT.BORDER);
        txtPort.addModifyListener(new ModifyListener() {
          public void modifyText(final ModifyEvent e) {
            setEnabled();
          }
        });
        txtPort.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false, 2, 1));

        final Label userNameLabel = new Label(group, SWT.NONE);
        userNameLabel.setText("User Name");

        txtUsername = new Text(group, SWT.BORDER);
        txtUsername.addModifyListener(new ModifyListener() {
          public void modifyText(final ModifyEvent e) {
            setEnabled();
          }
        });
        txtUsername.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false, 2, 1));
        //txtUsername.setText(currProfile.get("user") != null ? currProfile.get("user").toString() : "");

        final Label passwordLabel = new Label(group, SWT.NONE);
        passwordLabel.setText("Password");     

        txtPassword = new Text(group, SWT.PASSWORD | SWT.BORDER);
        txtPassword.addModifyListener(new ModifyListener() {
          public void modifyText(final ModifyEvent e) {
            if(init) {
              try {
                init = false;
                //TODO
                //System.out.println("todo");
                if(txtPassword.getText().length() > 0) {
                  /*  String key = Options.getProperty("profile.timestamp." + cboConnectname.getText());

                if(key != null && key.length() > 8) {
                  key = key.substring(key.length()-8);
                }
                String password = txtPassword.getText();

                if(password.length() > 0 && sosString.parseToString(key).length() > 0) {
                  password = SOSCrypt.decrypt(key, password);
                }
                txtPassword.setText(password);
                   */
                }
              } catch(Exception ex) {
                System.out.println(ex.getMessage());
              }
            }
            setEnabled();
          }
        });
        txtPassword.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false, 2, 1));
        //txtPassword.setText(currProfile.get("password") != null ? currProfile.get("password").toString() : "");

        final Label rootLabel = new Label(group, SWT.NONE);
        rootLabel.setText("Root Directory");

        txtRoot = new Text(group, SWT.BORDER);
        txtRoot.addModifyListener(new ModifyListener() {
          public void modifyText(final ModifyEvent e) {
            setEnabled();
          }
        });
        txtRoot.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false, 2, 1));
        //txtRoot.setText(currProfile.get("root") != null ? currProfile.get("root").toString() : "");

        final Label directoryFroLocalLabel = new Label(group, SWT.NONE);
        directoryFroLocalLabel.setText("Directory For Local Copy");

        txtLocalDirectory = new Text(group, SWT.BORDER);
        txtLocalDirectory.addModifyListener(new ModifyListener() {
          public void modifyText(final ModifyEvent e) {
            setEnabled();
          }
        });
        txtLocalDirectory.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false, 2, 1));

        final Label savePasswordLabel = new Label(group, SWT.NONE);
        final GridData gridData_5 = new GridData(SWT.DEFAULT, 24);
        gridData_5.verticalIndent = 5;
        savePasswordLabel.setLayoutData(gridData_5);
        savePasswordLabel.setText("Save Password");

        butSavePassword = new Button(group, SWT.CHECK);
        butSavePassword.setSelection(true);
        butSavePassword.addSelectionListener(new SelectionAdapter() {
          public void widgetDefaultSelected(final SelectionEvent e) {

          }
          public void widgetSelected(final SelectionEvent e) {
            setEnabled();
          }
        });
        butSavePassword.setLayoutData(new GridData());
        new Label(group, SWT.NONE);
        //txtLocalDirectory.setText(currProfile.get("localdirectory") != null ? currProfile.get("localdirectory").toString() : "");

        final Label transferModeLabel = new Label(group, SWT.NONE);
        final GridData gridData_3 = new GridData(GridData.BEGINNING, GridData.END, false, false);
        gridData_3.heightHint = 21;
        transferModeLabel.setLayoutData(gridData_3);
        transferModeLabel.setText("Transfer Mode");

        butAscii = new Button(group, SWT.RADIO);
        butAscii.addSelectionListener(new SelectionAdapter() {
          public void widgetSelected(final SelectionEvent e) {
            setEnabled();
          }
        });
        butAscii.setLayoutData(new GridData());
        butAscii.setText("ASCII");


        butbinary = new Button(group, SWT.RADIO);
        butbinary.addSelectionListener(new SelectionAdapter() {
          public void widgetSelected(final SelectionEvent e) {
            setEnabled();
          }
        });
        butbinary.setLayoutData(new GridData());
        butbinary.setText("Binary");

        final TabItem proxyTabItem = new TabItem(tabFolder, SWT.NONE);
        proxyTabItem.setText("Proxy");

        final Group group_1 = new Group(tabFolder, SWT.NONE);
        final GridLayout gridLayout_3 = new GridLayout();
        gridLayout_3.numColumns = 2;
        group_1.setLayout(gridLayout_3);
        proxyTabItem.setControl(group_1);

        useProxyButton = new Button(group_1, SWT.CHECK);
        useProxyButton.addSelectionListener(new SelectionAdapter() {
          public void widgetSelected(final SelectionEvent e) {
            txtProxyServer.setEnabled(useProxyButton.getSelection());
            txtProxyPort.setEnabled(useProxyButton.getSelection());
            setEnabled();
          }
        });
        useProxyButton.setLayoutData(new GridData(SWT.DEFAULT, 52));
        useProxyButton.setText("Use Proxy");
        new Label(group_1, SWT.NONE);

        final Label proxyServerLabel = new Label(group_1, SWT.NONE);
        proxyServerLabel.setText("Proxy Server");

        txtProxyServer = new Text(group_1, SWT.BORDER);
        txtProxyServer.addModifyListener(new ModifyListener() {
          public void modifyText(final ModifyEvent e) {
            setEnabled();
          }
        });
        txtProxyServer.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));

        final Label proxyPortLabel = new Label(group_1, SWT.NONE);
        proxyPortLabel.setText("Proxy Port");

        txtProxyPort = new Text(group_1, SWT.BORDER);
        txtProxyPort.addModifyListener(new ModifyListener() {
          public void modifyText(final ModifyEvent e) {
            setEnabled();
          }
        });
        txtProxyPort.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));

        sshTabItem = new TabItem(tabFolder, SWT.NONE);
        sshTabItem.setText("SSH");

        groupAuthenticationMethods = new Group(tabFolder, SWT.NONE);
        groupAuthenticationMethods.setText("Authentication Methods");
        final GridLayout gridLayout_4 = new GridLayout();
View Full Code Here

    GridData gd_tabFolder = new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1);
    gd_tabFolder.heightHint = 251;
    tabFolder.setLayoutData(gd_tabFolder);
   
 
    TabItem tbtmFtp = new TabItem(tabFolder, SWT.NONE);
    tbtmFtp.setText("FTP");
   
    Group group = new Group(tabFolder, SWT.NONE);
    group.setBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_BACKGROUND));
    tbtmFtp.setControl(group);
    group.setLayout(new GridLayout(2, false));
   
    Label lblPort = new Label(group, SWT.NONE);
    lblPort.setBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_BACKGROUND));
    lblPort.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblPort.setText("Port");
   
    edGlobalFTPPort = new Text(group, SWT.BORDER);
    edGlobalFTPPort.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    Label lblUser = new Label(group, SWT.NONE);
    lblUser.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblUser.setText("User");
   
    edGlobalFTPUser = new Text(group, SWT.BORDER);
    edGlobalFTPUser.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    Label lblNewLabel_9 = new Label(group, SWT.NONE);
    lblNewLabel_9.setBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_BACKGROUND));
    lblNewLabel_9.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblNewLabel_9.setText("Password");
   
    edGlobalFTPPassword = new Text(group, SWT.BORDER | SWT.PASSWORD);
    edGlobalFTPPassword.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    Label lblLocalDir = new Label(group, SWT.NONE);
    lblLocalDir.setBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_BACKGROUND));
    lblLocalDir.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblLocalDir.setText("Local dir");
   
    edGlobalFTPLocalDir = new Text(group, SWT.BORDER);
    edGlobalFTPLocalDir.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    Label lblRemoteDir = new Label(group, SWT.NONE);
    lblRemoteDir.setBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_BACKGROUND));
    lblRemoteDir.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblRemoteDir.setText("Remote dir");
   
    edGlobalFTPRemoteDir = new Text(group, SWT.BORDER);
    edGlobalFTPRemoteDir.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    TabItem tbtmSsh = new TabItem(tabFolder, SWT.NONE);
    tbtmSsh.setText("SSH");
   
    Group group_1 = new Group(tabFolder, SWT.NONE);
    group_1.setBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_BACKGROUND));
    tbtmSsh.setControl(group_1);
    group_1.setLayout(new GridLayout(2, false));
   
    Label lblPort_1 = new Label(group_1, SWT.NONE);
    lblPort_1.setBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_BACKGROUND));
    lblPort_1.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblPort_1.setText("Port");
   
    edGlobalSSHPort = new Text(group_1, SWT.BORDER);
    edGlobalSSHPort.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    Label lblNewLabel_11 = new Label(group_1, SWT.NONE);
    lblNewLabel_11.setBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_BACKGROUND));
    lblNewLabel_11.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblNewLabel_11.setText("User");
   
    edGlobalSSHUser = new Text(group_1, SWT.BORDER);
    edGlobalSSHUser.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    Label lblAuthMethod = new Label(group_1, SWT.NONE);
    lblAuthMethod.setBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_BACKGROUND));
    lblAuthMethod.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblAuthMethod.setText("Auth method");
   
    Combo edGlobalSSHAuthMethod = new Combo(group_1, SWT.NONE);
    edGlobalSSHAuthMethod.setItems(new String[] {"password", "publickey"});
    edGlobalSSHAuthMethod.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    Label lblNewLabel_12 = new Label(group_1, SWT.NONE);
    lblNewLabel_12.setBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_BACKGROUND));
    lblNewLabel_12.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblNewLabel_12.setText("Auth file");
   
    edGlobalSSHAuthFile = new Text(group_1, SWT.BORDER);
    edGlobalSSHAuthFile.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    Label lblPassword = new Label(group_1, SWT.NONE);
    lblPassword.setBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_BACKGROUND));
    lblPassword.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblPassword.setText("Password");
   
    edGlobalSSHPassword = new Text(group_1, SWT.BORDER | SWT.PASSWORD);
    edGlobalSSHPassword.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    Label lblSudopwd = new Label(group_1, SWT.NONE);
    lblSudopwd.setBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_BACKGROUND));
    lblSudopwd.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblSudopwd.setText("SudoPwd");
   
    edGlobalSSHSudoPassword = new Text(group_1, SWT.BORDER | SWT.PASSWORD);
    GridData gd_edGlobalSSHSudoPassword = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
    gd_edGlobalSSHSudoPassword.heightHint = 17;
    edGlobalSSHSudoPassword.setLayoutData(gd_edGlobalSSHSudoPassword);
   
    Label lblCommand = new Label(group_1, SWT.NONE);
    lblCommand.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblCommand.setText("Command");
   
    edGlobalSSHCommand = new Text(group_1, SWT.BORDER);
    edGlobalSSHCommand.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    Group gpInstallationItem = new Group(shlJobSchedulerAgent, SWT.NONE);
    gpInstallationItem.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, false, 1, 1));
    gpInstallationItem.setText("Installation Item");
    gpInstallationItem.setBackground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));
    gpInstallationItem.setLayout(new GridLayout(2, false));
   
    Label label = new Label(gpInstallationItem, SWT.NONE);
    label.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    label.setText("Scheduler ID");
    label.setBackground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));
   
    edSchedulerId = new Text(gpInstallationItem, SWT.BORDER);
    GridData gd_edSchedulerId = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
    gd_edSchedulerId.widthHint = 103;
    edSchedulerId.setLayoutData(gd_edSchedulerId);
   
    Label label_1 = new Label(gpInstallationItem, SWT.NONE);
    label_1.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    label_1.setText("Host");
    label_1.setBackground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));
   
    edHost = new Text(gpInstallationItem, SWT.BORDER);
    edHost.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    Label label_2 = new Label(gpInstallationItem, SWT.NONE);
    label_2.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    label_2.setText("Port");
    label_2.setBackground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));
   
    edPort = new Text(gpInstallationItem, SWT.BORDER);
    edPort.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    Label label_3 = new Label(gpInstallationItem, SWT.NONE);
    label_3.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    label_3.setText("Licence Key");
    label_3.setBackground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));
   
    edLicenceKey = new Text(gpInstallationItem, SWT.BORDER);
    edLicenceKey.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    Label label_4 = new Label(gpInstallationItem, SWT.NONE);
    label_4.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    label_4.setText("Licence Type");
    label_4.setBackground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));
   
    Combo cbLicenceTyp = new Combo(gpInstallationItem, SWT.NONE);
    cbLicenceTyp.setVisibleItemCount(2);
    cbLicenceTyp.setItems(new String[] {"GPL", "Commercial"});
    cbLicenceTyp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    Label label_5 = new Label(gpInstallationItem, SWT.NONE);
    label_5.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    label_5.setText("Allowed Hosts");
    label_5.setBackground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));
   
    edAllowedHosts = new Text(gpInstallationItem, SWT.BORDER);
    edAllowedHosts.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    Label label_6 = new Label(gpInstallationItem, SWT.NONE);
    label_6.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    label_6.setText("Install Path");
    label_6.setBackground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));
   
    edInstallPath = new Text(gpInstallationItem, SWT.BORDER);
    edInstallPath.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    Label label_7 = new Label(gpInstallationItem, SWT.NONE);
    label_7.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    label_7.setText("Configuration Path");
    label_7.setBackground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));
   
    edConfigurationPath = new Text(gpInstallationItem, SWT.BORDER);
    edConfigurationPath.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
    new Label(gpInstallationItem, SWT.NONE);
    new Label(gpInstallationItem, SWT.NONE);
   
    TabFolder tabFolder_1 = new TabFolder(gpInstallationItem, SWT.NONE);
    GridData gd_tabFolder_1 = new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1);
    gd_tabFolder_1.heightHint = 251;
    tabFolder_1.setLayoutData(gd_tabFolder_1);
    tabFolder_1.setBackground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));
   
    
    TabItem tbtmFtp_1 = new TabItem(tabFolder_1, SWT.NONE);
    tbtmFtp_1.setText("FTP");
   
    Group group_3 = new Group(tabFolder_1, SWT.NONE);
    group_3.setBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_BACKGROUND));
    tbtmFtp_1.setControl(group_3);
    group_3.setLayout(new GridLayout(2, false));
   
    Label label_8 = new Label(group_3, SWT.NONE);
    label_8.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    label_8.setText("Host");
    label_8.setBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_BACKGROUND));
   
    edFTPHost = new Text(group_3, SWT.BORDER);
    edFTPHost.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    Label label_9 = new Label(group_3, SWT.NONE);
    label_9.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    label_9.setText("Port");
    label_9.setBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_BACKGROUND));
   
    edFTPPort = new Text(group_3, SWT.BORDER);
    edFTPPort.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    Label lblUser_1 = new Label(group_3, SWT.NONE);
    lblUser_1.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblUser_1.setText("User");
   
    edFTPUser = new Text(group_3, SWT.BORDER);
    edFTPUser.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    Label label_11 = new Label(group_3, SWT.NONE);
    label_11.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    label_11.setText("Password");
    label_11.setBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_BACKGROUND));
   
    edFTPPassword = new Text(group_3, SWT.BORDER | SWT.PASSWORD);
    edFTPPassword.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    Label label_12 = new Label(group_3, SWT.NONE);
    label_12.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    label_12.setText("Local dir");
    label_12.setBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_BACKGROUND));
   
    edFTPLocalDir = new Text(group_3, SWT.BORDER);
    edFTPLocalDir.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    Label label_13 = new Label(group_3, SWT.NONE);
    label_13.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    label_13.setText("Remote dir");
    label_13.setBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_BACKGROUND));
   
    edFTPRemoteDir = new Text(group_3, SWT.BORDER);
    edFTPRemoteDir.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    TabItem tbtmSsh_1 = new TabItem(tabFolder_1, SWT.NONE);
    tbtmSsh_1.setText("SSH");
   
    Group group_4 = new Group(tabFolder_1, SWT.NONE);
    group_4.setBackground(SWTResourceManager.getColor(SWT.COLOR_LIST_BACKGROUND));
    tbtmSsh_1.setControl(group_4);
    group_4.setLayout(new GridLayout(2, false));
   
    Label label_14 = new Label(group_4, SWT.NONE);
    label_14.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    label_14.setText("Host");
View Full Code Here

      final TabFolder tabFolder = new TabFolder(schedulerGroup, SWT.NONE);
      final GridData gridData_1 = new GridData(GridData.FILL, GridData.FILL, true, true, 1, 4);
      gridData_1.heightHint = 178;
      tabFolder.setLayoutData(gridData_1);

      final TabItem propertiesTabItem = new TabItem(tabFolder, SWT.NONE);
      propertiesTabItem.setText("Properties");

      final Group group = new Group(tabFolder, SWT.NONE);
      final GridLayout gridLayout_2 = new GridLayout();
      gridLayout_2.numColumns = 3;
      group.setLayout(gridLayout_2);
      propertiesTabItem.setControl(group);


      final Label lblName = new Label(group, SWT.NONE);
      lblName.setText("Name");

      cboConnectname = new Combo(group, SWT.NONE);
     
      cboConnectname.setItems(listener.getProfileNames());
      cboConnectname.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          setEnabled();

        }
      });
      cboConnectname.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 2, 1));
      cboConnectname.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
          if( !cboConnectname.getText().equals(currProfile.get("name")))
            initForm();
        }
      });
      cboConnectname.select(0);

      final Label protocolLabel = new Label(group, SWT.NONE);
      protocolLabel.setText("Protocol");

      cboProtokol = new Combo(group, SWT.NONE);
      cboProtokol.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 2, 1));
      cboProtokol.setItems(new String[] {"FTP", "SFTP"});
     
      cboProtokol.select(0);

      final Label hostnameOrIpLabel = new Label(group, SWT.NONE);
      hostnameOrIpLabel.setText("Host Name or IP Address");

      txtHost = new Text(group, SWT.BORDER);
      txtHost.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          setEnabled();
        }
      });
      txtHost.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false, 2, 1));

      final Label portLabel = new Label(group, SWT.NONE);
      portLabel.setText("Port");

      txtPort = new Text(group, SWT.BORDER);
      txtPort.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          setEnabled();
        }
      });
      txtPort.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false, 2, 1));

      final Label userNameLabel = new Label(group, SWT.NONE);
      userNameLabel.setText("User Name");

      txtUsername = new Text(group, SWT.BORDER);
      txtUsername.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          setEnabled();
        }
      });
      txtUsername.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false, 2, 1));
      //txtUsername.setText(currProfile.get("user") != null ? currProfile.get("user").toString() : "");

      final Label passwordLabel = new Label(group, SWT.NONE);
      passwordLabel.setText("Password");     

      txtPassword = new Text(group, SWT.PASSWORD | SWT.BORDER);
      txtPassword.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          if(init) {
            try {
              init = false;
              if(txtPassword.getText().length() > 0) {
                String key = Options.getProperty("profile.timestamp." + cboConnectname.getText());

                if(key != null && key.length() > 8) {
                  key = key.substring(key.length()-8);
                }
                String password = txtPassword.getText();

                if(password.length() > 0 && sosString.parseToString(key).length() > 0) {
                  password = SOSCrypt.decrypt(key, password);
                }
                txtPassword.setText(password);
              }
            } catch(Exception ex) {
              System.out.println(ex.getMessage());
            }
          }
          setEnabled();
        }
      });
      txtPassword.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false, 2, 1));
      //txtPassword.setText(currProfile.get("password") != null ? currProfile.get("password").toString() : "");

      final Label rootLabel = new Label(group, SWT.NONE);
      rootLabel.setText("Root Directory");

      txtRoot = new Text(group, SWT.BORDER);
      txtRoot.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          setEnabled();
        }
      });
      txtRoot.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false, 2, 1));
      //txtRoot.setText(currProfile.get("root") != null ? currProfile.get("root").toString() : "");

      final Label directoryFroLocalLabel = new Label(group, SWT.NONE);
      directoryFroLocalLabel.setText("Directory For Local Copy");

      txtLocalDirectory = new Text(group, SWT.BORDER);
      txtLocalDirectory.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          setEnabled();
        }
      });
      txtLocalDirectory.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false, 2, 1));

      final Label savePasswordLabel = new Label(group, SWT.NONE);
      final GridData gridData_5 = new GridData(SWT.DEFAULT, 24);
      gridData_5.verticalIndent = 5;
      savePasswordLabel.setLayoutData(gridData_5);
      savePasswordLabel.setText("Save Password");

      butSavePassword = new Button(group, SWT.CHECK);
      butSavePassword.addSelectionListener(new SelectionAdapter() {
        public void widgetDefaultSelected(final SelectionEvent e) {
         
        }
        public void widgetSelected(final SelectionEvent e) {
          setEnabled();
        }
      });
      new Label(group, SWT.NONE);
      //txtLocalDirectory.setText(currProfile.get("localdirectory") != null ? currProfile.get("localdirectory").toString() : "");

      final Label transferModeLabel = new Label(group, SWT.NONE);
      final GridData gridData_3 = new GridData(GridData.BEGINNING, GridData.END, false, false);
      gridData_3.heightHint = 21;
      transferModeLabel.setLayoutData(gridData_3);
      transferModeLabel.setText("Transfer Mode");

      butAscii = new Button(group, SWT.RADIO);
      butAscii.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
          setEnabled();
        }
      });
      butAscii.setText("ASCII");


      butbinary = new Button(group, SWT.RADIO);
      butbinary.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
          setEnabled();
        }
      });
      butbinary.setText("Binary");

      final TabItem proxyTabItem = new TabItem(tabFolder, SWT.NONE);
      proxyTabItem.setText("Proxy");

      final Group group_1 = new Group(tabFolder, SWT.NONE);
      final GridLayout gridLayout_3 = new GridLayout();
      gridLayout_3.numColumns = 2;
      group_1.setLayout(gridLayout_3);
      proxyTabItem.setControl(group_1);

      useProxyButton = new Button(group_1, SWT.CHECK);
      useProxyButton.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
          txtProxyServer.setEnabled(useProxyButton.getSelection());
          txtProxyPort.setEnabled(useProxyButton.getSelection());
          setEnabled();
        }
      });
      useProxyButton.setLayoutData(new GridData(SWT.DEFAULT, 52));
      useProxyButton.setText("Use Proxy");
      new Label(group_1, SWT.NONE);

      final Label proxyServerLabel = new Label(group_1, SWT.NONE);
      proxyServerLabel.setText("Proxy Server");

      txtProxyServer = new Text(group_1, SWT.BORDER);
      txtProxyServer.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          setEnabled();
        }
      });
      txtProxyServer.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));

      final Label proxyPortLabel = new Label(group_1, SWT.NONE);
      proxyPortLabel.setText("Proxy Port");

      txtProxyPort = new Text(group_1, SWT.BORDER);
      txtProxyPort.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          setEnabled();
        }
      });
      txtProxyPort.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));

      sshTabItem = new TabItem(tabFolder, SWT.NONE);
      sshTabItem.setText("SSH");

      groupAuthenticationMethods = new Group(tabFolder, SWT.NONE);
      groupAuthenticationMethods.setText("Authentication Methods");
      final GridLayout gridLayout_4 = new GridLayout();
View Full Code Here

      final TabFolder tabFolder = new TabFolder(schedulerGroup, SWT.NONE);
      final GridData gridData_1 = new GridData(GridData.FILL, GridData.FILL, true, true, 1, 4);
      gridData_1.heightHint = 178;
      tabFolder.setLayoutData(gridData_1);

      final TabItem propertiesTabItem = new TabItem(tabFolder, SWT.NONE);
      propertiesTabItem.setText("Properties");

      final Group group = new Group(tabFolder, SWT.NONE);
      final GridLayout gridLayout_2 = new GridLayout();
      gridLayout_2.numColumns = 2;
      group.setLayout(gridLayout_2);
      propertiesTabItem.setControl(group);


      final Label lblName = new Label(group, SWT.NONE);
      lblName.setText("Name");

      cboConnectname = new Combo(group, SWT.NONE);
     
      cboConnectname.setItems(listener.getProfileNames());
      cboConnectname.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          setEnabled();

        }
      });
      final GridData gridData_2 = new GridData(GridData.FILL, GridData.CENTER, true, false);
      cboConnectname.setLayoutData(gridData_2);
      cboConnectname.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
          initForm();
        }
      });
      cboConnectname.select(0);

      final Label protocolLabel = new Label(group, SWT.NONE);
      protocolLabel.setText("protocol");

      cboProtokol = new Combo(group, SWT.NONE);
      cboProtokol.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
      cboProtokol.setItems(new String[] {"WebDav", "SWebDav"});
     
      cboProtokol.select(0);

      final Label userNameLabel = new Label(group, SWT.NONE);
      userNameLabel.setText("User Name");

      txtUsername = new Text(group, SWT.BORDER);
      txtUsername.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          setEnabled();
        }
      });
      txtUsername.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
      //txtUsername.setText(currProfile.get("user") != null ? currProfile.get("user").toString() : "");

      final Label passwordLabel = new Label(group, SWT.NONE);
      passwordLabel.setText("Password");     

      txtPassword = new Text(group, SWT.PASSWORD | SWT.BORDER);
      txtPassword.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          if(init) {
            try {
              init = false;
              if(txtPassword.getText().length() > 0) {
                String key = Options.getProperty("profile.timestamp." + cboConnectname.getText());

                if(key != null && key.length() > 8) {
                  key = key.substring(key.length()-8);
                }
                String password = txtPassword.getText();

                if(password.length() > 0 && sosString.parseToString(key).length() > 0) {
                  password = SOSCrypt.decrypt(key, password);
                }
                txtPassword.setText(password);
              }
            } catch(Exception ex) {
              System.out.println(ex.getMessage());
            }
          }

          setEnabled();
        }
      });
      txtPassword.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
      //txtPassword.setText(currProfile.get("password") != null ? currProfile.get("password").toString() : "");

      final Label urlLabel = new Label(group, SWT.NONE);
      urlLabel.setText("URL");

      txtURL = new Text(group, SWT.BORDER);
      txtURL.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          setEnabled();
        }
      });
      txtURL.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
      //txturl.setText(currProfile.get("url") != null ? currProfile.get("url").toString() : "");

      final Label directoryFroLocalLabel = new Label(group, SWT.NONE);
      directoryFroLocalLabel.setText("Directory For Local Copy");

      txtLocalDirectory = new Text(group, SWT.BORDER);
      txtLocalDirectory.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          setEnabled();
        }
      });
      txtLocalDirectory.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));

      final Label savePasswordLabel = new Label(group, SWT.NONE);
      final GridData gridData_5 = new GridData(SWT.DEFAULT, 24);
      gridData_5.verticalIndent = 5;
      savePasswordLabel.setLayoutData(gridData_5);
      savePasswordLabel.setText("Save Password");

      butSavePassword = new Button(group, SWT.CHECK);
      butSavePassword.addSelectionListener(new SelectionAdapter() {
        public void widgetDefaultSelected(final SelectionEvent e) {
         
        }
        public void widgetSelected(final SelectionEvent e) {
          setEnabled();
        }
      });
      butSavePassword.setLayoutData(new GridData());

      final TabItem tabItem = new TabItem(tabFolder, SWT.NONE);
      tabItem.setText("Proxy");

      final Group group_1 = new Group(tabFolder, SWT.NONE);
      final GridLayout gridLayout_3 = new GridLayout();
      gridLayout_3.numColumns = 2;
      group_1.setLayout(gridLayout_3);
      tabItem.setControl(group_1);

      useProxyButton = new Button(group_1, SWT.CHECK);
      useProxyButton.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
          txtProxyServer.setEnabled(useProxyButton.getSelection());
View Full Code Here

TOP

Related Classes of org.eclipse.swt.widgets.TabItem

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.