|
Lines 65-71
Link Here
|
| 65 |
static final int BEZIER_RIGHT = 30; |
65 |
static final int BEZIER_RIGHT = 30; |
| 66 |
static final int BEZIER_LEFT = 30; |
66 |
static final int BEZIER_LEFT = 30; |
| 67 |
static final int MIN_LEFT = 10; |
67 |
static final int MIN_LEFT = 10; |
| 68 |
static final int MIN_RIGHT = 160; |
68 |
static int MIN_RIGHT_WIDTH = 160; |
|
|
69 |
static int MIN_RIGHT_HEIGHT = 0; |
| 69 |
|
70 |
|
| 70 |
static int BORDER1 = SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW; |
71 |
static int BORDER1 = SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW; |
| 71 |
|
72 |
|
|
Lines 169-179
Link Here
|
| 169 |
h += bottomSize.y; |
170 |
h += bottomSize.y; |
| 170 |
if (bottom != null && (left != null || right != null)) h += BORDER_TOP + BORDER_BOTTOM + BORDER_STRIPE; |
171 |
if (bottom != null && (left != null || right != null)) h += BORDER_TOP + BORDER_BOTTOM + BORDER_STRIPE; |
| 171 |
w += leftSize.x + rightSize.x; |
172 |
w += leftSize.x + rightSize.x; |
|
|
173 |
|
| 174 |
h += left != null ? leftSize.y : rightSize.y; |
| 175 |
// check for the minimum right height |
| 176 |
h = Math.max(h, MIN_RIGHT_HEIGHT); |
| 177 |
|
| 172 |
if (showCurve) { |
178 |
if (showCurve) { |
| 173 |
w += curve_width - 2*curve_indent; |
179 |
w += curve_width - 2*curve_indent; |
| 174 |
h += BORDER_TOP + BORDER_BOTTOM + 2*BORDER_STRIPE; |
180 |
h += BORDER_TOP + BORDER_BOTTOM + 2*BORDER_STRIPE; |
| 175 |
} |
181 |
} |
| 176 |
h += left != null ? leftSize.y : rightSize.y; |
|
|
| 177 |
|
182 |
|
| 178 |
if (wHint != SWT.DEFAULT) w = wHint; |
183 |
if (wHint != SWT.DEFAULT) w = wHint; |
| 179 |
if (hHint != SWT.DEFAULT) h = hHint; |
184 |
if (hHint != SWT.DEFAULT) h = hHint; |
|
Lines 343-349
Link Here
|
| 343 |
Point size = getSize(); |
348 |
Point size = getSize(); |
| 344 |
if (!(0 < x && x < size.x)) return; |
349 |
if (!(0 < x && x < size.x)) return; |
| 345 |
rightWidth = size.x - x - rightDragDisplacement; |
350 |
rightWidth = size.x - x - rightDragDisplacement; |
| 346 |
rightWidth = Math.max(MIN_RIGHT, rightWidth); |
351 |
rightWidth = Math.max(MIN_RIGHT_WIDTH, rightWidth); |
| 347 |
layout(); |
352 |
layout(); |
| 348 |
return; |
353 |
return; |
| 349 |
} |
354 |
} |
|
Lines 589-593
Link Here
|
| 589 |
curve_width-BEZIER_RIGHT, 0, curve_width, 0, |
594 |
curve_width-BEZIER_RIGHT, 0, curve_width, 0, |
| 590 |
curve_width); |
595 |
curve_width); |
| 591 |
} |
596 |
} |
|
|
597 |
} |
| 598 |
|
| 599 |
/** |
| 600 |
* Method to set the minimum width of the CBanner's right item |
| 601 |
* @param minWidth the minimum width of the perspective bar |
| 602 |
*/ |
| 603 |
public void setMinRightWidth(int minWidth) { |
| 604 |
MIN_RIGHT_WIDTH = minWidth; |
| 605 |
} |
| 606 |
|
| 607 |
/** |
| 608 |
* Method to set the minimum height of the CBanner's right item |
| 609 |
* @param minHeight the minimum height of the perspective bar |
| 610 |
*/ |
| 611 |
public void setMinRightHeight(int minHeight) { |
| 612 |
MIN_RIGHT_HEIGHT = minHeight; |
| 592 |
} |
613 |
} |
| 593 |
} |
614 |
} |