KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > EditorView


1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.ui.internal;
13
14 import org.eclipse.swt.widgets.Composite;
15 import org.eclipse.ui.*;
16 import org.eclipse.ui.part.ViewPart;
17
18 public class EditorView extends ViewPart {
19     private EditorList editorList;
20     
21 /**
22  * Constructs a new editorList view.
23  */

24 public EditorView() {
25 }
26
27 /* (non-Javadoc)
28  * Method declared on IWorkbenchPart.
29  */

30 public void createPartControl(Composite parent) {
31     IWorkbenchWindow window = getSite().getPage().getWorkbenchWindow();
32     editorList = new EditorList(window, null);
33     editorList.createControl(parent);
34 }
35
36 /* (non-Javadoc)
37  * Method declared on IWorkbenchPart.
38  */

39 public void dispose() {
40     editorList.dispose();
41     editorList = null;
42     super.dispose();
43 }
44
45 /**
46  * @see IWorkbenchPart#setFocus()
47  */

48 public void setFocus() {
49     editorList.getControl().setFocus();
50 }
51 }
52
Popular Tags