KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > forms > IDetailsPageProvider


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  *******************************************************************************/

11 package org.eclipse.ui.forms;
12
13 /**
14  * The class that implements this interface provides for dynamic
15  * computation of page key and the page itself based on the
16  * input object. It should be used in situations where
17  * using the object class as a static key is not enough
18  * i.e. different pages may need to be loaded for objects
19  * of the same type depending on their state.
20  *
21  * @see DetailsPart
22  * @see MasterDetailsBlock
23  * @since 3.0
24  */

25 public interface IDetailsPageProvider {
26 /**
27  * Returns the page key for the provided object. The assumption is
28  * that the provider knows about various object types and
29  * is in position to cast the object into a type and call methods
30  * on it to determine the matching page key.
31  * @param object the input object
32  * @return the page key for the provided object
33  */

34     Object JavaDoc getPageKey(Object JavaDoc object);
35 /**
36  * Returns the page for the provided key. This method is the dynamic
37  * alternative to registering pages with the details part directly.
38  * @param key the page key
39  * @return the matching page for the provided key
40  */

41     IDetailsPage getPage(Object JavaDoc key);
42 }
43
Popular Tags