|
Lines 194-212
Link Here
|
| 194 |
/** |
194 |
/** |
| 195 |
* Create the child widgets of the receiver. |
195 |
* Create the child widgets of the receiver. |
| 196 |
*/ |
196 |
*/ |
| 197 |
/** |
|
|
| 198 |
* |
| 199 |
*/ |
| 200 |
protected void createChildren() { |
197 |
protected void createChildren() { |
| 201 |
|
198 |
|
| 202 |
FormLayout layout = new FormLayout(); |
199 |
FormLayout layout = new FormLayout(); |
| 203 |
setLayout(layout); |
200 |
setLayout(layout); |
| 204 |
|
201 |
|
| 205 |
jobImageLabel = new Label(this, SWT.NONE); |
202 |
jobImageLabel = new Label(this, SWT.NONE); |
| 206 |
jobImageLabel.setImage(getInfoImage()); |
203 |
Image infoImage = getInfoImage(); |
|
|
204 |
jobImageLabel.setImage(infoImage); |
| 207 |
FormData imageData = new FormData(); |
205 |
FormData imageData = new FormData(); |
| 208 |
imageData.top = new FormAttachment(IDialogConstants.VERTICAL_SPACING); |
206 |
if (infoImage != null) { |
| 209 |
imageData.left = new FormAttachment( |
207 |
// position it in the center |
|
|
208 |
imageData.top = new FormAttachment(50, |
| 209 |
-infoImage.getBounds().height / 2); |
| 210 |
} else { |
| 211 |
imageData.top = new FormAttachment(0, |
| 212 |
IDialogConstants.VERTICAL_SPACING); |
| 213 |
} |
| 214 |
imageData.left = new FormAttachment(0, |
| 210 |
IDialogConstants.HORIZONTAL_SPACING / 2); |
215 |
IDialogConstants.HORIZONTAL_SPACING / 2); |
| 211 |
jobImageLabel.setLayoutData(imageData); |
216 |
jobImageLabel.setLayoutData(imageData); |
| 212 |
|
217 |
|
|
Lines 214-227
Link Here
|
| 214 |
setMainText(); |
219 |
setMainText(); |
| 215 |
|
220 |
|
| 216 |
actionBar = new ToolBar(this, SWT.FLAT); |
221 |
actionBar = new ToolBar(this, SWT.FLAT); |
| 217 |
actionBar.setCursor(getDisplay().getSystemCursor(SWT.CURSOR_ARROW)); // set |
222 |
actionBar.setCursor(getDisplay().getSystemCursor(SWT.CURSOR_ARROW)); |
| 218 |
// cursor |
223 |
|
| 219 |
// to |
224 |
// set cursor to overwrite any busy cursor we might have |
| 220 |
// overwrite |
|
|
| 221 |
// any |
| 222 |
// busy |
| 223 |
|
225 |
|
| 224 |
// cursor we might have |
|
|
| 225 |
actionButton = new ToolItem(actionBar, SWT.NONE); |
226 |
actionButton = new ToolItem(actionBar, SWT.NONE); |
| 226 |
actionButton |
227 |
actionButton |
| 227 |
.setToolTipText(ProgressMessages.NewProgressView_CancelJobToolTip); |
228 |
.setToolTipText(ProgressMessages.NewProgressView_CancelJobToolTip); |
|
Lines 255-265
Link Here
|
| 255 |
updateToolBarValues(); |
256 |
updateToolBarValues(); |
| 256 |
|
257 |
|
| 257 |
FormData progressData = new FormData(); |
258 |
FormData progressData = new FormData(); |
| 258 |
progressData.top = new FormAttachment(IDialogConstants.VERTICAL_SPACING); |
259 |
progressData.top = new FormAttachment(0, |
|
|
260 |
IDialogConstants.VERTICAL_SPACING); |
| 259 |
progressData.left = new FormAttachment(jobImageLabel, |
261 |
progressData.left = new FormAttachment(jobImageLabel, |
| 260 |
IDialogConstants.HORIZONTAL_SPACING / 2); |
262 |
IDialogConstants.HORIZONTAL_SPACING / 2); |
| 261 |
progressData.right = new FormAttachment(actionBar, |
263 |
progressData.right = new FormAttachment(actionBar, |
| 262 |
IDialogConstants.HORIZONTAL_SPACING); |
264 |
IDialogConstants.HORIZONTAL_SPACING * -1); |
| 263 |
progressLabel.setLayoutData(progressData); |
265 |
progressLabel.setLayoutData(progressData); |
| 264 |
|
266 |
|
| 265 |
mouseListener = new MouseAdapter() { |
267 |
mouseListener = new MouseAdapter() { |
|
Lines 709-715
Link Here
|
| 709 |
FormData linkData = new FormData(); |
711 |
FormData linkData = new FormData(); |
| 710 |
linkData.top = new FormAttachment(progressBar, |
712 |
linkData.top = new FormAttachment(progressBar, |
| 711 |
IDialogConstants.VERTICAL_SPACING); |
713 |
IDialogConstants.VERTICAL_SPACING); |
| 712 |
linkData.left = new FormAttachment( |
714 |
linkData.left = new FormAttachment(0, |
| 713 |
IDialogConstants.HORIZONTAL_SPACING); |
715 |
IDialogConstants.HORIZONTAL_SPACING); |
| 714 |
linkData.right = new FormAttachment(progressBar, 0, SWT.RIGHT); |
716 |
linkData.right = new FormAttachment(progressBar, 0, SWT.RIGHT); |
| 715 |
// Give an initial value so as to constrain the link shortening |
717 |
// Give an initial value so as to constrain the link shortening |