Package org.eclipse.swt.widgets

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


    for (int i = 0; i < columnNames.length; i++) {
      TableColumn column = new TableColumn(table, SWT.NONE);
      column.setText(columnNames[i]);
      column.setWidth(columnWidths[i]);
      final int columnIndex = i;
      column.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
          sort(columnIndex);
        }
      });
    }
View Full Code Here


      });
      table.setHeaderVisible(true);
      table.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true, 3, 3));

      final TableColumn newColumnTableColumn_2 = new TableColumn(table, SWT.NONE);
      newColumnTableColumn_2.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
          sort(newColumnTableColumn_2);
          /*table.setSortColumn(newColumnTableColumn_2);

          if(table.getSortDirection() == SWT.DOWN)
View Full Code Here

      newColumnTableColumn_2.setMoveable(true);
      newColumnTableColumn_2.setWidth(176);
      newColumnTableColumn_2.setText("Name");

      final TableColumn newColumnTableColumn = new TableColumn(table, SWT.NONE);
      newColumnTableColumn.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {

          sort(newColumnTableColumn);

View Full Code Here

        newColumnTableColumn_2.setMoveable(true);
        newColumnTableColumn_2.setWidth(176);
        newColumnTableColumn_2.setText("Name");

        final TableColumn newColumnTableColumn = new TableColumn(table, SWT.NONE);
        newColumnTableColumn.addSelectionListener(new SelectionAdapter() {
          public void widgetSelected(final SelectionEvent e) {

            sort(newColumnTableColumn);

View Full Code Here

      columnProperties[columnIndex] = column.name();
      TableColumn tableColumn = new TableColumn(table, SWT.NONE, columnIndex++);
      tableColumn.setData(column);
      tableColumn.setText(column.name());
      tableColumn.setWidth(column.getWidth());
      tableColumn.addSelectionListener(new ColumnSortListener(tableViewer));

      if (column == ServiceViewColumn.Name) {
        sortColumn = tableColumn;
      }
View Full Code Here

      TableColumn tableColumn = new TableColumn(table, SWT.NONE, columnIndex++);
      tableColumn.setText(clm.getName());
      tableColumn.setWidth(clm.getWidth());
      tableColumn.setData(clm);
      columnProperties.add(clm.getName());
      tableColumn.addSelectionListener(new ColumnSortListener(tableViewer) {

        protected void refresh() {
          refreshAll();
        }
View Full Code Here

        final TableColumn column1 = new TableColumn(table, SWT.NULL);
        column1.setWidth(80);
        column1.setText(RuntimePreferenceMessages.name);
        column1.setResizable(true);
        column1.addSelectionListener(new SelectionAdapter() {

            @Override
            public void widgetSelected(final SelectionEvent e) {
                sortByName();
            }
View Full Code Here

        final TableColumn column2 = new TableColumn(table, SWT.NULL);
        column2.setWidth(150);
        column2.setText("Directory");
        column2.setResizable(true);
        column2.addSelectionListener(new SelectionAdapter() {

            @Override
            public void widgetSelected(final SelectionEvent e) {
                sortByDirectory();
            }
View Full Code Here

                                  SWT.LEFT,
                                  0 );
        column.setText( "Language Expression" );
        column.setWidth( 350 );
        // Add listener to column so sorted when clicked
        column.addSelectionListener( new SelectionAdapter() {

            public void widgetSelected(SelectionEvent e) {
                tableViewer.setSorter( new DSLMappingSorter( DSLMappingSorter.EXPRESSION ) );
            }
        } );
View Full Code Here

                                  SWT.LEFT,
                                  1 );
        column.setText( "Rule Language Mapping" );
        column.setWidth( 200 );
        // Add listener to column so sorted when clicked
        column.addSelectionListener( new SelectionAdapter() {

            public void widgetSelected(SelectionEvent e) {
                tableViewer.setSorter( new DSLMappingSorter( DSLMappingSorter.MAPPING ) );
            }
        } );
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.