alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

/*******************************************************************************
 * Copyright (c) 2000, 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.ui;

/**
 * Interface for listening to part lifecycle events.
 * <p>
 * This interface may be implemented by clients.
 * </p>
 *
 * @see IPartService#addPartListener(IPartListener)
 */
public interface IPartListener {

    /**
     * Notifies this listener that the given part has been activated.
     *
     * @param part the part that was activated
     * @see IWorkbenchPage#activate
     */
    public void partActivated(IWorkbenchPart part);

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

    /**
     * Notifies this listener that the given part has been closed.
     *
     * @param part the part that was closed
     * @see IWorkbenchPage#hideView(IViewPart)
     */
    public void partClosed(IWorkbenchPart part);

    /**
     * Notifies this listener that the given part has been deactivated.
     *
     * @param part the part that was deactivated
     * @see IWorkbenchPage#activate(IWorkbenchPart)
     */
    public void partDeactivated(IWorkbenchPart part);

    /**
     * Notifies this listener that the given part has been opened.
     *
     * @param part the part that was opened
     * @see IWorkbenchPage#showView(String)
     */
    public void partOpened(IWorkbenchPart part);
}
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.