@Override protected boolean flushCache (Control control) { Object data = control.getLayoutData(); if (data != null) ((FillData)data).flushCache(); return true; }
Point computeChildSize (Control control, int wHint, int hHint, boolean flushCache) { FillData data = (FillData)control.getLayoutData (); if (data == null) { data = new FillData (); control.setLayoutData (data); } Point size = null; if (wHint == SWT.DEFAULT && hHint == SWT.DEFAULT) { size = data.computeSize (control, wHint, hHint, flushCache); } else { // TEMPORARY CODE int trimX, trimY; if (control instanceof Scrollable) { Rectangle rect = ((Scrollable) control).computeTrim (0, 0, 0, 0); trimX = rect.width; trimY = rect.height; } else { trimX = trimY = control.getBorderWidth () * 2; } int w = wHint == SWT.DEFAULT ? wHint : Math.max (0, wHint - trimX); int h = hHint == SWT.DEFAULT ? hHint : Math.max (0, hHint - trimY); size = data.computeSize (control, w, h, flushCache); } return size; }
Point computeChildSize (Control control, int wHint, int hHint, boolean flushCache) { FillData data = (FillData)control.getLayoutData (); if (data == null) { data = new FillData (); control.setLayoutData (data); } Point size = null; if (wHint == SWT.DEFAULT && hHint == SWT.DEFAULT) { size = data.computeSize (control, wHint, hHint, flushCache); } else { // TEMPORARY CODE int trimX, trimY; if (control instanceof Scrollable) { Rectangle rect = ((Scrollable) control).computeTrim (0, 0, 0, 0); trimX = rect.width; trimY = rect.height; } else { trimX = trimY = control.getBorderWidth () * 2; } int w = wHint == SWT.DEFAULT ? wHint : Math.max (0, wHint - trimX); int h = hHint == SWT.DEFAULT ? hHint : Math.max (0, hHint - trimY); size = data.computeSize (control, w, h, flushCache); } return size; }
Point computeChildSize (Control control, int wHint, int hHint, boolean flushCache) { FillData data = (FillData)control.getLayoutData (); if (data == null) { data = new FillData (); control.setLayoutData (data); } Point size = null; if (wHint == SWT.DEFAULT && hHint == SWT.DEFAULT) { size = data.computeSize (control, wHint, hHint, flushCache); } else { // TEMPORARY CODE int trimX, trimY; if (control instanceof Scrollable) { Rectangle rect = ((Scrollable) control).computeTrim (0, 0, 0, 0); trimX = rect.width; trimY = rect.height; } else { trimX = trimY = control.getBorderWidth () * 2; } int w = wHint == SWT.DEFAULT ? wHint : Math.max (0, wHint - trimX); int h = hHint == SWT.DEFAULT ? hHint : Math.max (0, hHint - trimY); size = data.computeSize (control, w, h, flushCache); } return size; }
@Override protected boolean flushCache (Control control) { Object data = control.getLayoutData(); if (data != null) { ((FillData)data).flushCache(); } return true; }
Point computeChildSize (Control control, int wHint, int hHint, boolean flushCache) { FillData data = (FillData)control.getLayoutData (); if (data == null) { data = new FillData (); control.setLayoutData (data); } Point size = null; if (wHint == SWT.DEFAULT && hHint == SWT.DEFAULT) { size = data.computeSize (control, wHint, hHint, flushCache); } else { // TEMPORARY CODE int trimX, trimY; if (control instanceof Scrollable) { Rectangle rect = ((Scrollable) control).computeTrim (0, 0, 0, 0); trimX = rect.width; trimY = rect.height; } else { trimX = trimY = control.getBorderWidth () * 2; } int w = wHint == SWT.DEFAULT ? wHint : Math.max (0, wHint - trimX); int h = hHint == SWT.DEFAULT ? hHint : Math.max (0, hHint - trimY); size = data.computeSize (control, w, h, flushCache); } return size; }
protected boolean flushCache (Control control) { Object data = control.getLayoutData(); if (data != null) ((FillData)data).flushCache(); return true; }
Point computeChildSize (Control control, int wHint, int hHint, boolean flushCache) { FillData data = (FillData)control.getLayoutData (); if (data == null) { data = new FillData (); control.setLayoutData (data); } Point size = null; if (wHint == SWT.DEFAULT && hHint == SWT.DEFAULT) { size = data.computeSize (control, wHint, hHint, flushCache); } else { // TEMPORARY CODE int trimX, trimY; if (control instanceof Scrollable) { Rectangle rect = ((Scrollable) control).computeTrim (0, 0, 0, 0); trimX = rect.width; trimY = rect.height; } else { trimX = trimY = control.getBorderWidth () * 2; } int w = wHint == SWT.DEFAULT ? wHint : Math.max (0, wHint - trimX); int h = hHint == SWT.DEFAULT ? hHint : Math.max (0, hHint - trimY); size = data.computeSize (control, w, h, flushCache); } return size; }
@Override protected boolean flushCache (Control control) { Object data = control.getLayoutData(); if (data != null) ((FillData)data).flushCache(); return true; }
Point computeChildSize (Control control, int wHint, int hHint, boolean flushCache) { FillData data = (FillData)control.getLayoutData (); if (data == null) { data = new FillData (); control.setLayoutData (data); } Point size = null; if (wHint == SWT.DEFAULT && hHint == SWT.DEFAULT) { size = data.computeSize (control, wHint, hHint, flushCache); } else { // TEMPORARY CODE int trimX, trimY; if (control instanceof Scrollable) { Rectangle rect = ((Scrollable) control).computeTrim (0, 0, 0, 0); trimX = rect.width; trimY = rect.height; } else { BoxDimensions border = control.getAdapter( ControlThemeAdapter.class ).getBorder( control ); trimX = border.left + border.right; trimY = border.top + border.bottom; } int w = wHint == SWT.DEFAULT ? wHint : Math.max (0, wHint - trimX); int h = hHint == SWT.DEFAULT ? hHint : Math.max (0, hHint - trimY); size = data.computeSize (control, w, h, flushCache); } return size; }
@Override protected boolean flushCache (Control control) { Object data = control.getLayoutData(); if (data != null) ((FillData)data).flushCache(); return true; }
@Override protected boolean flushCache (Control control) { Object data = control.getLayoutData(); if (data != null) ((FillData)data).flushCache(); return true; }
Point computeSize (Control control, int wHint, int hHint, boolean flushCache) { if (flushCache) flushCache(); if (wHint == SWT.DEFAULT && hHint == SWT.DEFAULT) { if (defaultWidth == -1 || defaultHeight == -1) { Point size = control.computeSize (wHint, hHint, flushCache); defaultWidth = size.x; defaultHeight = size.y; } return new Point(defaultWidth, defaultHeight); } if (currentWidth == -1 || currentHeight == -1 || wHint != currentWhint || hHint != currentHhint) { Point size = control.computeSize (wHint, hHint, flushCache); currentWhint = wHint; currentHhint = hHint; currentWidth = size.x; currentHeight = size.y; } return new Point(currentWidth, currentHeight); } void flushCache () {
Point computeSize (Control control, int wHint, int hHint, boolean flushCache) { if (flushCache) flushCache(); if (wHint == SWT.DEFAULT && hHint == SWT.DEFAULT) { if (defaultWidth == -1 || defaultHeight == -1) { Point size = control.computeSize (wHint, hHint, flushCache); defaultWidth = size.x; defaultHeight = size.y; } return new Point(defaultWidth, defaultHeight); } if (currentWidth == -1 || currentHeight == -1 || wHint != currentWhint || hHint != currentHhint) { Point size = control.computeSize (wHint, hHint, flushCache); currentWhint = wHint; currentHhint = hHint; currentWidth = size.x; currentHeight = size.y; } return new Point(currentWidth, currentHeight); } void flushCache () {
Point computeSize (Control control, int wHint, int hHint, boolean flushCache) { if (flushCache) flushCache(); if (wHint == SWT.DEFAULT && hHint == SWT.DEFAULT) { if (defaultWidth == -1 || defaultHeight == -1) { Point size = control.computeSize (wHint, hHint, flushCache); defaultWidth = size.x; defaultHeight = size.y; } return new Point(defaultWidth, defaultHeight); } if (currentWidth == -1 || currentHeight == -1 || wHint != currentWhint || hHint != currentHhint) { Point size = control.computeSize (wHint, hHint, flushCache); currentWhint = wHint; currentHhint = hHint; currentWidth = size.x; currentHeight = size.y; } return new Point(currentWidth, currentHeight); } void flushCache () {
Point computeSize (Control control, int wHint, int hHint, boolean flushCache) { if (flushCache) flushCache(); if (wHint == SWT.DEFAULT && hHint == SWT.DEFAULT) { if (defaultWidth == -1 || defaultHeight == -1) { Point size = control.computeSize (wHint, hHint, flushCache); defaultWidth = size.x; defaultHeight = size.y; } return new Point(defaultWidth, defaultHeight); } if (currentWidth == -1 || currentHeight == -1 || wHint != currentWhint || hHint != currentHhint) { Point size = control.computeSize (wHint, hHint, flushCache); currentWhint = wHint; currentHhint = hHint; currentWidth = size.x; currentHeight = size.y; } return new Point(currentWidth, currentHeight); } void flushCache () {
Point computeSize (Control control, int wHint, int hHint, boolean flushCache) { if (flushCache) flushCache(); if (wHint == SWT.DEFAULT && hHint == SWT.DEFAULT) { if (defaultWidth == -1 || defaultHeight == -1) { Point size = control.computeSize (wHint, hHint, flushCache); defaultWidth = size.x; defaultHeight = size.y; } return new Point(defaultWidth, defaultHeight); } if (currentWidth == -1 || currentHeight == -1 || wHint != currentWhint || hHint != currentHhint) { Point size = control.computeSize (wHint, hHint, flushCache); currentWhint = wHint; currentHhint = hHint; currentWidth = size.x; currentHeight = size.y; } return new Point(currentWidth, currentHeight); } void flushCache () {
Point computeSize (Control control, int wHint, int hHint, boolean flushCache) { if (flushCache) flushCache(); if (wHint == SWT.DEFAULT && hHint == SWT.DEFAULT) { if (defaultWidth == -1 || defaultHeight == -1) { Point size = control.computeSize (wHint, hHint, flushCache); defaultWidth = size.x; defaultHeight = size.y; } return new Point(defaultWidth, defaultHeight); } if (currentWidth == -1 || currentHeight == -1 || wHint != currentWhint || hHint != currentHhint) { Point size = control.computeSize (wHint, hHint, flushCache); currentWhint = wHint; currentHhint = hHint; currentWidth = size.x; currentHeight = size.y; } return new Point(currentWidth, currentHeight); } void flushCache () {