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: * Interface for listening to perspective lifecycle events.
14: * <p>
15: * This interface may be implemented by clients.
16: * </p>
17: *
18: * @see IPageService#addPerspectiveListener(IPerspectiveListener)
19: * @see PerspectiveAdapter
20: */
21: public interface IPerspectiveListener {
22: /**
23: * Notifies this listener that a perspective in the given page
24: * has been activated.
25: *
26: * @param page the page containing the activated perspective
27: * @param perspective the perspective descriptor that was activated
28: * @see IWorkbenchPage#setPerspective
29: */
30: public void perspectiveActivated(IWorkbenchPage page,
31: IPerspectiveDescriptor perspective);
32:
33: /**
34: * Notifies this listener that a perspective has changed in some way
35: * (for example, editor area hidden, perspective reset,
36: * view show/hide, editor open/close, etc).
37: *
38: * @param page the page containing the affected perspective
39: * @param perspective the perspective descriptor
40: * @param changeId one of the <code>CHANGE_*</code> constants on IWorkbenchPage
41: */
42: public void perspectiveChanged(IWorkbenchPage page,
43: IPerspectiveDescriptor perspective, String changeId);
44: }
|