KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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 part lifecycle events.
15  * <p>
16  * This interface may be implemented by clients.
17  * </p>
18  *
19  * @see IPartService#addPartListener(IPartListener)
20  */

21 public interface IPartListener {
22
23     /**
24      * Notifies this listener that the given part has been activated.
25      *
26      * @param part the part that was activated
27      * @see IWorkbenchPage#activate
28      */

29     public void partActivated(IWorkbenchPart part);
30
31     /**
32      * Notifies this listener that the given part has been brought to the top.
33      * <p>
34      * These events occur when an editor is brought to the top in the editor area,
35      * or when a view is brought to the top in a page book with multiple views.
36      * They are normally only sent when a part is brought to the top
37      * programmatically (via <code>IPerspective.bringToTop</code>). When a part is
38      * activated by the user clicking on it, only <code>partActivated</code> is sent.
39      * </p>
40      *
41      * @param part the part that was surfaced
42      * @see IWorkbenchPage#bringToTop
43      */

44     public void partBroughtToTop(IWorkbenchPart part);
45
46     /**
47      * Notifies this listener that the given part has been closed.
48      *
49      * @param part the part that was closed
50      * @see IWorkbenchPage#hideView(IViewPart)
51      */

52     public void partClosed(IWorkbenchPart part);
53
54     /**
55      * Notifies this listener that the given part has been deactivated.
56      *
57      * @param part the part that was deactivated
58      * @see IWorkbenchPage#activate(IWorkbenchPart)
59      */

60     public void partDeactivated(IWorkbenchPart part);
61
62     /**
63      * Notifies this listener that the given part has been opened.
64      *
65      * @param part the part that was opened
66      * @see IWorkbenchPage#showView(String)
67      */

68     public void partOpened(IWorkbenchPart part);
69 }
70
Popular Tags