Mercurial > projects > dwt-linux
changeset 138:31981a851d5b
ControlExample shelltab close handler
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 21 Jan 2008 19:16:10 +0100 |
parents | 0f8bb00f569e |
children | 35300367f4d4 |
files | dwtexamples/controlexample/AlignableTab.d dwtexamples/controlexample/ButtonTab.d dwtexamples/controlexample/ControlExample.d dwtexamples/controlexample/ShellTab.d dwtexamples/controlexample/Tab.d |
diffstat | 5 files changed, 17 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/dwtexamples/controlexample/AlignableTab.d Mon Jan 21 19:04:50 2008 +0100 +++ b/dwtexamples/controlexample/AlignableTab.d Mon Jan 21 19:16:10 2008 +0100 @@ -7,6 +7,8 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Port to the D programming language: + * Frank Benoit <benoit@tionex.de> *******************************************************************************/ module dwtexamples.controlexample.AlignableTab;
--- a/dwtexamples/controlexample/ButtonTab.d Mon Jan 21 19:04:50 2008 +0100 +++ b/dwtexamples/controlexample/ButtonTab.d Mon Jan 21 19:16:10 2008 +0100 @@ -7,6 +7,8 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Port to the D programming language: + * Frank Benoit <benoit@tionex.de> *******************************************************************************/ module dwtexamples.controlexample.ButtonTab;
--- a/dwtexamples/controlexample/ControlExample.d Mon Jan 21 19:04:50 2008 +0100 +++ b/dwtexamples/controlexample/ControlExample.d Mon Jan 21 19:16:10 2008 +0100 @@ -7,7 +7,9 @@ * * Contributors: * IBM Corporation - initial API and implementation - *******************************************************************************/ + * Port to the D programming language: + * Frank Benoit <benoit@tionex.de> +*******************************************************************************/ module dwtexamples.controlexample.ControlExample; pragma( msg, " === The ControlExample is work in progress ===" );
--- a/dwtexamples/controlexample/ShellTab.d Mon Jan 21 19:04:50 2008 +0100 +++ b/dwtexamples/controlexample/ShellTab.d Mon Jan 21 19:16:10 2008 +0100 @@ -7,7 +7,9 @@ * * Contributors: * IBM Corporation - initial API and implementation - *******************************************************************************/ + * Port to the D programming language: + * Frank Benoit <benoit@tionex.de> +*******************************************************************************/ module dwtexamples.controlexample.ShellTab; @@ -99,15 +101,17 @@ } else { shells [shellCount] = new Shell (shell, style); } - final Shell currentShell = shells [shellCount]; + Shell currentShell = shells [shellCount]; Button button = new Button(currentShell, DWT.PUSH); button.setBounds(20, 20, 120, 30); Button closeButton = new Button(currentShell, DWT.PUSH); closeButton.setBounds(160, 20, 120, 30); closeButton.setText(ControlExample.getResourceString("Close")); - closeButton.addListener(DWT.Selection, new class() Listener { + closeButton.addListener(DWT.Selection, new class(currentShell) Listener { + Shell s; + this( Shell s ){ this.s = s; } public void handleEvent(Event event) { - currentShell.dispose(); + s.dispose(); } });
--- a/dwtexamples/controlexample/Tab.d Mon Jan 21 19:04:50 2008 +0100 +++ b/dwtexamples/controlexample/Tab.d Mon Jan 21 19:16:10 2008 +0100 @@ -7,6 +7,8 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Port to the D programming language: + * Frank Benoit <benoit@tionex.de> *******************************************************************************/ module dwtexamples.controlexample.Tab;