Package org.eclipse.swt.widgets

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


    Control[] children = composite.getChildren();
    int count = children.length;
    int maxWidth = 0, maxHeight = 0;
    for (int i = 0; i < count; i++) {
      Control child = children[i];
      Point pt = child.computeSize(SWT.DEFAULT, SWT.DEFAULT, flushCache);
      maxWidth = Math.max(maxWidth, pt.x);
      maxHeight = Math.max(maxHeight, pt.y);
    }

    if (wHint != SWT.DEFAULT)
View Full Code Here


    TableColumn[] columns = viewer.getTable().getColumns();
    for (TableColumn t : columns) {
      Control combo = map.get(t);
      int width = t.getWidth();
      if (combo != null) {
        Point computeSize = combo.computeSize(width, -1);
        combo.setLocation(x + 1, 0);
        combo.setSize(width - 1, computeSize.y + 4);
        if (combo instanceof Composite) {
          Composite m = (Composite) combo;
          m.layout(true);
View Full Code Here

    TableColumn[] columns = viewer.getTable().getColumns();
    for (TableColumn t : columns) {
      Control combo = map.get(t);
      int width = t.getWidth();
      if (combo != null) {
        Point computeSize = combo.computeSize(width, -1);
        combo.setLocation(x + 1, 0);
        combo.setSize(width - 1, computeSize.y + 4);
        if (combo instanceof Composite) {
          Composite m = (Composite) combo;
          m.layout(true);
View Full Code Here

  int controlH = 0;
  // preferred size of controls in tab items
  for (int i = 0; i < items.length; i++) {
    Control control = items[i].getControl();
    if (control != null && !control.isDisposed()){
      Point size = control.computeSize (wHint, hHint, flushCache);
      controlW = Math.max (controlW, size.x);
      controlH = Math.max (controlH, size.y);
    }
  }
View Full Code Here

        Control[] children = composite.getChildren();
       
        for (int i = 0; i < children.length; i++) {
            Control control = children[i];
           
            Point sz = control.computeSize(wHint, hHint, flushCache);
           
            resultX = Math.max(resultX, sz.x + 2 * xmargin);
            resultY = Math.max(resultY, sz.y + 2 * ymargin);
        }
       
View Full Code Here

            Control[] ctrls = composite.getChildren();
            Point p = null;
            for (int i = 0; i < ctrls.length; i++) {
                Control w = ctrls[i];
                if (menusep == w) {
                    p = w.computeSize(wHint, hHint, flushCache);
                    result.y += p.y;
                }
                else if (switcher == w) {
                    p = w.computeSize(wHint, hHint, flushCache);
                    result.x += p.x;
View Full Code Here

                if (menusep == w) {
                    p = w.computeSize(wHint, hHint, flushCache);
                    result.y += p.y;
                }
                else if (switcher == w) {
                    p = w.computeSize(wHint, hHint, flushCache);
                    result.x += p.x;
                    result.y += p.y;
                }
                else if (switchersep == w) {
                    p = w.computeSize(wHint, hHint, flushCache);
View Full Code Here

                    p = w.computeSize(wHint, hHint, flushCache);
                    result.x += p.x;
                    result.y += p.y;
                }
                else if (switchersep == w) {
                    p = w.computeSize(wHint, hHint, flushCache);
                    result.x += p.x;
                }
                else if (consolearea == w) {
                    p = w.computeSize(wHint, hHint, flushCache);
                    result.y += DIM_CONSOLE_HEIGHT;
View Full Code Here

                else if (switchersep == w) {
                    p = w.computeSize(wHint, hHint, flushCache);
                    result.x += p.x;
                }
                else if (consolearea == w) {
                    p = w.computeSize(wHint, hHint, flushCache);
                    result.y += DIM_CONSOLE_HEIGHT;
                }
                else if (pagearea == w) {
                    p = w.computeSize(wHint, hHint, flushCache);
                    result.x += p.x;
View Full Code Here

                else if (consolearea == w) {
                    p = w.computeSize(wHint, hHint, flushCache);
                    result.y += DIM_CONSOLE_HEIGHT;
                }
                else if (pagearea == w) {
                    p = w.computeSize(wHint, hHint, flushCache);
                    result.x += p.x;
                    result.y = p.y + DIM_CONSOLE_HEIGHT;
                }
            }
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.