comparison dwt/browser/WindowEvent.d @ 7:e831403a80a9

Add 'cast' to casts
author Frank Benoit <benoit@tionex.de>
date Wed, 27 Aug 2008 14:30:35 +0200
parents 380af2bdd8e5
children 5b53d338c709
comparison
equal deleted inserted replaced
6:b903c16b6f48 7:e831403a80a9
64 * event.browser = browser; 64 * event.browser = browser;
65 * } 65 * }
66 * }); 66 * });
67 * browser.addVisibilityWindowListener(new VisibilityWindowListener() { 67 * browser.addVisibilityWindowListener(new VisibilityWindowListener() {
68 * public void hide(WindowEvent event) { 68 * public void hide(WindowEvent event) {
69 * Browser browser = (Browser)event.widget; 69 * Browser browser = cast(Browser)event.widget;
70 * Shell shell = browser.getShell(); 70 * Shell shell = browser.getShell();
71 * shell.setVisible(false); 71 * shell.setVisible(false);
72 * } 72 * }
73 * public void show(WindowEvent event) { 73 * public void show(WindowEvent event) {
74 * Browser browser = (Browser)event.widget; 74 * Browser browser = cast(Browser)event.widget;
75 * Shell shell = browser.getShell(); 75 * Shell shell = browser.getShell();
76 * if (event.location !is null) shell.setLocation(event.location); 76 * if (event.location !is null) shell.setLocation(event.location);
77 * if (event.size !is null) { 77 * if (event.size !is null) {
78 * Point size = event.size; 78 * Point size = event.size;
79 * shell.setSize(shell.computeSize(size.x, size.y)); 79 * shell.setSize(shell.computeSize(size.x, size.y));
86 * shell.open(); 86 * shell.open();
87 * } 87 * }
88 * }); 88 * });
89 * browser.addCloseWindowListener(new CloseWindowListener() { 89 * browser.addCloseWindowListener(new CloseWindowListener() {
90 * public void close(WindowEvent event) { 90 * public void close(WindowEvent event) {
91 * Browser browser = (Browser)event.widget; 91 * Browser browser = cast(Browser)event.widget;
92 * Shell shell = browser.getShell(); 92 * Shell shell = browser.getShell();
93 * shell.close(); 93 * shell.close();
94 * } 94 * }
95 * }); 95 * });
96 * } 96 * }