KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > part > IPage


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

11 package org.eclipse.ui.part;
12
13 import org.eclipse.swt.widgets.Composite;
14 import org.eclipse.swt.widgets.Control;
15 import org.eclipse.ui.IActionBars;
16
17 /**
18  * This interface has been replaced by <code>IPageBookViewPage</code>
19  * but is preserved for backward compatibility.
20  * <p>
21  * This class is not intended to be directly implemented by clients; clients
22  * should instead subclass <code>Page</code>.
23  * </p>
24  *
25  * @see PageBookView
26  * @see Page
27  */

28 public interface IPage {
29     /**
30      * Creates the SWT control for this page under the given parent
31      * control.
32      * <p>
33      * Clients should not call this method (the workbench calls this method when
34      * it needs to, which may be never).
35      * </p>
36      *
37      * @param parent the parent control
38      */

39     public void createControl(Composite parent);
40
41     /**
42      * Disposes of this page.
43      * <p>
44      * This is the last method called on the <code>IPage</code>. Implementors should
45      * clean up any resources associated with the page.
46      * </p>
47      * Callers of this method should ensure that the page's control (if it exists)
48      * has been disposed before calling this method. However, for backward compatibilty,
49      * implementors must also ensure that the page's control has been disposed before
50      * this method returns.
51      * </p>
52      * <p>
53      * Note that there is no guarantee that createControl() has been called,
54      * so the control may never have been created.
55      * </p>
56      */

57     public void dispose();
58
59     /**
60      * Returns the SWT control for this page.
61      *
62      * @return the SWT control for this page, or <code>null</code> if this
63      * page does not have a control
64      */

65     public Control getControl();
66
67     /**
68      * Allows the page to make contributions to the given action bars.
69      * The contributions will be visible when the page is visible.
70      * <p>
71      * This method is automatically called shortly after
72      * <code>createControl</code> is called
73      * </p>
74      *
75      * @param actionBars the action bars for this page
76      */

77     public void setActionBars(IActionBars actionBars);
78
79     /**
80      * Asks this page to take focus within its pagebook view.
81      */

82     public void setFocus();
83 }
84
Popular Tags