Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.List


    /*
     * Creates a list-component filled with the accounts.
     */
    protected void createAccountList(Composite composite) {

        accountList = new List(composite, SWT.BORDER | SWT.H_SCROLL
            | SWT.V_SCROLL);
        GridData data = new GridData(GridData.FILL_BOTH);
        accountList.setLayoutData(data);
        for (XMPPAccount account : accountStore.getAllAccounts()) {
            accountList.add(account.toString());
View Full Code Here


    Label label = new Label(this.main_container, SWT.NONE);
    label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1));
    label.setText("Additional include directories");
   
    this.lviewer = new ListViewer(main_container, SWT.BORDER | SWT.V_SCROLL);
    List dir_list = this.lviewer.getList();
    GridData gd_list = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 2);
    gd_list.minimumWidth = MIN_LIST_WIDTH;
    dir_list.setLayoutData(gd_list);
   
    this.fillList();
   
    GridData gd_btns = new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1);
    gd_btns.minimumWidth = MIN_BUTTON_WIDTH;
View Full Code Here

     
     
      this.existing_ws_label = new Label(g_select, SWT.NONE);
      this.existing_ws_label.setText("Existing workspace folder:");

      this.existent = new List(g_select, SWT.BORDER);
      this.existent.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
      this.fillWorkspaceList();

      new Label(g_select, SWT.NULL);
     
View Full Code Here

    editorComposite.setLayout(layout);
    gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_VERTICAL);
    gd.horizontalSpan = 2;
    editorComposite.setLayoutData(gd);

    fAppearanceColorList = new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL | SWT.BORDER);
    gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
    gd.heightHint = convertHeightInCharsToPixels(7);
    fAppearanceColorList.setLayoutData(gd);

    Composite stylesComposite = new Composite(editorComposite, SWT.NONE);
View Full Code Here

                    if (superResult || currentValue.equals("")) {
                        return _updateSources();
                    }
                }

                List list = _sources.getListControl(_getParent(_sources));
                list.removeAll();
                return false;
            }

            private String _lastString = null;
        };

        GridData gridData = new GridData();
        gridData.widthHint = 0;
        gridData.horizontalAlignment = SWT.FILL;
        gridData.grabExcessHorizontalSpace = true;
        _sourceList.getTextControl(currentComposite).setLayoutData(gridData);
        _sourceList.setFileExtensions(new String[] { "*.lst", "*.*" });
        _setParent(_sourceList, currentComposite);
        addField(_sourceList);

        currentComposite = _newComposite(composite);
        _sources = new ListEditor(PreferenceConstants.BACKTRACK_SOURCES,
                "&Sources", currentComposite) {
            protected String createList(String[] items) {
                return Strings.encodeFileNames(items);
            }

            protected void doStore() {
                if (_sourcesModified) {
                    List list = getListControl(_getParent(this));
                    String[] items = list.getItems();
                    String fileName = _sourceList.getStringValue();

                    try {
                        PrintWriter writer = new PrintWriter(
                                new FileOutputStream(fileName));
View Full Code Here

     *
     *  @return true if the update is successful; false, otherwise.
     */
    private boolean _updateSources() {
        String fileName = _sourceList.getStringValue();
        List list = _sources.getListControl(_getParent(_sources));
        list.removeAll();

        if (fileName.equals("")) {
            return true;
        }

        File sourceListFile = new File(fileName);
        File sourceListPath = sourceListFile.getParentFile();

        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(
                    new FileInputStream(fileName)));
            String line;

            while ((line = reader.readLine()) != null) {
                File file = new File(sourceListPath, line);

                if (!file.exists()) {
                    MessageDialog.openError(getShell(), "Error",
                            "Cannot open source file \"" + line + "\".");
                    throw new FileNotFoundException();
                }

                list.add(line);
            }

            reader.close();
            return true;
        } catch (Exception e) {
            list.removeAll();
            return false;
        }
    }
View Full Code Here

    solutionTablesLabel.setBackground(labelColor, new int[] { 100 });
    solutionTablesLabel.setFont(new Font(null, "Tahoma", 8, SWT.BOLD));
    solutionTablesLabel.setText("Solution tables");
    solutionTablesLabel.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false, 1, 1));
   
    solutionFileList = new List(composite, SWT.BORDER | SWT.SIMPLE | SWT.H_SCROLL | SWT.V_SCROLL);
    solutionFileList.setToolTipText("Select which table you want to see");
    GridData fileListLayoutData = new GridData(SWT.FILL, SWT.BEGINNING, true, true, 1, 1);
    solutionFileList.setLayoutData(fileListLayoutData);
    solutionFileList.addSelectionListener(solutionFileListSelectionListener);
    solutionFileList.add("Results", 0);
View Full Code Here

    sourceTablesLabel.setBackground(labelColor, new int[] { 100 });
    sourceTablesLabel.setFont(new Font(null, "Tahoma", 8, SWT.BOLD));
    sourceTablesLabel.setText("Source tables");
    sourceTablesLabel.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, false, false, 1, 1));

    sourceFileList = new List(composite, SWT.BORDER | SWT.SIMPLE | SWT.H_SCROLL | SWT.V_SCROLL);
    sourceFileList.setToolTipText("Select which table you want to edit");
    sourceFileList.setLayoutData(fileListLayoutData);
    sourceFileList.addSelectionListener(sourceFileListSelectionListener);
    sourceFileList.add("Resource needs", 0);
    sourceFileList.add("Atomic jobs", 1);
View Full Code Here

      public void widgetSelected(SelectionEvent e) {
        updateList();
      }
    });

    associatedViews = new List(
        leftPanel, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
    associatedViews.setLayoutData(
        new GridData(SWT.FILL, SWT.FILL, true, true));
    // fill associated Views list.
    updateList();
View Full Code Here

    gridData = new GridData(GridData.FILL, GridData.CENTER, false, false);
    filterButton.setLayoutData(gridData);

    //EntityList
   
    entityList = new List(shell,
      SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
    //setItems of List in sorted form
    entityList.setItems(allEntityNames);
    gridData = new GridData(GridData.FILL, GridData.FILL, true, true);
    gridData.verticalSpan = 20;
View Full Code Here

TOP

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

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.