switch (left.alignment) { case SWT.LEFT: cacheLeft = leftAttachment.plus (left.offset); 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)); break; cacheLeft = rightAttachment.plus (left.offset + spacing);
switch (top.alignment) { case SWT.TOP: cacheTop = topAttachment.plus (top.offset); break; case SWT.CENTER: { FormAttachment bottomAttachment = topData.getBottomAttachment (topControl, spacing, flushCache); FormAttachment topHeight = bottomAttachment.minus (topAttachment); cacheTop = topAttachment.plus (topHeight.minus (getHeight (control, flushCache)).divide (2)); break; cacheTop = bottomAttachment.plus (top.offset + spacing); break;
switch (top.alignment) { case SWT.TOP: cacheTop = topAttachment.plus (top.offset); break; case SWT.CENTER: { FormAttachment bottomAttachment = topData.getBottomAttachment (topControl, spacing, flushCache); FormAttachment topHeight = bottomAttachment.minus (topAttachment); cacheTop = topAttachment.plus (topHeight.minus (getHeight (control, flushCache)).divide (2)); break; cacheTop = bottomAttachment.plus (top.offset + spacing); break;
switch (top.alignment) { case SWT.TOP: cacheTop = topAttachment.plus (top.offset); break; case SWT.CENTER: { FormAttachment bottomAttachment = topData.getBottomAttachment (topControl, spacing, flushCache); FormAttachment topHeight = bottomAttachment.minus (topAttachment); cacheTop = topAttachment.plus (topHeight.minus (getHeight (control, flushCache)).divide (2)); break; cacheTop = bottomAttachment.plus (top.offset + spacing); break;
switch (left.alignment) { case SWT.LEFT: cacheLeft = leftAttachment.plus (left.offset); 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)); break; cacheLeft = rightAttachment.plus (left.offset + spacing);
switch (left.alignment) { case SWT.LEFT: cacheLeft = leftAttachment.plus (left.offset); 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)); break; cacheLeft = rightAttachment.plus (left.offset + spacing);
switch (top.alignment) { case SWT.TOP: cacheTop = topAttachment.plus (top.offset); break; case SWT.CENTER: { FormAttachment bottomAttachment = topData.getBottomAttachment (topControl, spacing, flushCache); FormAttachment topHeight = bottomAttachment.minus (topAttachment); cacheTop = topAttachment.plus (topHeight.minus (getHeight (control, flushCache)).divide (2)); break; cacheTop = bottomAttachment.plus (top.offset + spacing); break;
switch (left.alignment) { case SWT.LEFT: cacheLeft = leftAttachment.plus (left.offset); 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)); break; cacheLeft = rightAttachment.plus (left.offset + spacing);
switch (left.alignment) { case SWT.LEFT: cacheLeft = leftAttachment.plus (left.offset); 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)); break; cacheLeft = rightAttachment.plus (left.offset + spacing);
switch (left.alignment) { case SWT.LEFT: cacheLeft = leftAttachment.plus (left.offset); 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)); break; cacheLeft = rightAttachment.plus (left.offset + spacing);
if (right == null) { if (left == null) return cacheRight = new FormAttachment (0, getWidth (control, flushCache)); return cacheRight = getLeftAttachment (control, spacing, flushCache).plus (getWidth (control, flushCache)); switch (right.alignment) { case SWT.RIGHT: cacheRight = rightAttachment.plus (right.offset); break; case SWT.CENTER: { 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)); switch (right.alignment) { case SWT.RIGHT: cacheRight = rightAttachment.plus (right.offset); break; case SWT.CENTER: { 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)); switch (right.alignment) { case SWT.RIGHT: cacheRight = rightAttachment.plus (right.offset); break; case SWT.CENTER: { cacheRight = leftAttachment.plus (right.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)); switch (bottom.alignment) { case SWT.BOTTOM: cacheBottom = bottomAttachment.plus (bottom.offset); break; case SWT.CENTER: { 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)); switch (bottom.alignment) { case SWT.BOTTOM: cacheBottom = bottomAttachment.plus (bottom.offset); break; case SWT.CENTER: { 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)); switch (bottom.alignment) { case SWT.BOTTOM: cacheBottom = bottomAttachment.plus (bottom.offset); break; case SWT.CENTER: { cacheBottom = topAttachment.plus (bottom.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)); switch (right.alignment) { case SWT.RIGHT: cacheRight = rightAttachment.plus (right.offset); break; case SWT.CENTER: { 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)); switch (right.alignment) { case SWT.RIGHT: cacheRight = rightAttachment.plus (right.offset); break; case SWT.CENTER: { cacheRight = leftAttachment.plus (right.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)); switch (bottom.alignment) { case SWT.BOTTOM: cacheBottom = bottomAttachment.plus (bottom.offset); break; case SWT.CENTER: { cacheBottom = topAttachment.plus (bottom.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)); switch (right.alignment) { case SWT.RIGHT: cacheRight = rightAttachment.plus (right.offset); break; case SWT.CENTER: { cacheRight = leftAttachment.plus (right.offset - spacing); break;