int computeHeight (Control control, FormData data, boolean flushCache) { FormAttachment top = data.getTopAttachment (control, spacing, flushCache); FormAttachment bottom = data.getBottomAttachment (control, spacing, flushCache); FormAttachment height = bottom.minus (top); if (height.numerator == 0) { if (bottom.numerator == 0) return bottom.offset; if (bottom.numerator == bottom.denominator) return -top.offset; if (bottom.offset <= 0) { return -top.offset * top.denominator / bottom.numerator; } int divider = bottom.denominator - bottom.numerator; return bottom.denominator * bottom.offset / divider; } return height.solveY (data.getHeight (control, flushCache)); }
int computeHeight (Control control, FormData data, boolean flushCache) { FormAttachment top = data.getTopAttachment (control, spacing, flushCache); FormAttachment bottom = data.getBottomAttachment (control, spacing, flushCache); FormAttachment height = bottom.minus (top); if (height.numerator == 0) { if (bottom.numerator == 0) return bottom.offset; if (bottom.numerator == bottom.denominator) return -top.offset; if (bottom.offset <= 0) { return -top.offset * top.denominator / bottom.numerator; } int divider = bottom.denominator - bottom.numerator; return bottom.denominator * bottom.offset / divider; } return height.solveY (data.getHeight (control, flushCache)); }
int computeHeight (Control control, FormData data, boolean flushCache) { FormAttachment top = data.getTopAttachment (control, spacing, flushCache); FormAttachment bottom = data.getBottomAttachment (control, spacing, flushCache); FormAttachment height = bottom.minus (top); if (height.numerator == 0) { if (bottom.numerator == 0) return bottom.offset; if (bottom.numerator == bottom.denominator) return -top.offset; if (bottom.offset <= 0) { return -top.offset * top.denominator / bottom.numerator; } int divider = bottom.denominator - bottom.numerator; return bottom.denominator * bottom.offset / divider; } return height.solveY (data.getHeight (control, flushCache)); }
int computeHeight (Control control, FormData data, boolean flushCache) { FormAttachment top = data.getTopAttachment (control, spacing, flushCache); FormAttachment bottom = data.getBottomAttachment (control, spacing, flushCache); FormAttachment height = bottom.minus (top); if (height.numerator == 0) { if (bottom.numerator == 0) return bottom.offset; if (bottom.numerator == bottom.denominator) return -top.offset; if (bottom.offset <= 0) { return -top.offset * top.denominator / bottom.numerator; } int divider = bottom.denominator - bottom.numerator; return bottom.denominator * bottom.offset / divider; } return height.solveY (data.getHeight (control, flushCache)); }
int computeHeight (Control control, FormData data, boolean flushCache) { FormAttachment top = data.getTopAttachment (control, spacing, flushCache); FormAttachment bottom = data.getBottomAttachment (control, spacing, flushCache); FormAttachment height = bottom.minus (top); if (height.numerator == 0) { if (bottom.numerator == 0) return bottom.offset; if (bottom.numerator == bottom.denominator) return -top.offset; if (bottom.offset <= 0) { return -top.offset * top.denominator / bottom.numerator; } int divider = bottom.denominator - bottom.numerator; return bottom.denominator * bottom.offset / divider; } return height.solveY (data.getHeight (control, flushCache)); }
int computeHeight (Control control, FormData data, boolean flushCache) { FormAttachment top = data.getTopAttachment (control, spacing, flushCache); FormAttachment bottom = data.getBottomAttachment (control, spacing, flushCache); FormAttachment height = bottom.minus (top); if (height.numerator == 0) { if (bottom.numerator == 0) return bottom.offset; if (bottom.numerator == bottom.denominator) return -top.offset; if (bottom.offset <= 0) { return -top.offset * top.denominator / bottom.numerator; } int divider = bottom.denominator - bottom.numerator; return bottom.denominator * bottom.offset / divider; } return height.solveY (data.getHeight (control, flushCache)); }
if (bottom == null) { if (top == null) return cacheBottom = new FormAttachment (0, getHeight (control, flushCache)); return cacheBottom = getTopAttachment (control, spacing, flushCache).plus (getHeight (control, flushCache)); break; case SWT.CENTER: { FormAttachment topAttachment = bottomData.getTopAttachment (bottomControl, spacing, flushCache); FormAttachment bottomHeight = bottomAttachment.minus (topAttachment); cacheBottom = bottomAttachment.minus (bottomHeight.minus (getHeight (control, flushCache)).divide (2)); FormAttachment topAttachment = bottomData.getTopAttachment (bottomControl, spacing, flushCache); cacheBottom = topAttachment.plus (bottom.offset - spacing); break;
if (bottom == null) { if (top == null) return cacheBottom = new FormAttachment (0, getHeight (control, flushCache)); return cacheBottom = getTopAttachment (control, spacing, flushCache).plus (getHeight (control, flushCache)); break; case SWT.CENTER: { FormAttachment topAttachment = bottomData.getTopAttachment (bottomControl, spacing, flushCache); FormAttachment bottomHeight = bottomAttachment.minus (topAttachment); cacheBottom = bottomAttachment.minus (bottomHeight.minus (getHeight (control, flushCache)).divide (2)); FormAttachment topAttachment = bottomData.getTopAttachment (bottomControl, spacing, flushCache); cacheBottom = topAttachment.plus (bottom.offset - spacing); break;
if (bottom == null) { if (top == null) return cacheBottom = new FormAttachment (0, getHeight (control, flushCache)); return cacheBottom = getTopAttachment (control, spacing, flushCache).plus (getHeight (control, flushCache)); break; case SWT.CENTER: { FormAttachment topAttachment = bottomData.getTopAttachment (bottomControl, spacing, flushCache); FormAttachment bottomHeight = bottomAttachment.minus (topAttachment); cacheBottom = bottomAttachment.minus (bottomHeight.minus (getHeight (control, flushCache)).divide (2)); FormAttachment topAttachment = bottomData.getTopAttachment (bottomControl, spacing, flushCache); cacheBottom = topAttachment.plus (bottom.offset - spacing); break;
if (bottom == null) { if (top == null) return cacheBottom = new FormAttachment (0, getHeight (control, flushCache)); return cacheBottom = getTopAttachment (control, spacing, flushCache).plus (getHeight (control, flushCache)); break; case SWT.CENTER: { FormAttachment topAttachment = bottomData.getTopAttachment (bottomControl, spacing, flushCache); FormAttachment bottomHeight = bottomAttachment.minus (topAttachment); cacheBottom = bottomAttachment.minus (bottomHeight.minus (getHeight (control, flushCache)).divide (2)); FormAttachment topAttachment = bottomData.getTopAttachment (bottomControl, spacing, flushCache); cacheBottom = topAttachment.plus (bottom.offset - spacing); break;
if (bottom == null) { if (top == null) return cacheBottom = new FormAttachment (0, getHeight (control, flushCache)); return cacheBottom = getTopAttachment (control, spacing, flushCache).plus (getHeight (control, flushCache)); break; case SWT.CENTER: { FormAttachment topAttachment = bottomData.getTopAttachment (bottomControl, spacing, flushCache); FormAttachment bottomHeight = bottomAttachment.minus (topAttachment); cacheBottom = bottomAttachment.minus (bottomHeight.minus (getHeight (control, flushCache)).divide (2)); FormAttachment topAttachment = bottomData.getTopAttachment (bottomControl, spacing, flushCache); cacheBottom = topAttachment.plus (bottom.offset - spacing); break;
if (bottom == null) { if (top == null) return cacheBottom = new FormAttachment (0, getHeight (control, flushCache)); return cacheBottom = getTopAttachment (control, spacing, flushCache).plus (getHeight (control, flushCache)); break; case SWT.CENTER: { FormAttachment topAttachment = bottomData.getTopAttachment (bottomControl, spacing, flushCache); FormAttachment bottomHeight = bottomAttachment.minus (topAttachment); cacheBottom = bottomAttachment.minus (bottomHeight.minus (getHeight (control, flushCache)).divide (2)); FormAttachment topAttachment = bottomData.getTopAttachment (bottomControl, spacing, flushCache); cacheBottom = topAttachment.plus (bottom.offset - spacing); break;
FormData data = (FormData) child.getLayoutData (); if (height != SWT.DEFAULT) { int y1 = data.getTopAttachment (child, spacing, flushCache).solveX (height); int y2 = data.getBottomAttachment (child, spacing, flushCache).solveX (height); h = Math.max (y2, h);
FormData data = (FormData) child.getLayoutData (); if (height != SWT.DEFAULT) { int y1 = data.getTopAttachment (child, spacing, flushCache).solveX (height); int y2 = data.getBottomAttachment (child, spacing, flushCache).solveX (height); h = Math.max (y2, h);
isVisited = true; FormData topData = (FormData) topControl.getLayoutData (); FormAttachment topAttachment = topData.getTopAttachment (topControl, spacing, flushCache); switch (top.alignment) { case SWT.TOP:
isVisited = true; FormData topData = (FormData) topControl.getLayoutData (); FormAttachment topAttachment = topData.getTopAttachment (topControl, spacing, flushCache); switch (top.alignment) { case SWT.TOP:
isVisited = true; FormData topData = (FormData) topControl.getLayoutData (); FormAttachment topAttachment = topData.getTopAttachment (topControl, spacing, flushCache); switch (top.alignment) { case SWT.TOP:
isVisited = true; FormData topData = (FormData) topControl.getLayoutData (); FormAttachment topAttachment = topData.getTopAttachment (topControl, spacing, flushCache); switch (top.alignment) { case SWT.TOP:
isVisited = true; FormData topData = (FormData) topControl.getLayoutData (); FormAttachment topAttachment = topData.getTopAttachment (topControl, spacing, flushCache); switch (top.alignment) { case SWT.TOP:
isVisited = true; FormData topData = (FormData) topControl.getLayoutData (); FormAttachment topAttachment = topData.getTopAttachment (topControl, spacing, flushCache); switch (top.alignment) { case SWT.TOP: