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;
11:
12: /**
13: * A page service tracks the page and perspective lifecycle events
14: * within a workbench window.
15: * <p>
16: * This interface is not intended to be implemented by clients.
17: * </p>
18: *
19: * @see IWorkbenchWindow
20: * @see IPageListener
21: * @see IPerspectiveListener
22: */
23: public interface IPageService {
24: /**
25: * Adds the given listener for page lifecycle events.
26: * Has no effect if an identical listener is already registered.
27: *
28: * @param listener a page listener
29: */
30: public void addPageListener(IPageListener listener);
31:
32: /**
33: * Adds the given listener for a page's perspective lifecycle events.
34: * Has no effect if an identical listener is already registered.
35: *
36: * @param listener a perspective listener
37: */
38: public void addPerspectiveListener(IPerspectiveListener listener);
39:
40: /*
41: * Returns the active page.
42: *
43: * @return the active page, or <code>null</code> if no page is currently active
44: */
45: public IWorkbenchPage getActivePage();
46:
47: /**
48: * Removes the given page listener.
49: * Has no affect if an identical listener is not registered.
50: *
51: * @param listener a page listener
52: */
53: public void removePageListener(IPageListener listener);
54:
55: /**
56: * Removes the given page's perspective listener.
57: * Has no affect if an identical listener is not registered.
58: *
59: * @param listener a perspective listener
60: */
61: public void removePerspectiveListener(IPerspectiveListener listener);
62: }
|