Package org.eclipse.swt.widgets

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


  void addColumn(final TreeViewerColumn viewerColumn, final int columnidx) {
    final TreeColumn column = viewerColumn.getColumn();
    if (settings.getSortColumn() == columnidx) {
      setSortColumnAndDirection(column, settings.isReverseSort());
    }
    column.addSelectionListener(new SelectionListener() {
      public void widgetSelected(SelectionEvent e) {
        settings.toggleSortColumn(columnidx);
        setSortColumnAndDirection(column, settings.isReverseSort());
        view.refreshViewer();
      }
View Full Code Here


        // Adding columns
        TreeColumn serverColumn = new TreeColumn( tree, SWT.SINGLE );
        serverColumn.setText( Messages.getString( "ServersView.server" ) ); //$NON-NLS-1$
        serverColumn.setWidth( columnWidths[0] );
        serverColumn.addSelectionListener( getColumnSelectionListener( 0 ) );
        tree.setSortColumn( serverColumn );
        tree.setSortDirection( SWT.UP );

        TreeColumn stateColumn = new TreeColumn( tree, SWT.SINGLE );
        stateColumn.setText( Messages.getString( "ServersView.state" ) ); //$NON-NLS-1$
View Full Code Here

        tree.setSortDirection( SWT.UP );

        TreeColumn stateColumn = new TreeColumn( tree, SWT.SINGLE );
        stateColumn.setText( Messages.getString( "ServersView.state" ) ); //$NON-NLS-1$
        stateColumn.setWidth( columnWidths[1] );
        stateColumn.addSelectionListener( getColumnSelectionListener( 1 ) );

        // Creating the viewer
        tableViewer = new ServersTableViewer( tree );

        initActions();
View Full Code Here

        // Adding columns
        TreeColumn serverColumn = new TreeColumn( tree, SWT.SINGLE );
        serverColumn.setText( Messages.getString( "ServersView.server" ) ); //$NON-NLS-1$
        serverColumn.setWidth( columnWidths[0] );
        serverColumn.addSelectionListener( getColumnSelectionListener( 0 ) );
        tree.setSortColumn( serverColumn );
        tree.setSortDirection( SWT.UP );

        TreeColumn stateColumn = new TreeColumn( tree, SWT.SINGLE );
        stateColumn.setText( Messages.getString( "ServersView.state" ) ); //$NON-NLS-1$
View Full Code Here

        tree.setSortDirection( SWT.UP );

        TreeColumn stateColumn = new TreeColumn( tree, SWT.SINGLE );
        stateColumn.setText( Messages.getString( "ServersView.state" ) ); //$NON-NLS-1$
        stateColumn.setWidth( columnWidths[1] );
        stateColumn.addSelectionListener( getColumnSelectionListener( 1 ) );

        // Creating the viewer
        tableViewer = new ServersTableViewer( tree );

        initActions();
View Full Code Here

        // Adding columns
        TreeColumn serverColumn = new TreeColumn( tree, SWT.SINGLE );
        serverColumn.setText( "Server" );
        serverColumn.setWidth( columnWidths[0] );
        serverColumn.addSelectionListener( getHeaderListener( 0 ) );
        tree.setSortColumn( serverColumn );
        tree.setSortDirection( SWT.UP );

        TreeColumn stateColumn = new TreeColumn( tree, SWT.SINGLE );
        stateColumn.setText( "State" );
View Full Code Here

        tree.setSortDirection( SWT.UP );

        TreeColumn stateColumn = new TreeColumn( tree, SWT.SINGLE );
        stateColumn.setText( "State" );
        stateColumn.setWidth( columnWidths[1] );
        stateColumn.addSelectionListener( getHeaderListener( 1 ) );

        // Creating the viewer
        tableViewer = new ServersTableViewer( tree );

        initActions();
View Full Code Here

    final TreeColumn column = viewerColumn.getColumn();
    column.setText(title);
    column.setWidth(bound);
    column.setResizable(true);
    column.setMoveable(true);
    column.addSelectionListener(getSelectionAdapter(column, colNumber));
    return viewerColumn;
  }

  protected int addColumnFunction(int bounds, int column, final Function1 function, String columnName, CellLabelProvider labelProvider) {
    addFunction(function);
View Full Code Here

          else
            tree.setSortColumn((TreeColumn) e.widget);
          tree.setSortDirection(sortDirection);
        }
      };
      column.addSelectionListener(listener);
      column.setData("SortListener", listener); //$NON-NLS-1$
    }
  }

  void packColumns(Tree tree) {
View Full Code Here

    resourcesTree.setHeaderVisible(true);
    TreeColumn statCol = new TreeColumn(resourcesTree, SWT.LEFT);
    statCol.setText(UIText.CommitDialog_Status);
    statCol.setWidth(150);
    statCol.addSelectionListener(new HeaderSelectionListener(
        CommitItem.Order.ByStatus));

    TreeColumn resourceCol = new TreeColumn(resourcesTree, SWT.LEFT);
    resourceCol.setText(UIText.CommitDialog_Path);
    resourceCol.setWidth(415);
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.