public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget(); display.runSkin (); Point size; if (layout != null) { if ((wHint == SWT.DEFAULT) || (hHint == SWT.DEFAULT)) { changed |= (state & LAYOUT_CHANGED) != 0; size = layout.computeSize (this, wHint, hHint, changed); state &= ~LAYOUT_CHANGED; } else { size = new Point (wHint, hHint); } } else { size = minimumSize (wHint, hHint, changed); if (size.x == 0) size.x = DEFAULT_WIDTH; if (size.y == 0) size.y = DEFAULT_HEIGHT; } if (wHint != SWT.DEFAULT) size.x = wHint; if (hHint != SWT.DEFAULT) size.y = hHint; Rectangle trim = computeTrim (0, 0, size.x, size.y); return new Point (trim.width, trim.height); }
void updateLayout (boolean all) { Composite parent = findDeferredControl (); if (parent != null) { parent.state |= LAYOUT_CHILD; return; } if ((state & LAYOUT_NEEDED) != 0) { boolean changed = (state & LAYOUT_CHANGED) != 0; state &= ~(LAYOUT_NEEDED | LAYOUT_CHANGED); display.runSkin (); layout.layout (this, changed); } if (all) { state &= ~LAYOUT_CHILD; Control [] children = _getChildren (); for (int i=0; i<children.length; i++) { children [i].updateLayout (all); } } } }
Composite composite = child.parent; while (child != this) { if (composite.layout == null || !composite.layout.flushCache (child)) { composite.state |= LAYOUT_CHANGED;
Composite composite = child.parent; while (child != this) { if (composite.layout == null || !composite.layout.flushCache (child)) { composite.state |= LAYOUT_CHANGED;
Composite composite = child.parent; while (child != this) { if (composite.layout == null || !composite.layout.flushCache (child)) { composite.state |= LAYOUT_CHANGED;
@Override void updateLayout (boolean all) { Composite parent = findDeferredControl (); if (parent != null) { parent.state |= LAYOUT_CHILD; return; } if ((state & LAYOUT_NEEDED) != 0) { boolean changed = (state & LAYOUT_CHANGED) != 0; state &= ~(LAYOUT_NEEDED | LAYOUT_CHANGED); display.runSkin(); layout.layout (this, changed); } if (all) { state &= ~LAYOUT_CHILD; Control [] children = _getChildren (); for (int i=0; i<children.length; i++) { children [i].updateLayout (all); } } } }
hasChanged |= hasState( LAYOUT_CHANGED ); removeState( LAYOUT_CHANGED ); size = layout.computeSize( this, wHint, hHint, hasChanged ); } else { size = new Point( wHint, hHint );
Composite composite = child.parent; while (child != this) { if (composite.layout == null || !composite.layout.flushCache (child)) { composite.state |= LAYOUT_CHANGED;
@Override void updateLayout (boolean all) { Composite parent = findDeferredControl (); if (parent != null) { parent.state |= LAYOUT_CHILD; return; } if ((state & LAYOUT_NEEDED) != 0) { boolean changed = (state & LAYOUT_CHANGED) != 0; state &= ~(LAYOUT_NEEDED | LAYOUT_CHANGED); display.runSkin(); layout.layout (this, changed); } if (all) { state &= ~LAYOUT_CHILD; Control [] children = _getChildren (); for (int i=0; i<children.length; i++) { children [i].updateLayout (all); } } } }
@Override Point computeSizeInPixels (int wHint, int hHint, boolean changed) { display.runSkin (); Point size; if (layout != null) { if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) { changed |= (state & LAYOUT_CHANGED) != 0; state &= ~LAYOUT_CHANGED; size = DPIUtil.autoScaleUp(layout.computeSize (this, DPIUtil.autoScaleDown(wHint), DPIUtil.autoScaleDown(hHint), changed)); } else { size = new Point (wHint, hHint); } } else { size = minimumSize (wHint, hHint, changed); if (size.x == 0) size.x = DEFAULT_WIDTH; if (size.y == 0) size.y = DEFAULT_HEIGHT; } if (wHint != SWT.DEFAULT) size.x = wHint; if (hHint != SWT.DEFAULT) size.y = hHint; /* * Since computeTrim can be overridden by subclasses, we cannot * call computeTrimInPixels directly. */ Rectangle trim = DPIUtil.autoScaleUp(computeTrim (0, 0, DPIUtil.autoScaleDown(size.x), DPIUtil.autoScaleDown(size.y))); return new Point (trim.width, trim.height); }
Composite composite = child.parent; while (child != this) { if (composite.layout == null || !composite.layout.flushCache (child)) { composite.state |= LAYOUT_CHANGED;
@Override void updateLayout (boolean all) { Composite parent = findDeferredControl (); if (parent != null) { parent.state |= LAYOUT_CHILD; return; } if ((state & LAYOUT_NEEDED) != 0) { boolean changed = (state & LAYOUT_CHANGED) != 0; state &= ~(LAYOUT_NEEDED | LAYOUT_CHANGED); display.runSkin(); layout.layout (this, changed); } if (all) { state &= ~LAYOUT_CHILD; Control [] children = _getChildren (); for (int i=0; i<children.length; i++) { children [i].updateLayout (all); } } } }
@Override Point computeSizeInPixels (int wHint, int hHint, boolean changed) { checkWidget (); display.runSkin(); if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0; if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0; Point size; if (layout != null) { if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) { changed |= (state & LAYOUT_CHANGED) != 0; size = DPIUtil.autoScaleUp(layout.computeSize (this, DPIUtil.autoScaleDown(wHint), DPIUtil.autoScaleDown(hHint), changed)); state &= ~LAYOUT_CHANGED; } else { size = new Point (wHint, hHint); } } else { size = minimumSize (wHint, hHint, changed); if (size.x == 0) size.x = DEFAULT_WIDTH; if (size.y == 0) size.y = DEFAULT_HEIGHT; } if (wHint != SWT.DEFAULT) size.x = wHint; if (hHint != SWT.DEFAULT) size.y = hHint; Rectangle trim = DPIUtil.autoScaleUp (computeTrim (0, 0, DPIUtil.autoScaleDown(size.x), DPIUtil.autoScaleDown(size.y))); return new Point (trim.width, trim.height); }
if (composite.layout != null) { composite.state |= LAYOUT_NEEDED; if (!composite.layout.flushCache (child)) { composite.state |= LAYOUT_CHANGED;
@Override void updateLayout (boolean resize, boolean all) { Composite parent = findDeferredControl (); if (parent != null) { parent.state |= LAYOUT_CHILD; return; } if ((state & LAYOUT_NEEDED) != 0) { boolean changed = (state & LAYOUT_CHANGED) != 0; state &= ~(LAYOUT_NEEDED | LAYOUT_CHANGED); display.runSkin(); if (resize) setResizeChildren (false); layout.layout (this, changed); if (resize) setResizeChildren (true); } if (all) { state &= ~LAYOUT_CHILD; Control [] children = _getChildren (); for (int i=0; i<children.length; i++) { children [i].updateLayout (resize, all); } } }
@Override Point computeSizeInPixels (int wHint, int hHint, boolean changed) { checkWidget (); display.runSkin(); if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0; if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0; Point size; if (layout != null) { if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) { changed |= (state & LAYOUT_CHANGED) != 0; size = DPIUtil.autoScaleUp(layout.computeSize (this, DPIUtil.autoScaleDown(wHint), DPIUtil.autoScaleDown(hHint), changed)); state &= ~LAYOUT_CHANGED; } else { size = new Point (wHint, hHint); } } else { size = minimumSize (wHint, hHint, changed); if (size.x == 0) size.x = DEFAULT_WIDTH; if (size.y == 0) size.y = DEFAULT_HEIGHT; } if (wHint != SWT.DEFAULT) size.x = wHint; if (hHint != SWT.DEFAULT) size.y = hHint; Rectangle trim = DPIUtil.autoScaleUp (computeTrim (0, 0, DPIUtil.autoScaleDown(size.x), DPIUtil.autoScaleDown(size.y))); return new Point (trim.width, trim.height); }
if (composite.layout != null) { composite.state |= LAYOUT_NEEDED; if (!composite.layout.flushCache (child)) { composite.state |= LAYOUT_CHANGED;
@Override void updateLayout( boolean resize, boolean all ) { Composite parent = findDeferredControl(); if( parent != null ) { parent.addState( LAYOUT_CHILD ); return; } if( hasState( LAYOUT_NEEDED ) ) { boolean changed = hasState( LAYOUT_CHANGED ); removeState( LAYOUT_NEEDED | LAYOUT_CHANGED ); // if (resize) setResizeChildren (false); layout.layout( this, changed ); // if (resize) setResizeChildren (true); } if( all ) { removeState( LAYOUT_CHILD ); for( Control child : children ) { child.updateLayout( resize, all ); } } }
@Override Point computeSizeInPixels (int wHint, int hHint, boolean changed) { checkWidget (); display.runSkin(); if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0; if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0; Point size; if (layout != null) { if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) { changed |= (state & LAYOUT_CHANGED) != 0; size = DPIUtil.autoScaleUp(layout.computeSize (this, DPIUtil.autoScaleDown(wHint), DPIUtil.autoScaleDown(hHint), changed)); state &= ~LAYOUT_CHANGED; } else { size = new Point (wHint, hHint); } } else { size = minimumSize (wHint, hHint, changed); if (size.x == 0) size.x = DEFAULT_WIDTH; if (size.y == 0) size.y = DEFAULT_HEIGHT; } if (wHint != SWT.DEFAULT) size.x = wHint; if (hHint != SWT.DEFAULT) size.y = hHint; Rectangle trim = DPIUtil.autoScaleUp (computeTrim (0, 0, DPIUtil.autoScaleDown(size.x), DPIUtil.autoScaleDown(size.y))); return new Point (trim.width, trim.height); }
if (composite.layout != null) { composite.state |= LAYOUT_NEEDED; if (!composite.layout.flushCache (child)) { composite.state |= LAYOUT_CHANGED;