Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Table


        });
      }

      /* Table */
      else if (c instanceof Table) {
        Table table = (Table) c;
        table.addSelectionListener(new SelectionAdapter() {
          @Override
          public void widgetSelected(SelectionEvent e) {
            if ((e.detail & SWT.CHECK) != 0)
              run.run();
          }
        });

        table.addDragDetectListener(new DragDetectListener() {
          public void dragDetected(DragDetectEvent e) {
            run.run();
          }
        });
      }
View Full Code Here


  backWhite = new Color(parent.getDisplay(), 218, 218, 237);
  frontBlue = new Color(parent.getDisplay(), 0, 22, 135);
  frontRed = new Color(parent.getDisplay(), 255, 0, 0);

  //*-- create the table and columns
  table = new Table ( getShell(), SWT.BORDER | SWT.FULL_SELECTION );  
  table.setLinesVisible(true); table.setHeaderVisible(true);
  table.setLayout(new GridLayout() );
  tcol1 = new TableColumn( table, SWT.LEFT, 0);
  tcol2 = new TableColumn( table, SWT.LEFT, 1);

View Full Code Here

  final Composite composite = new Composite(parent, SWT.NULL);
  GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 2;
  composite.setLayout(gridLayout);

  //*-- build the table consisting of the list of directories to exclude from the scan
  table = new Table ( composite, SWT.BORDER | SWT.SINGLE );  
  table.setLinesVisible(true); table.setHeaderVisible(true);
  GridData tableGd = new GridData(); tableGd.horizontalSpan= 2; tableGd.grabExcessHorizontalSpace = true;
  tableGd.horizontalAlignment = GridData.FILL;
  table.setLayoutData(tableGd);
  TableColumn tcol1 = new TableColumn( table, SWT.LEFT, 0);
View Full Code Here

//                Messages.getString("downloadtable.status.queued"),
//                "", // IDLE status
//                Messages.getString("downloadtable.status.pauzed"),
//                Messages.getString("downloadtable.status.release") };

    mTable = new Table(pParent, SWT.BORDER | SWT.FULL_SELECTION
        | SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI);

    mTable.setHeaderVisible(true);
    GridData lData = new GridData(GridData.FILL_BOTH);
    mTable.setLayoutData(lData);
View Full Code Here

    newFolderAction.setRootMode(true);
    newFolderAction.run(null);
    fViewer.refresh();

    /* Select and Focus the added Set */
    Table table = fViewer.getTable();
    Object lastItem = table.getItem(table.getItemCount() - 1).getData();
    fViewer.setSelection(new StructuredSelection(lastItem));
    table.setFocus();
  }
View Full Code Here

    newFolderAction.setRootMode(true);
    newFolderAction.run(null);
    fViewer.refresh();

    /* Select and Focus the added Set */
    Table table = fViewer.getTable();
    Object lastItem = table.getItem(table.getItemCount() - 1).getData();
    fViewer.setSelection(new StructuredSelection(lastItem));
    table.setFocus();
  }
View Full Code Here

  final Composite composite = new Composite(parent, SWT.NULL);
  GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 2;
  composite.setLayout(gridLayout);

  //*-- build the table consisting of the list of directories to scan
  table = new Table ( composite, SWT.BORDER | SWT.SINGLE );  
  table.setLinesVisible(true); table.setHeaderVisible(true);
  GridData tableGd = new GridData(); tableGd.horizontalSpan= 2; tableGd.grabExcessHorizontalSpace = true;
  tableGd.horizontalAlignment = GridData.FILL;
  table.setLayoutData(tableGd);
  TableColumn tcol1 = new TableColumn( table, SWT.LEFT, 0);
View Full Code Here

  }

  private void updateTitle() {
    ISearchFilter problematicFilter = null;

    Table table = fViewer.getTable();
    TableItem[] items = table.getItems();
    for (TableItem item : items) {
      ISearchFilter filter = (ISearchFilter) item.getData();
      if (filter.getSearch() == null && filter.isEnabled()) {
        int index = table.indexOf(item);
        if (index < table.getItemCount() - 1) {
          problematicFilter = filter;
          break;
        }
      }
    }
View Full Code Here

    }
  }

  private void onAdd() {
    NewsFilterDialog dialog = new NewsFilterDialog(getShell());
    Table table = fViewer.getTable();
    dialog.setFilterPosition(table.getItemCount());
    if (dialog.open() == IDialogConstants.OK_ID) {
      fViewer.refresh();
      updateCheckedState();
      fViewer.setSelection(new StructuredSelection(table.getItem(table.getItemCount() - 1).getData()));
      fViewer.getTable().setFocus();
      updateTitle();
    }
  }
View Full Code Here

    /*
     * @see org.eclipse.jface.viewers.ColumnViewerToolTipSupport#getToolTipArea(org.eclipse.swt.widgets.Event)
     */
    @Override
    protected Object getToolTipArea(Event event) {
      Table table = (Table) event.widget;
      Point point = new Point(event.x, event.y);
      TableItem item = table.getItem(point);

      /* Only valid for Feed Column */
      if (item != null) {
        int feedIndex = indexOf(table, NewsColumn.FEED);
        if (feedIndex >= 0 && item.getBounds(feedIndex).contains(point))
View Full Code Here

TOP

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

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.