Mercurial > projects > dwt-addons
diff dwtx/jface/preference/PreferenceDialog.d @ 43:ea8ff534f622
Fix override and super aliases
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Fri, 11 Apr 2008 01:24:25 +0200 |
parents | 644f1334b451 |
children | 9d7d88f13040 |
line wrap: on
line diff
--- a/dwtx/jface/preference/PreferenceDialog.d Thu Apr 10 19:10:12 2008 +0200 +++ b/dwtx/jface/preference/PreferenceDialog.d Fri Apr 11 01:24:25 2008 +0200 @@ -97,7 +97,7 @@ * */ private class PageLayout : Layout { - public Point computeSize(Composite composite, int wHint, int hHint, bool force) { + public override Point computeSize(Composite composite, int wHint, int hHint, bool force) { if (wHint !is DWT.DEFAULT && hHint !is DWT.DEFAULT) { return new Point(wHint, hHint); } @@ -127,7 +127,7 @@ return new Point(x, y); } - public void layout(Composite composite, bool force) { + public override void layout(Composite composite, bool force) { Rectangle rect = composite.getClientArea(); Control[] children = composite.getChildren(); for (int i = 0; i < children.length; i++) { @@ -240,7 +240,7 @@ * * @see dwtx.jface.dialogs.Dialog#buttonPressed(int) */ - protected void buttonPressed(int buttonId) { + protected override void buttonPressed(int buttonId) { switch (buttonId) { case IDialogConstants.OK_ID: { okPressed(); @@ -262,7 +262,7 @@ * * @see dwtx.jface.dialogs.Dialog#cancelPressed() */ - protected void cancelPressed() { + protected override void cancelPressed() { // Inform all pages that we are cancelling foreach( e; preferenceManager.getElements(PreferenceManager.PRE_ORDER)){ IPreferenceNode node = cast(IPreferenceNode) e; @@ -301,7 +301,7 @@ * * @see dwtx.jface.window.Window#close() */ - public bool close() { + public override bool close() { //Do this is in a SafeRunnable as it may run client code SafeRunnable runnable = new class SafeRunnable{ @@ -336,7 +336,7 @@ * * @see dwtx.jface.window.Window#configureShell(dwt.widgets.Shell) */ - protected void configureShell(Shell newShell) { + protected override void configureShell(Shell newShell) { super.configureShell(newShell); newShell.setText(JFaceResources.getString("PreferenceDialog.title")); //$NON-NLS-1$ newShell.addShellListener(new class ShellAdapter { @@ -355,7 +355,7 @@ * * @see dwtx.jface.window.Window#constrainShellSize() */ - protected void constrainShellSize() { + protected override void constrainShellSize() { super.constrainShellSize(); // record opening shell size if (lastShellSize is null) { @@ -368,7 +368,7 @@ * * @see dwtx.jface.dialogs.Dialog#createButtonsForButtonBar(dwt.widgets.Composite) */ - protected void createButtonsForButtonBar(Composite parent) { + protected override void createButtonsForButtonBar(Composite parent) { // create OK and Cancel buttons by default okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); getShell().setDefaultButton(okButton); @@ -380,7 +380,7 @@ * * @see dwtx.jface.window.Window#createContents(dwt.widgets.Composite) */ - protected Control createContents(Composite parent) { + protected override Control createContents(Composite parent) { Control[1] control; BusyIndicator.showWhile(getShell().getDisplay(), new class(parent) Runnable { Composite parent_; @@ -404,7 +404,7 @@ * * @see dwtx.jface.dialogs.Dialog#createDialogArea(dwt.widgets.Composite) */ - protected Control createDialogArea(Composite parent) { + protected override Control createDialogArea(Composite parent) { final Composite composite = cast(Composite) super.createDialogArea(parent); GridLayout parentLayout = (cast(GridLayout) composite.getLayout()); parentLayout.numColumns = 4; @@ -892,7 +892,7 @@ * <code>close</code>. Subclasses may extend or reimplement. * </p> */ - protected void handleShellCloseEvent() { + protected override void handleShellCloseEvent() { // handle the same as pressing cancel cancelPressed(); } @@ -904,7 +904,7 @@ * <code>performHelp</code> on the currently active page. * </p> */ - protected void helpPressed() { + protected /+override+/ void helpPressed() { if (currentPage !is null) { currentPage.performHelp(); } @@ -942,7 +942,7 @@ * preference dialog, then calls <code>handleSave</code> on this dialog to * save any state, and then calls <code>close</code> to close this dialog. */ - protected void okPressed() { + protected override void okPressed() { SafeRunnable.run(new class SafeRunnable { private bool errorOccurred;