KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > IPageService


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;
12
13 /**
14  * A page service tracks the page and perspective lifecycle events
15  * within a workbench window.
16  * <p>
17  * This interface is not intended to be implemented by clients.
18  * </p>
19  *
20  * @see IWorkbenchWindow
21  * @see IPageListener
22  * @see IPerspectiveListener
23  */

24 public interface IPageService {
25     /**
26      * Adds the given listener for page lifecycle events.
27      * Has no effect if an identical listener is already registered.
28      *
29      * @param listener a page listener
30      */

31     public void addPageListener(IPageListener listener);
32
33     /**
34      * Adds the given listener for a page's perspective lifecycle events.
35      * Has no effect if an identical listener is already registered.
36      *
37      * @param listener a perspective listener
38      */

39     public void addPerspectiveListener(IPerspectiveListener listener);
40
41     /*
42      * Returns the active page.
43      *
44      * @return the active page, or <code>null</code> if no page is currently active
45      */

46     public IWorkbenchPage getActivePage();
47
48     /**
49      * Removes the given page listener.
50      * Has no affect if an identical listener is not registered.
51      *
52      * @param listener a page listener
53      */

54     public void removePageListener(IPageListener listener);
55
56     /**
57      * Removes the given page's perspective listener.
58      * Has no affect if an identical listener is not registered.
59      *
60      * @param listener a perspective listener
61      */

62     public void removePerspectiveListener(IPerspectiveListener listener);
63 }
64
Popular Tags