int computeWidth (Control control, FormData data, boolean flushCache) { FormAttachment left = data.getLeftAttachment (control, spacing, flushCache); FormAttachment right = data.getRightAttachment (control, spacing, flushCache); FormAttachment width = right.minus (left); if (width.numerator == 0) { if (right.numerator == 0) return right.offset; if (right.numerator == right.denominator) return -left.offset; if (right.offset <= 0) { return -left.offset * left.denominator / left.numerator; } int divider = right.denominator - right.numerator; return right.denominator * right.offset / divider; } return width.solveY (data.getWidth (control, flushCache)); }
int computeWidth (Control control, FormData data, boolean flushCache) { FormAttachment left = data.getLeftAttachment (control, spacing, flushCache); FormAttachment right = data.getRightAttachment (control, spacing, flushCache); FormAttachment width = right.minus (left); if (width.numerator == 0) { if (right.numerator == 0) return right.offset; if (right.numerator == right.denominator) return -left.offset; if (right.offset <= 0) { return -left.offset * left.denominator / left.numerator; } int divider = right.denominator - right.numerator; return right.denominator * right.offset / divider; } return width.solveY (data.getWidth (control, flushCache)); }
int computeWidth (Control control, FormData data, boolean flushCache) { FormAttachment left = data.getLeftAttachment (control, spacing, flushCache); FormAttachment right = data.getRightAttachment (control, spacing, flushCache); FormAttachment width = right.minus (left); if (width.numerator == 0) { if (right.numerator == 0) return right.offset; if (right.numerator == right.denominator) return -left.offset; if (right.offset <= 0) { return -left.offset * left.denominator / left.numerator; } int divider = right.denominator - right.numerator; return right.denominator * right.offset / divider; } return width.solveY (data.getWidth (control, flushCache)); }
int computeWidth (Control control, FormData data, boolean flushCache) { FormAttachment left = data.getLeftAttachment (control, spacing, flushCache); FormAttachment right = data.getRightAttachment (control, spacing, flushCache); FormAttachment width = right.minus (left); if (width.numerator == 0) { if (right.numerator == 0) return right.offset; if (right.numerator == right.denominator) return -left.offset; if (right.offset <= 0) { return -left.offset * left.denominator / left.numerator; } int divider = right.denominator - right.numerator; return right.denominator * right.offset / divider; } return width.solveY (data.getWidth (control, flushCache)); }
int computeWidth (Control control, FormData data, boolean flushCache) { FormAttachment left = data.getLeftAttachment (control, spacing, flushCache); FormAttachment right = data.getRightAttachment (control, spacing, flushCache); FormAttachment width = right.minus (left); if (width.numerator == 0) { if (right.numerator == 0) return right.offset; if (right.numerator == right.denominator) return -left.offset; if (right.offset <= 0) { return -left.offset * left.denominator / left.numerator; } int divider = right.denominator - right.numerator; return right.denominator * right.offset / divider; } return width.solveY (data.getWidth (control, flushCache)); }
int computeWidth (Control control, FormData data, boolean flushCache) { FormAttachment left = data.getLeftAttachment (control, spacing, flushCache); FormAttachment right = data.getRightAttachment (control, spacing, flushCache); FormAttachment width = right.minus (left); if (width.numerator == 0) { if (right.numerator == 0) return right.offset; if (right.numerator == right.denominator) return -left.offset; if (right.offset <= 0) { return -left.offset * left.denominator / left.numerator; } int divider = right.denominator - right.numerator; return right.denominator * right.offset / divider; } return width.solveY (data.getWidth (control, flushCache)); }
if (left == null) { if (right == null) return cacheLeft = new FormAttachment (0, 0); return cacheLeft = getRightAttachment (control, spacing, flushCache).minus (getWidth (control, flushCache)); break; case SWT.CENTER: { FormAttachment rightAttachment = leftData.getRightAttachment (leftControl, spacing, flushCache); FormAttachment leftWidth = rightAttachment.minus (leftAttachment); cacheLeft = leftAttachment.plus (leftWidth.minus (getWidth (control, flushCache)).divide (2)); FormAttachment rightAttachment = leftData.getRightAttachment (leftControl, spacing, flushCache); cacheLeft = rightAttachment.plus (left.offset + spacing);
if (left == null) { if (right == null) return cacheLeft = new FormAttachment (0, 0); return cacheLeft = getRightAttachment (control, spacing, flushCache).minus (getWidth (control, flushCache)); break; case SWT.CENTER: { FormAttachment rightAttachment = leftData.getRightAttachment (leftControl, spacing, flushCache); FormAttachment leftWidth = rightAttachment.minus (leftAttachment); cacheLeft = leftAttachment.plus (leftWidth.minus (getWidth (control, flushCache)).divide (2)); FormAttachment rightAttachment = leftData.getRightAttachment (leftControl, spacing, flushCache); cacheLeft = rightAttachment.plus (left.offset + spacing);
if (left == null) { if (right == null) return cacheLeft = new FormAttachment (0, 0); return cacheLeft = getRightAttachment (control, spacing, flushCache).minus (getWidth (control, flushCache)); break; case SWT.CENTER: { FormAttachment rightAttachment = leftData.getRightAttachment (leftControl, spacing, flushCache); FormAttachment leftWidth = rightAttachment.minus (leftAttachment); cacheLeft = leftAttachment.plus (leftWidth.minus (getWidth (control, flushCache)).divide (2)); FormAttachment rightAttachment = leftData.getRightAttachment (leftControl, spacing, flushCache); cacheLeft = rightAttachment.plus (left.offset + spacing);
if (left == null) { if (right == null) return cacheLeft = new FormAttachment (0, 0); return cacheLeft = getRightAttachment (control, spacing, flushCache).minus (getWidth (control, flushCache)); break; case SWT.CENTER: { FormAttachment rightAttachment = leftData.getRightAttachment (leftControl, spacing, flushCache); FormAttachment leftWidth = rightAttachment.minus (leftAttachment); cacheLeft = leftAttachment.plus (leftWidth.minus (getWidth (control, flushCache)).divide (2)); FormAttachment rightAttachment = leftData.getRightAttachment (leftControl, spacing, flushCache); cacheLeft = rightAttachment.plus (left.offset + spacing);
if (left == null) { if (right == null) return cacheLeft = new FormAttachment (0, 0); return cacheLeft = getRightAttachment (control, spacing, flushCache).minus (getWidth (control, flushCache)); break; case SWT.CENTER: { FormAttachment rightAttachment = leftData.getRightAttachment (leftControl, spacing, flushCache); FormAttachment leftWidth = rightAttachment.minus (leftAttachment); cacheLeft = leftAttachment.plus (leftWidth.minus (getWidth (control, flushCache)).divide (2)); FormAttachment rightAttachment = leftData.getRightAttachment (leftControl, spacing, flushCache); cacheLeft = rightAttachment.plus (left.offset + spacing);
if (left == null) { if (right == null) return cacheLeft = new FormAttachment (0, 0); return cacheLeft = getRightAttachment (control, spacing, flushCache).minus (getWidth (control, flushCache)); break; case SWT.CENTER: { FormAttachment rightAttachment = leftData.getRightAttachment (leftControl, spacing, flushCache); FormAttachment leftWidth = rightAttachment.minus (leftAttachment); cacheLeft = leftAttachment.plus (leftWidth.minus (getWidth (control, flushCache)).divide (2)); FormAttachment rightAttachment = leftData.getRightAttachment (leftControl, spacing, flushCache); cacheLeft = rightAttachment.plus (left.offset + spacing);
data.needed = false; FormAttachment left = data.getLeftAttachment (child, spacing, flushCache); FormAttachment right = data.getRightAttachment (child, spacing, flushCache); int x1 = left.solveX (width), x2 = right.solveX (width); if (data.height == SWT.DEFAULT && !data.needed) {
data.needed = false; FormAttachment left = data.getLeftAttachment (child, spacing, flushCache); FormAttachment right = data.getRightAttachment (child, spacing, flushCache); int x1 = left.solveX (width), x2 = right.solveX (width); if (data.height == SWT.DEFAULT && !data.needed) {
isVisited = true; FormData rightData = (FormData) rightControl.getLayoutData (); FormAttachment rightAttachment = rightData.getRightAttachment (rightControl, spacing, flushCache); switch (right.alignment) { case SWT.RIGHT:
isVisited = true; FormData rightData = (FormData) rightControl.getLayoutData (); FormAttachment rightAttachment = rightData.getRightAttachment (rightControl, spacing, flushCache); switch (right.alignment) { case SWT.RIGHT:
isVisited = true; FormData rightData = (FormData) rightControl.getLayoutData (); FormAttachment rightAttachment = rightData.getRightAttachment (rightControl, spacing, flushCache); switch (right.alignment) { case SWT.RIGHT:
isVisited = true; FormData rightData = (FormData) rightControl.getLayoutData (); FormAttachment rightAttachment = rightData.getRightAttachment (rightControl, spacing, flushCache); switch (right.alignment) { case SWT.RIGHT:
isVisited = true; FormData rightData = (FormData) rightControl.getLayoutData (); FormAttachment rightAttachment = rightData.getRightAttachment (rightControl, spacing, flushCache); switch (right.alignment) { case SWT.RIGHT:
isVisited = true; FormData rightData = (FormData) rightControl.getLayoutData (); FormAttachment rightAttachment = rightData.getRightAttachment (rightControl, spacing, flushCache); switch (right.alignment) { case SWT.RIGHT: