|
Lines 188-217
Link Here
|
| 188 |
fStatusLine.setLayoutData(statusData); |
188 |
fStatusLine.setLayoutData(statusData); |
| 189 |
|
189 |
|
| 190 |
/* |
190 |
/* |
| 191 |
* This code is duplicated from Dialog#createButtonBar. We do not want |
191 |
* Create the rest of the button bar, but tell it not to |
| 192 |
* to call the TrayDialog implementation because it adds a help control. |
192 |
* create a help button (we've already created it). |
| 193 |
* Since this is a custom button bar, we explicitly added the help control |
|
|
| 194 |
* in an appropriate place above, and we use the Dialog implementation of |
| 195 |
* createButtonBar, which does not add a help control. |
| 196 |
*/ |
193 |
*/ |
| 197 |
Composite buttonComposite = new Composite(composite, SWT.NONE); |
194 |
boolean helpAvailable = isHelpAvailable(); |
| 198 |
// create a layout with spacing and margins appropriate for the font |
195 |
setHelpAvailable(false); |
| 199 |
// size. |
196 |
super.createButtonBar(composite); |
| 200 |
layout = new GridLayout(); |
197 |
setHelpAvailable(helpAvailable); |
| 201 |
layout.numColumns = 0; // this is incremented by createButton |
|
|
| 202 |
layout.makeColumnsEqualWidth = true; |
| 203 |
layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); |
| 204 |
layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); |
| 205 |
layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); |
| 206 |
layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); |
| 207 |
buttonComposite.setLayout(layout); |
| 208 |
GridData data = new GridData(GridData.HORIZONTAL_ALIGN_END |
| 209 |
| GridData.VERTICAL_ALIGN_CENTER); |
| 210 |
buttonComposite.setLayoutData(data); |
| 211 |
buttonComposite.setFont(composite.getFont()); |
| 212 |
|
| 213 |
// Add the buttons to the button bar. |
| 214 |
createButtonsForButtonBar(buttonComposite); |
| 215 |
return composite; |
198 |
return composite; |
| 216 |
} |
199 |
} |
| 217 |
|
200 |
|