Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Table.computeSize()


    Table table = (Table) c;
    // To avoid recursions.
    table.setLayout(null);
    // Use native layout algorithm
    Point result = table.computeSize(wHint, hHint, flush);
    table.setLayout(this);

    int width = 0;
    int size = columns.size();
    for (int i = 0; i < size; ++i) {
View Full Code Here


    for (int i = 0; i < titles.length; i++) {
      table.getColumn(i).pack();
    }

    table.setSize(table.computeSize(SWT.DEFAULT, 200));
    shell.pack();
    shell.open();
    while (!shell.isDisposed()) {
      if (!display.readAndDispatch())
        display.sleep();
View Full Code Here

        fFilterText.setText(""); //$NON-NLS-1$
        fTableViewer.setInput(newInput);

        // Resize the table's height accordingly to the new input
        Table viewerTable = fTableViewer.getTable();
        Point tableSize = viewerTable.computeSize(SWT.DEFAULT, SWT.DEFAULT);
        int tableMaxHeight = fComposite.getDisplay().getBounds().height / 2;
        // removes padding if necessary
        int tableHeight = (tableSize.y <= tableMaxHeight) ? tableSize.y
                - viewerTable.getItemHeight() - viewerTable.getItemHeight() / 2
                : tableMaxHeight;
View Full Code Here

    final Table tref = table;
    final Composite comp = tableComposite;
    tableComposite.addControlListener(new ControlAdapter() {
      public void controlResized(ControlEvent e) {
        Rectangle area = comp.getClientArea();
        Point size = tref.computeSize(SWT.DEFAULT, SWT.DEFAULT);
        ScrollBar vBar = tref.getVerticalBar();
        int width = area.width - tref.computeTrim(0,0,0,0).width - 2;
        if (size.y > area.height + tref.getHeaderHeight()) {
          Point vBarSize = vBar.getSize();
          width -= vBarSize.x;
View Full Code Here

   

    for (int i = 0; i < table.getColumnCount(); i++) {
      table.getColumn(i).pack();
    }
    table.setSize(table.computeSize(SWT.DEFAULT, 300));

    return table;

  }
 
View Full Code Here

    Table table = (Table) c;
    // To avoid recursions.
    table.setLayout(null);
    // Use native layout algorithm
    Point result = table.computeSize(wHint, hHint, flush);
    table.setLayout(this);

    int width = 0;
    int size = columns.size();
    for (int i = 0; i < size; ++i) {
View Full Code Here

   

    for (int i = 0; i < table.getColumnCount(); i++) {
      table.getColumn(i).pack();
    }
    table.setSize(table.computeSize(SWT.DEFAULT, 300));

    return table;

  }
 
View Full Code Here

   

    for (int i = 0; i < table.getColumnCount(); i++) {
      table.getColumn(i).pack();
    }
    table.setSize(table.computeSize(SWT.DEFAULT, 300));

    return table;

  }
 
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.