01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.part;
11:
12: import org.eclipse.swt.widgets.Composite;
13: import org.eclipse.swt.widgets.Control;
14: import org.eclipse.ui.IActionBars;
15:
16: /**
17: * This interface has been replaced by <code>IPageBookViewPage</code>
18: * but is preserved for backward compatibility.
19: * <p>
20: * This class is not intended to be directly implemented by clients; clients
21: * should instead subclass <code>Page</code>.
22: * </p>
23: *
24: * @see PageBookView
25: * @see Page
26: */
27: public interface IPage {
28: /**
29: * Creates the SWT control for this page under the given parent
30: * control.
31: * <p>
32: * Clients should not call this method (the workbench calls this method when
33: * it needs to, which may be never).
34: * </p>
35: *
36: * @param parent the parent control
37: */
38: public void createControl(Composite parent);
39:
40: /**
41: * Disposes of this page.
42: * <p>
43: * This is the last method called on the <code>IPage</code>. Implementors should
44: * clean up any resources associated with the page.
45: * </p>
46: * Callers of this method should ensure that the page's control (if it exists)
47: * has been disposed before calling this method. However, for backward compatibilty,
48: * implementors must also ensure that the page's control has been disposed before
49: * this method returns.
50: * </p>
51: * <p>
52: * Note that there is no guarantee that createControl() has been called,
53: * so the control may never have been created.
54: * </p>
55: */
56: public void dispose();
57:
58: /**
59: * Returns the SWT control for this page.
60: *
61: * @return the SWT control for this page, or <code>null</code> if this
62: * page does not have a control
63: */
64: public Control getControl();
65:
66: /**
67: * Allows the page to make contributions to the given action bars.
68: * The contributions will be visible when the page is visible.
69: * <p>
70: * This method is automatically called shortly after
71: * <code>createControl</code> is called
72: * </p>
73: *
74: * @param actionBars the action bars for this page
75: */
76: public void setActionBars(IActionBars actionBars);
77:
78: /**
79: * Asks this page to take focus within its pagebook view.
80: */
81: public void setFocus();
82: }
|