KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > ui > packageview > PackagesFrameSource


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 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.jdt.internal.ui.packageview;
13
14 import org.eclipse.ui.views.framelist.TreeFrame;
15 import org.eclipse.ui.views.framelist.TreeViewerFrameSource;
16
17 class PackagesFrameSource extends TreeViewerFrameSource {
18     private PackageExplorerPart fPackagesExplorer;
19     
20     PackagesFrameSource(PackageExplorerPart explorer) {
21         super(explorer.getTreeViewer());
22         fPackagesExplorer= explorer;
23     }
24
25     protected TreeFrame createFrame(Object JavaDoc input) {
26         TreeFrame frame = super.createFrame(input);
27         frame.setName(fPackagesExplorer.getFrameName(input));
28         frame.setToolTipText(fPackagesExplorer.getToolTipText(input));
29         return frame;
30     }
31
32     /**
33      * Also updates the title of the packages explorer
34      * @param frame the frame that changed
35      */

36     protected void frameChanged(TreeFrame frame) {
37         super.frameChanged(frame);
38         fPackagesExplorer.updateTitle();
39     }
40
41 }
42
Popular Tags