Mercurial > projects > dwt-addons
comparison dwtx/jface/dialogs/MessageDialog.d @ 43:ea8ff534f622
Fix override and super aliases
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Fri, 11 Apr 2008 01:24:25 +0200 |
parents | cb935a3f6e90 |
children | c3583c6ec027 |
comparison
equal
deleted
inserted
replaced
42:4567a6f54939 | 43:ea8ff534f622 |
---|---|
167 | 167 |
168 /* | 168 /* |
169 * (non-Javadoc) | 169 * (non-Javadoc) |
170 * @see dwtx.jface.dialogs.Dialog#buttonPressed(int) | 170 * @see dwtx.jface.dialogs.Dialog#buttonPressed(int) |
171 */ | 171 */ |
172 protected void buttonPressed(int buttonId) { | 172 protected override void buttonPressed(int buttonId) { |
173 setReturnCode(buttonId); | 173 setReturnCode(buttonId); |
174 close(); | 174 close(); |
175 } | 175 } |
176 | 176 |
177 /* | 177 /* |
178 * (non-Javadoc) | 178 * (non-Javadoc) |
179 * @see dwtx.jface.window.Window#configureShell(dwt.widgets.Shell) | 179 * @see dwtx.jface.window.Window#configureShell(dwt.widgets.Shell) |
180 */ | 180 */ |
181 protected void configureShell(Shell shell) { | 181 protected override void configureShell(Shell shell) { |
182 super.configureShell(shell); | 182 super.configureShell(shell); |
183 if (title !is null) { | 183 if (title !is null) { |
184 shell.setText(title); | 184 shell.setText(title); |
185 } | 185 } |
186 if (titleImage !is null) { | 186 if (titleImage !is null) { |
189 } | 189 } |
190 | 190 |
191 /* | 191 /* |
192 * (non-Javadoc) Method declared on Dialog. | 192 * (non-Javadoc) Method declared on Dialog. |
193 */ | 193 */ |
194 protected void createButtonsForButtonBar(Composite parent) { | 194 protected override void createButtonsForButtonBar(Composite parent) { |
195 buttons = new Button[buttonLabels.length]; | 195 buttons = new Button[buttonLabels.length]; |
196 for (int i = 0; i < buttonLabels.length; i++) { | 196 for (int i = 0; i < buttonLabels.length; i++) { |
197 String label = buttonLabels[i]; | 197 String label = buttonLabels[i]; |
198 Button button = createButton(parent, i, label, | 198 Button button = createButton(parent, i, label, |
199 defaultButtonIndex is i); | 199 defaultButtonIndex is i); |
222 * and lays out a composite and calls <code>createMessageArea</code> and | 222 * and lays out a composite and calls <code>createMessageArea</code> and |
223 * <code>createCustomArea</code> to populate it. Subclasses should | 223 * <code>createCustomArea</code> to populate it. Subclasses should |
224 * override <code>createCustomArea</code> to add contents below the | 224 * override <code>createCustomArea</code> to add contents below the |
225 * message. | 225 * message. |
226 */ | 226 */ |
227 protected Control createDialogArea(Composite parent) { | 227 protected override Control createDialogArea(Composite parent) { |
228 // create message area | 228 // create message area |
229 createMessageArea(parent); | 229 createMessageArea(parent); |
230 // create the top level composite for the dialog area | 230 // create the top level composite for the dialog area |
231 Composite composite = new Composite(parent, DWT.NONE); | 231 Composite composite = new Composite(parent, DWT.NONE); |
232 GridLayout layout = new GridLayout(); | 232 GridLayout layout = new GridLayout(); |
250 * | 250 * |
251 * @param index | 251 * @param index |
252 * the index of the button in the dialog's button bar | 252 * the index of the button in the dialog's button bar |
253 * @return a button in the dialog's button bar | 253 * @return a button in the dialog's button bar |
254 */ | 254 */ |
255 protected Button getButton(int index) { | 255 protected override Button getButton(int index) { |
256 return buttons[index]; | 256 return buttons[index]; |
257 } | 257 } |
258 | 258 |
259 /** | 259 /** |
260 * Returns the minimum message area width in pixels This determines the | 260 * Returns the minimum message area width in pixels This determines the |
273 * Handle the shell close. Set the return code to <code>DWT.DEFAULT</code> | 273 * Handle the shell close. Set the return code to <code>DWT.DEFAULT</code> |
274 * as there has been no explicit close by the user. | 274 * as there has been no explicit close by the user. |
275 * | 275 * |
276 * @see dwtx.jface.window.Window#handleShellCloseEvent() | 276 * @see dwtx.jface.window.Window#handleShellCloseEvent() |
277 */ | 277 */ |
278 protected void handleShellCloseEvent() { | 278 protected override void handleShellCloseEvent() { |
279 //Sets a return code of DWT.DEFAULT since none of the dialog buttons | 279 //Sets a return code of DWT.DEFAULT since none of the dialog buttons |
280 // were pressed to close the dialog. | 280 // were pressed to close the dialog. |
281 super.handleShellCloseEvent(); | 281 super.handleShellCloseEvent(); |
282 setReturnCode(DWT.DEFAULT); | 282 setReturnCode(DWT.DEFAULT); |
283 } | 283 } |
404 | 404 |
405 /* | 405 /* |
406 * @see dwtx.jface.dialogs.Dialog#createButton(dwt.widgets.Composite, | 406 * @see dwtx.jface.dialogs.Dialog#createButton(dwt.widgets.Composite, |
407 * int, java.lang.String, bool) | 407 * int, java.lang.String, bool) |
408 */ | 408 */ |
409 protected Button createButton(Composite parent, int id, String label, | 409 protected override Button createButton(Composite parent, int id, String label, |
410 bool defaultButton) { | 410 bool defaultButton) { |
411 Button button = super.createButton(parent, id, label, defaultButton); | 411 Button button = super.createButton(parent, id, label, defaultButton); |
412 //Be sure to set the focus if the custom area cannot so as not | 412 //Be sure to set the focus if the custom area cannot so as not |
413 //to lose the defaultButton. | 413 //to lose the defaultButton. |
414 if (defaultButton && !customShouldTakeFocus()) { | 414 if (defaultButton && !customShouldTakeFocus()) { |
437 | 437 |
438 /* | 438 /* |
439 * (non-Javadoc) | 439 * (non-Javadoc) |
440 * @see dwtx.jface.dialogs.IconAndMessageDialog#getImage() | 440 * @see dwtx.jface.dialogs.IconAndMessageDialog#getImage() |
441 */ | 441 */ |
442 public Image getImage() { | 442 public override Image getImage() { |
443 return image; | 443 return image; |
444 } | 444 } |
445 | 445 |
446 /** | 446 /** |
447 * An accessor for the labels to use on the buttons. | 447 * An accessor for the labels to use on the buttons. |