KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2004, 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  * Extension interface to <code>IPerspectiveListener</code> which
15  * adds support for listening to perspective open and close events.
16  * <p>
17  * This interface may be implemented by clients.
18  * </p>
19  *
20  * @see IPageService#addPerspectiveListener(IPerspectiveListener)
21  * @see PerspectiveAdapter
22  * @since 3.1
23  */

24 public interface IPerspectiveListener3 extends IPerspectiveListener2 {
25
26     /**
27      * Notifies this listener that a perspective in the given page has been
28      * opened.
29      *
30      * @param page
31      * the page containing the opened perspective
32      * @param perspective
33      * the perspective descriptor that was opened
34      * @see IWorkbenchPage#setPerspective(IPerspectiveDescriptor)
35      */

36     public void perspectiveOpened(IWorkbenchPage page,
37             IPerspectiveDescriptor perspective);
38
39     /**
40      * Notifies this listener that a perspective in the given page has been
41      * closed.
42      *
43      * @param page
44      * the page containing the closed perspective
45      * @param perspective
46      * the perspective descriptor that was closed
47      * @see IWorkbenchPage#closePerspective(IPerspectiveDescriptor, boolean, boolean)
48      * @see IWorkbenchPage#closeAllPerspectives(boolean, boolean)
49      */

50     public void perspectiveClosed(IWorkbenchPage page,
51             IPerspectiveDescriptor perspective);
52
53     /**
54      * Notifies this listener that a perspective in the given page has been
55      * deactivated.
56      *
57      * @param page
58      * the page containing the deactivated perspective
59      * @param perspective
60      * the perspective descriptor that was deactivated
61      * @see IWorkbenchPage#setPerspective(IPerspectiveDescriptor)
62      */

63     public void perspectiveDeactivated(IWorkbenchPage page,
64             IPerspectiveDescriptor perspective);
65
66     /**
67      * Notifies this listener that a perspective in the given page has been
68      * saved as a new perspective with a different perspective descriptor.
69      *
70      * @param page
71      * the page containing the saved perspective
72      * @param oldPerspective
73      * the old perspective descriptor
74      * @param newPerspective
75      * the new perspective descriptor
76      * @see IWorkbenchPage#savePerspectiveAs(IPerspectiveDescriptor)
77      */

78     public void perspectiveSavedAs(IWorkbenchPage page,
79             IPerspectiveDescriptor oldPerspective,
80             IPerspectiveDescriptor newPerspective);
81 }
82
Popular Tags