KickJava   Java API By Example, From Geeks To Geeks.

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


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
12 package org.eclipse.ui;
13
14 /**
15  * Interface for listening to part lifecycle events.
16  * <p>
17  * This is a replacement for <code>IPartListener</code>.
18  * <p>
19  * This interface may be implemented by clients.
20  * </p>
21  *
22  * @see IPartService#addPartListener(IPartListener2)
23  */

24 public interface IPartListener2 {
25
26     /**
27      * Notifies this listener that the given part has been activated.
28      *
29      * @param partRef the part that was activated
30      * @see IWorkbenchPage#activate
31      */

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

47     public void partBroughtToTop(IWorkbenchPartReference partRef);
48
49     /**
50      * Notifies this listener that the given part has been closed.
51      * <p>
52      * Note that if other perspectives in the same page share the view,
53      * this notification is not sent. It is only sent when the view
54      * is being removed from the page entirely (it is being disposed).
55      * </p>
56      *
57      * @param partRef the part that was closed
58      * @see IWorkbenchPage#hideView
59      */

60     public void partClosed(IWorkbenchPartReference partRef);
61
62     /**
63      * Notifies this listener that the given part has been deactivated.
64      *
65      * @param partRef the part that was deactivated
66      * @see IWorkbenchPage#activate
67      */

68     public void partDeactivated(IWorkbenchPartReference partRef);
69
70     /**
71      * Notifies this listener that the given part has been opened.
72      * <p>
73      * Note that if other perspectives in the same page share the view,
74      * this notification is not sent. It is only sent when the view
75      * is being newly opened in the page (it is being created).
76      * </p>
77      *
78      * @param partRef the part that was opened
79      * @see IWorkbenchPage#showView
80      */

81     public void partOpened(IWorkbenchPartReference partRef);
82
83     /**
84      * Notifies this listener that the given part is hidden or obscured by another part.
85      *
86      * @param partRef the part that is hidden or obscured by another part
87      */

88     public void partHidden(IWorkbenchPartReference partRef);
89
90     /**
91      * Notifies this listener that the given part is visible.
92      *
93      * @param partRef the part that is visible
94      */

95     public void partVisible(IWorkbenchPartReference partRef);
96
97     /**
98      * Notifies this listener that the given part's input was changed.
99      *
100      * @param partRef the part whose input was changed
101      */

102     public void partInputChanged(IWorkbenchPartReference partRef);
103 }
104
Popular Tags