KickJava   Java API By Example, From Geeks To Geeks.

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


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  * Interface for listening to perspective lifecycle events.
15  * <p>
16  * This interface may be implemented by clients.
17  * </p>
18  *
19  * @see IPageService#addPerspectiveListener(IPerspectiveListener)
20  * @see PerspectiveAdapter
21  */

22 public interface IPerspectiveListener {
23     /**
24      * Notifies this listener that a perspective in the given page
25      * has been activated.
26      *
27      * @param page the page containing the activated perspective
28      * @param perspective the perspective descriptor that was activated
29      * @see IWorkbenchPage#setPerspective
30      */

31     public void perspectiveActivated(IWorkbenchPage page,
32             IPerspectiveDescriptor perspective);
33
34     /**
35      * Notifies this listener that a perspective has changed in some way
36      * (for example, editor area hidden, perspective reset,
37      * view show/hide, editor open/close, etc).
38      *
39      * @param page the page containing the affected perspective
40      * @param perspective the perspective descriptor
41      * @param changeId one of the <code>CHANGE_*</code> constants on IWorkbenchPage
42      */

43     public void perspectiveChanged(IWorkbenchPage page,
44             IPerspectiveDescriptor perspective, String JavaDoc changeId);
45 }
46
Popular Tags