Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.List.addSelectionListener()


                SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
        GridData listGridData = new GridData(GridData.FILL_BOTH);
        listGridData.heightHint = HEIGHT_HINT;
        listGridData.widthHint = WIDTH_HINT;
        list.setLayoutData(listGridData);
        list.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent selectionEvent) {
                updateButtons();
            }
        });
        return list;
View Full Code Here


        final List columnList = new List(container, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI);
        columnList.setBounds(40, 20, 220, 100);
        columnList.setItems(columnTitle);

        columnList.addSelectionListener(
                new SelectionAdapter() {
                    public void widgetSelected (SelectionEvent e) {
                        selectedColumn.clear();
                        selectedColumn.addAll(Arrays.asList(columnList.getSelection()));
                    }});
View Full Code Here

 
  public ExpandMenu createExpandMenu(Composite com, int style){ return new ExpandMenu(com, style); }
 
  public List createList(Composite com, int style, String[] text, SelectionListener listener){
    List widget = createList(com, style, text);
    widget.addSelectionListener(listener);
    return widget;
  }
 
  public Table createTable(Composite com,
      int style, String [] cols, int [] w, SelectionListener listener){
View Full Code Here

    export.setAlignment(SWT.CENTER);
    export.setBounds(677, 149, 38, 38);

    Label label = new Label(this, SWT.SEPARATOR | SWT.HORIZONTAL);
    label.setBounds(677, 143, 36, 2);
    listMot.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        terme.setText("\""
            + listMot.getItem(listMot.getSelectionIndex()) + "\"");
        int index = listMot.getSelectionIndex();
View Full Code Here

   
    editorChooser.addSelectionListener(new ChosenEditorListener(editorChooser, tokenList));
    filterField.addModifyListener(new FilterListener(tokenList));
   
    listener = (new SelectedTokenListener(tokenList, selector, fontStyle));
    tokenList.addSelectionListener(new SelectedTokenListener(tokenList, selector, fontStyle));   
    selector.addListener(new ColorChangeListener(selector, tokenList));
    fontStyle.addSelectionListener(new FontStyleChangeListener(fontStyle, tokenList));
   
    if(editorChooser.getItemCount()>0){
      editorChooser.select(0);
View Full Code Here

  private List createList(Composite parent) {
    final List l = new List(parent, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
    l.setLayoutData(new GridData(GridData.FILL_BOTH
        | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL));

    l.addSelectionListener(new SelectionListener() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        boolean isSelected = l.getSelectionCount() > 0;
        getEditButton().setEnabled(isSelected);
View Full Code Here

*            the parent of the new text field
* @return the new text field
*/
private List createList(Composite parent) {
  List list = new List(parent, SWT.MULTI | SWT.BORDER);
  list.addSelectionListener(this);
  GridData data = new GridData();
  data.horizontalSpan = 2;
  data.horizontalAlignment = GridData.FILL;
  data.grabExcessHorizontalSpace = true;
  data.verticalAlignment = GridData.CENTER;
View Full Code Here

            final List list = new List(parent, SWT.BORDER | SWT.V_SCROLL
                    | (sc.isMultiple() ? SWT.MULTI : SWT.SINGLE));
            list.setItems((String[]) _labels
                .toArray(new String[_labels.size()]));

            list.addSelectionListener(new SelectionAdapter() {
                public void widgetSelected(SelectionEvent e) {
                    if (sc.isMultiple()) {
                        int[] indices = list.getSelectionIndices();
                        String[] values = new String[indices.length];
                        for (int i = 0; i < indices.length; i++) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.