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 (right == null) { if (left == null) return cacheRight = new FormAttachment (0, getWidth (control, flushCache)); return cacheRight = getLeftAttachment (control, spacing, flushCache).plus (getWidth (control, flushCache)); break; case SWT.CENTER: { FormAttachment leftAttachment = rightData.getLeftAttachment (rightControl, spacing, flushCache); FormAttachment rightWidth = rightAttachment.minus (leftAttachment); cacheRight = rightAttachment.minus (rightWidth.minus (getWidth (control, flushCache)).divide (2)); FormAttachment leftAttachment = rightData.getLeftAttachment (rightControl, spacing, flushCache); cacheRight = leftAttachment.plus (right.offset - spacing); break;
if (right == null) { if (left == null) return cacheRight = new FormAttachment (0, getWidth (control, flushCache)); return cacheRight = getLeftAttachment (control, spacing, flushCache).plus (getWidth (control, flushCache)); break; case SWT.CENTER: { FormAttachment leftAttachment = rightData.getLeftAttachment (rightControl, spacing, flushCache); FormAttachment rightWidth = rightAttachment.minus (leftAttachment); cacheRight = rightAttachment.minus (rightWidth.minus (getWidth (control, flushCache)).divide (2)); FormAttachment leftAttachment = rightData.getLeftAttachment (rightControl, spacing, flushCache); cacheRight = leftAttachment.plus (right.offset - spacing); break;
if (right == null) { if (left == null) return cacheRight = new FormAttachment (0, getWidth (control, flushCache)); return cacheRight = getLeftAttachment (control, spacing, flushCache).plus (getWidth (control, flushCache)); break; case SWT.CENTER: { FormAttachment leftAttachment = rightData.getLeftAttachment (rightControl, spacing, flushCache); FormAttachment rightWidth = rightAttachment.minus (leftAttachment); cacheRight = rightAttachment.minus (rightWidth.minus (getWidth (control, flushCache)).divide (2)); FormAttachment leftAttachment = rightData.getLeftAttachment (rightControl, spacing, flushCache); cacheRight = leftAttachment.plus (right.offset - spacing); break;
if (right == null) { if (left == null) return cacheRight = new FormAttachment (0, getWidth (control, flushCache)); return cacheRight = getLeftAttachment (control, spacing, flushCache).plus (getWidth (control, flushCache)); break; case SWT.CENTER: { FormAttachment leftAttachment = rightData.getLeftAttachment (rightControl, spacing, flushCache); FormAttachment rightWidth = rightAttachment.minus (leftAttachment); cacheRight = rightAttachment.minus (rightWidth.minus (getWidth (control, flushCache)).divide (2)); FormAttachment leftAttachment = rightData.getLeftAttachment (rightControl, spacing, flushCache); cacheRight = leftAttachment.plus (right.offset - spacing); break;
if (right == null) { if (left == null) return cacheRight = new FormAttachment (0, getWidth (control, flushCache)); return cacheRight = getLeftAttachment (control, spacing, flushCache).plus (getWidth (control, flushCache)); break; case SWT.CENTER: { FormAttachment leftAttachment = rightData.getLeftAttachment (rightControl, spacing, flushCache); FormAttachment rightWidth = rightAttachment.minus (leftAttachment); cacheRight = rightAttachment.minus (rightWidth.minus (getWidth (control, flushCache)).divide (2)); FormAttachment leftAttachment = rightData.getLeftAttachment (rightControl, spacing, flushCache); cacheRight = leftAttachment.plus (right.offset - spacing); break;
if (right == null) { if (left == null) return cacheRight = new FormAttachment (0, getWidth (control, flushCache)); return cacheRight = getLeftAttachment (control, spacing, flushCache).plus (getWidth (control, flushCache)); break; case SWT.CENTER: { FormAttachment leftAttachment = rightData.getLeftAttachment (rightControl, spacing, flushCache); FormAttachment rightWidth = rightAttachment.minus (leftAttachment); cacheRight = rightAttachment.minus (rightWidth.minus (getWidth (control, flushCache)).divide (2)); FormAttachment leftAttachment = rightData.getLeftAttachment (rightControl, spacing, flushCache); cacheRight = leftAttachment.plus (right.offset - spacing); break;
if (width != SWT.DEFAULT) { 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 (width != SWT.DEFAULT) { 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);
isVisited = true; FormData leftData = (FormData) leftControl.getLayoutData (); FormAttachment leftAttachment = leftData.getLeftAttachment (leftControl, spacing, flushCache); switch (left.alignment) { case SWT.LEFT:
isVisited = true; FormData leftData = (FormData) leftControl.getLayoutData (); FormAttachment leftAttachment = leftData.getLeftAttachment (leftControl, spacing, flushCache); switch (left.alignment) { case SWT.LEFT:
isVisited = true; FormData leftData = (FormData) leftControl.getLayoutData (); FormAttachment leftAttachment = leftData.getLeftAttachment (leftControl, spacing, flushCache); switch (left.alignment) { case SWT.LEFT:
isVisited = true; FormData leftData = (FormData) leftControl.getLayoutData (); FormAttachment leftAttachment = leftData.getLeftAttachment (leftControl, spacing, flushCache); switch (left.alignment) { case SWT.LEFT:
isVisited = true; FormData leftData = (FormData) leftControl.getLayoutData (); FormAttachment leftAttachment = leftData.getLeftAttachment (leftControl, spacing, flushCache); switch (left.alignment) { case SWT.LEFT:
isVisited = true; FormData leftData = (FormData) leftControl.getLayoutData (); FormAttachment leftAttachment = leftData.getLeftAttachment (leftControl, spacing, flushCache); switch (left.alignment) { case SWT.LEFT: