75
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2000, 2005 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.ui.forms.IDetailsPageProvider;
|
|
14
|
|
15 import dwtx.ui.forms.IDetailsPage;
|
|
16
|
|
17 /**
|
|
18 * The class that implements this interface provides for dynamic
|
|
19 * computation of page key and the page itself based on the
|
|
20 * input object. It should be used in situations where
|
|
21 * using the object class as a static key is not enough
|
|
22 * i.e. different pages may need to be loaded for objects
|
|
23 * of the same type depending on their state.
|
|
24 *
|
|
25 * @see DetailsPart
|
|
26 * @see MasterDetailsBlock
|
|
27 * @since 3.0
|
|
28 */
|
|
29 public interface IDetailsPageProvider {
|
|
30 /**
|
|
31 * Returns the page key for the provided object. The assumption is
|
|
32 * that the provider knows about various object types and
|
|
33 * is in position to cast the object into a type and call methods
|
|
34 * on it to determine the matching page key.
|
|
35 * @param object the input object
|
|
36 * @return the page key for the provided object
|
|
37 */
|
|
38 Object getPageKey(Object object);
|
|
39 /**
|
|
40 * Returns the page for the provided key. This method is the dynamic
|
|
41 * alternative to registering pages with the details part directly.
|
|
42 * @param key the page key
|
|
43 * @return the matching page for the provided key
|
|
44 */
|
|
45 IDetailsPage getPage(Object key);
|
|
46 }
|