Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Table


    } else if (focus instanceof Tree) {
      Tree tree= (Tree)focus;
      clientArea= tree.getClientArea();
      result= computeMenuLocation(tree);
    } else if (focus instanceof Table) {
      Table table= (Table)focus;
      clientArea= table.getClientArea();
      result= computeMenuLocation(table);
    }
    if (result == null) {
      result= focus.toControl(cursorLocation);
    }
View Full Code Here


    this.setLayout(layout);
   
        GridData tblLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
        //tblLayoutData.verticalSpan = 2;
   
        _table = new Table(this, _tableStyle);
        _table.setHeaderVisible(true);         
        _table.setLayoutData(tblLayoutData)
       
       
        createColumns();
View Full Code Here

    Color bg = getShell().getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);

    GridData tblLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true);

    _table = new Table(composite, SWT.FULL_SELECTION | SWT.BORDER );
    _table.setHeaderVisible(true);
   
    TableColumn column1 = new TableColumn(_table, SWT.FILL);
    column1.setText("Name");
    TableColumn column2 = new TableColumn(_table, SWT.FILL);
View Full Code Here

  panel.setLayout(layout);
 
  final Label lblStatus = new Label(panel,SWT.NULL);
  Messages.setLanguageText(lblStatus,"uninstallPluginsWizard.list.loaded");
 
  pluginList = new Table(panel,SWT.BORDER | SWT.V_SCROLL | SWT.CHECK | SWT.FULL_SELECTION | SWT.SINGLE);
  pluginList.setHeaderVisible(true);
  GridData data = new GridData(GridData.FILL_HORIZONTAL);
  data.heightHint = 200;
  pluginList.setLayoutData(data);
 
View Full Code Here

    Composite container = new Composite(parent, SWT.NULL);
    GridLayout layout = new GridLayout();
    layout.numColumns = 1;
    container.setLayout(layout);
   
    _tabLibraries = new Table(container, SWT.CHECK|SWT.READ_ONLY);
    GridData tabLayout = new GridData(GridData.FILL_BOTH);
    _tabLibraries.setLayoutData(tabLayout);
   
    _tabLibraries.addSelectionListener(new SelectionAdapter() {
View Full Code Here

    grid_data.widthHint = 150;
    rhs.setLayoutData(grid_data);

      // table
   
    buddy_table = new Table(rhs, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION | SWT.VIRTUAL);

    String[] headers = {
        "azbuddy.ui.table.name" };

    int[] sizes = { 150 };
View Full Code Here

    loadingPanel.setLayout(new FormLayout());
   
    listPanel = new Composite(mainComposite,SWT.NONE);
    listPanel.setLayout(new FillLayout());
   
    subscriptionsList = new Table(listPanel,SWT.V_SCROLL | SWT.SINGLE | SWT.FULL_SELECTION | SWT.VIRTUAL);
    subscriptionsList.setHeaderVisible(true);
   
    TableColumn name = new TableColumn(subscriptionsList,SWT.NONE);
    name.setText(MessageText.getString("subscriptions.listwindow.name"));
    name.setWidth(310);
View Full Code Here

    Group gActivity = new Group(panel,SWT.NONE);
    Messages.setLanguageText(gActivity,"DHTView.activity.title");
    gActivity.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
    gActivity.setLayout(new GridLayout());
   
    activityTable = new Table(gActivity,SWT.VIRTUAL | SWT.BORDER | SWT.FULL_SELECTION | SWT.SINGLE);
    activityTable.setLayoutData(new GridData(GridData.FILL_BOTH));
   
    final TableColumn colStatus =  new TableColumn(activityTable,SWT.LEFT);
    Messages.setLanguageText(colStatus,"DHTView.activity.status");
    colStatus.setWidth(80);
View Full Code Here

    if (bForceClear
        || image.getImageData().getTransparencyType() != SWT.TRANSPARENCY_NONE) {
      // images with transparency need their area cleared first, otherwise we
      // end up multiplying values (alpha type) or not clearing pixels
      // (all types)
      Table table = getTable();

      Rectangle bounds = getBoundsForCanvas();
      //In case item isn't displayed bounds is null
      if (bounds == null)
        return;

      // This should trigger a doPaint(gc)
      table.redraw(bounds.x, bounds.y, bounds.width, bounds.height, true);
    } else {
      doPaint((GC) null);
    }
  }
View Full Code Here

    if (bounds == null || image == null || image.isDisposed()) {
      //System.out.println(row.getIndex() + " nb");
      return;
    }
   
    Table table = getTable();

//    System.out.println("doPnt#" + row.getIndex()+": " +
//        ((gc == null) ? "GC NULL" : String.valueOf(gc.getClipping())) +
//        "ta="+table.getClientArea()+";bounds="+bounds);

    Rectangle imageBounds = image.getBounds();
   
    if (imageBounds.width <= 0 || imageBounds.height <= 0 || bounds.width <= 0
        || bounds.height <= 0) {
      //System.out.println(row.getIndex() + " < 0");
      return;
    }

    Rectangle tableBounds = table.getClientArea();
    if (bounds.y + bounds.height - tableBounds.y < table.getHeaderHeight()
        || bounds.y > tableBounds.height) {
//      System.out.println("doPnt#" + row.getIndex() + ": "
//          + (bounds.y + bounds.height - tableBounds.y) + "<" + tableBounds.y
//          + " || " + bounds.y + " > " + tableBounds.height);
      return;
    }
   
    if (orientation == SWT.FILL) {
      if (imageBounds.width != bounds.width
          || imageBounds.height != bounds.height) {
        //System.out.println("doPaint() sizewrong #"+row.getIndex()+ ".  Image="+imageBounds +";us="+bounds);
/**/
        // Enable this for semi-fast visual update with some flicker
        boolean ourGC = (gc == null);
        if (ourGC)
          gc = new GC(table);
        if (gc != null) {
          int iAdj = VerticalAligner.getTableAdjustVerticalBy(table);
          bounds.y += iAdj;
          iAdj = VerticalAligner.getTableAdjustHorizontallyBy(table);
          bounds.x += iAdj;

          gc.drawImage(image, 0, 0, imageBounds.width, imageBounds.height,
                       bounds.x, bounds.y, bounds.width, bounds.height);
          if (ourGC)
            gc.dispose();
        }
        // _OR_ enable refresh() for slower visual update with lots of flicker
        //refresh();
       
        // OR, disable both and image will be updated on next graphic bar update
       
        // TODO: make config option to choose
/**/
        invalidate();
        return;
      }
    } else {
      if (imageBounds.width < bounds.width) {
        if (orientation == SWT.CENTER)
          bounds.x += (bounds.width - imageBounds.width) / 2;
        else if (orientation == SWT.RIGHT)
          bounds.x = (bounds.x + bounds.width) - imageBounds.width;
      }

      if (imageBounds.height < bounds.height) {
        bounds.y += (bounds.height - imageBounds.height) / 2;
      }
    }
   
    Rectangle clipping = new Rectangle(bounds.x, bounds.y,
                                       bounds.width,
                                       bounds.height);
    int iMinY = table.getHeaderHeight() + tableBounds.y;
    if (clipping.y < iMinY) {
      clipping.height -= iMinY - clipping.y;
      clipping.y = iMinY;
    }
    int iMaxY = tableBounds.height + tableBounds.y;
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.