@Override public void run() { size[0] = currentPage.computeSize(); } });
@Override public void run() { size[0] = currentPage.computeSize(); } });
public void run() { size[0] = currentPage.computeSize(); } });
public Point computeSize(Composite composite, int wHint, int hHint, boolean force) { if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT) { return new Point(wHint, hHint); } int x = minimumPageSize.x; int y = minimumPageSize.y; Control[] children = composite.getChildren(); for (int i = 0; i < children.length; i++) { Point size = children[i].computeSize(SWT.DEFAULT, SWT.DEFAULT, force); x = Math.max(x, size.x); y = Math.max(y, size.y); } //As pages can implement thier own computeSize //take it into account if(currentPage != null){ Point size = currentPage.computeSize(); x = Math.max(x, size.x); y = Math.max(y, size.y); } if (wHint != SWT.DEFAULT) { x = wHint; } if (hHint != SWT.DEFAULT) { y = hHint; } return new Point(x, y); }
@Override public Point computeSize(Composite composite, int wHint, int hHint, boolean force) { if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT) { return new Point(wHint, hHint); } int x = minimumPageSize.x; int y = minimumPageSize.y; Control[] children = composite.getChildren(); for (Control element : children) { Point size = element.computeSize(SWT.DEFAULT, SWT.DEFAULT, force); x = Math.max(x, size.x); y = Math.max(y, size.y); } //As pages can implement thier own computeSize //take it into account if(currentPage != null){ Point size = currentPage.computeSize(); x = Math.max(x, size.x); y = Math.max(y, size.y); } if (wHint != SWT.DEFAULT) { x = wHint; } if (hHint != SWT.DEFAULT) { y = hHint; } return new Point(x, y); }
@Override public Point computeSize(Composite composite, int wHint, int hHint, boolean force) { if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT) { return new Point(wHint, hHint); } int x = minimumPageSize.x; int y = minimumPageSize.y; Control[] children = composite.getChildren(); for (int i = 0; i < children.length; i++) { Point size = children[i].computeSize(SWT.DEFAULT, SWT.DEFAULT, force); x = Math.max(x, size.x); y = Math.max(y, size.y); } //As pages can implement thier own computeSize //take it into account if(currentPage != null){ Point size = currentPage.computeSize(); x = Math.max(x, size.x); y = Math.max(y, size.y); } if (wHint != SWT.DEFAULT) { x = wHint; } if (hHint != SWT.DEFAULT) { y = hHint; } return new Point(x, y); }