Package org.eclipse.swt.widgets

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


                StatusLineLayoutData data = (StatusLineLayoutData) w
                        .getLayoutData();
                if (data == null) {
          data = DEFAULT_DATA;
        }
                Point e = w.computeSize(data.widthHint, data.heightHint,
                        changed);
                if (useWidth) {
                    totalWidth += e.x;
                    totalCnt++;
                }
View Full Code Here


                StatusLineLayoutData data = (StatusLineLayoutData) w
                        .getLayoutData();
                if (data == null) {
          data = DEFAULT_DATA;
        }
                int width = w.computeSize(data.widthHint, h, flushCache).x;
                ws[i] = width;
                totalWidth += width + GAP;
            }

            int diff = rect.width - totalWidth;
View Full Code Here

        control.getDisplay().syncExec(new Runnable() {
          public void run() {
            if(control.isDisposed()) {
              return;
            }
            Point cSize = control.computeSize(SWT.DEFAULT, SWT.DEFAULT);
            result.set(new Dimension(cSize.x, cSize.y));
          }
        });
        return result.get();
      }
View Full Code Here

            result.set(new Dimension(cSize.x, cSize.y));
          }
        });
        return result.get();
      }
      Point cSize = control.computeSize(SWT.DEFAULT, SWT.DEFAULT);
      return new Dimension(cSize.x, cSize.y);
    }
  }

  @Override
View Full Code Here

    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

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.