20
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2000, 2006 IBM Corporation and others.
|
|
3 * All rights reserved. This program and the accompanying materials
|
|
4 * are made available under the terms of the Eclipse Public License v1.0
|
|
5 * which accompanies this distribution, and is available at
|
|
6 * http://www.eclipse.org/legal/epl-v10.html
|
|
7 *
|
|
8 * Contributors:
|
|
9 * IBM Corporation - initial API and implementation
|
|
10 * Port to the D programming language:
|
|
11 * Frank Benoit <benoit@tionex.de>
|
|
12 *******************************************************************************/
|
|
13 module dwtx.jface.dialogs.PageChangedEvent;
|
|
14
|
|
15 import dwtx.jface.dialogs.IPageChangeProvider;
|
|
16
|
|
17 import dwtx.core.runtime.Assert;
|
|
18
|
|
19 import dwt.dwthelper.utils;
|
|
20
|
|
21 /**
|
|
22 * Event object describing a page selection change. The source of these events
|
|
23 * is a page change provider.
|
|
24 *
|
|
25 * @see IPageChangeProvider
|
|
26 * @see IPageChangedListener
|
|
27 *
|
|
28 * @since 3.1
|
|
29 */
|
|
30 public class PageChangedEvent : EventObject {
|
|
31
|
|
32 /**
|
|
33 * Generated serial version UID for this class.
|
|
34 *
|
|
35 * @since 3.1
|
|
36 */
|
|
37 private static const long serialVersionUID = 3835149545519723574L;
|
|
38
|
|
39 /**
|
|
40 * The selected page.
|
|
41 */
|
|
42 protected Object selectedPage;
|
|
43
|
|
44 /**
|
|
45 * Creates a new event for the given source and selected page.
|
|
46 *
|
|
47 * @param source
|
|
48 * the page change provider
|
|
49 * @param selectedPage
|
|
50 * the selected page. In the JFace provided dialogs this
|
|
51 * will be an <code>IDialogPage</code>.
|
|
52 */
|
|
53 public this(IPageChangeProvider source,
|
|
54 Object selectedPage) {
|
|
55 super( cast(Object) source);
|
|
56 Assert.isNotNull(selectedPage);
|
|
57 this.selectedPage = selectedPage;
|
|
58 }
|
|
59
|
|
60 /**
|
|
61 * Returns the selected page.
|
|
62 *
|
|
63 * @return the selected page. In dialogs implemented by JFace,
|
|
64 * this will be an <code>IDialogPage</code>.
|
|
65 */
|
|
66 public Object getSelectedPage() {
|
|
67 return selectedPage;
|
|
68 }
|
|
69
|
|
70 /**
|
|
71 * Returns the page change provider that is the source of this event.
|
|
72 *
|
|
73 * @return the originating page change provider
|
|
74 */
|
|
75 public IPageChangeProvider getPageChangeProvider() {
|
|
76 return cast(IPageChangeProvider) getSource();
|
|
77 }
|
|
78 }
|