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


        if (c == null) {
          return;
        }
        Rectangle r = scrollComp.getClientArea();

        r.height = c.computeSize(r.width, SWT.DEFAULT).y;

        c.setBounds(r);
      }
    });
View Full Code Here

        final Control[] children = composite.getChildren();
        final int count = children.length;
        int maxWidth = 0, maxHeight = 0;
        for (int i = 0; i < count; i++) {
            final Control child = children[i];
            final 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

                } else if (i > 0) { /* we assume this window is contents */
                    hide = false;
                }

                if (!hide) {
                    Point e = w.computeSize(wHint, hHint, flushCache);
                    result.x = Math.max(result.x, e.x);
                    result.y += e.y + VGAP;
                }
            }

View Full Code Here

            for (int i = 0; i < ws.length; i++) {
                Control w = ws[i];

                if (w == seperator1) { // Separator
                    Point e = w.computeSize(SWT.DEFAULT, SWT.DEFAULT,
                            flushCache);
                    w.setBounds(clientArea.x, clientArea.y, clientArea.width,
                            e.y);
                    clientArea.y += e.y;
                    clientArea.height -= e.y;
View Full Code Here

                            e.y);
                    clientArea.y += e.y;
                    clientArea.height -= e.y;
                } else if (getToolBarControl() == w) {
                    if (toolBarChildrenExist()) {
                        Point e = w.computeSize(SWT.DEFAULT, SWT.DEFAULT,
                                flushCache);
                        w.setBounds(clientArea.x, clientArea.y,
                                clientArea.width, e.y);
                        clientArea.y += e.y + VGAP;
                        clientArea.height -= e.y + VGAP;
View Full Code Here

                        clientArea.y += e.y + VGAP;
                        clientArea.height -= e.y + VGAP;
                    }
                } else if (getCoolBarControl() == w) {
                    if (coolBarChildrenExist()) {
                        Point e = w.computeSize(clientArea.width, SWT.DEFAULT,
                                flushCache);
                        w.setBounds(clientArea.x, clientArea.y,
                                clientArea.width, e.y);
                        clientArea.y += e.y + VGAP;
                        clientArea.height -= e.y + VGAP;
View Full Code Here

                        clientArea.y += e.y + VGAP;
                        clientArea.height -= e.y + VGAP;
                    }
                } else if (statusLineManager != null
                        && statusLineManager.getControl() == w) {
                    Point e = w.computeSize(SWT.DEFAULT, SWT.DEFAULT,
                            flushCache);
                    w.setBounds(clientArea.x, clientArea.y + clientArea.height
                            - e.y, clientArea.width, e.y);
                    clientArea.height -= e.y + VGAP;
                } else {
View Full Code Here

   */
  public LayoutData getLayoutData() {
    LayoutData result = new LayoutData();
    Control control = getControl();
    if (control != null) {
      result.minimumWidth = control.computeSize(SWT.DEFAULT, SWT.DEFAULT,
          true).x;
    }
    return result;
  }

View Full Code Here

      TrimLayoutData td = (TrimLayoutData) control.getLayoutData();

      Point prefSize;
      if (horizontal) {
        //prefSize = control.computeSize(majorHint, SWT.DEFAULT);
        prefSize = control.computeSize(SWT.DEFAULT, SWT.DEFAULT);
      } else {
        prefSize = control.computeSize(SWT.DEFAULT, majorHint);
      }

      // Will this control fit onto the current line?
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.