KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > registry > IViewDescriptor


1 /*******************************************************************************
2  * Copyright (c) 2000, 2004 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 package org.eclipse.ui.internal.registry;
12
13 import org.eclipse.core.runtime.CoreException;
14 import org.eclipse.core.runtime.IConfigurationElement;
15 import org.eclipse.ui.*;
16 import org.eclipse.jface.resource.ImageDescriptor;
17
18 /**
19  * This is a view descriptor. It provides a "description" of a given
20  * given view so that the view can later be constructed.
21  * <p>
22  * [Issue: This interface is not exposed in API, but time may
23  * demonstrate that it should be. For the short term leave it be.
24  * In the long term its use should be re-evaluated. ]
25  * </p>
26  * <p>
27  * The view registry provides facilities to map from an extension
28  * to a IViewDescriptor.
29  * </p>
30  *
31  */

32 public interface IViewDescriptor extends IWorkbenchPartDescriptor {
33 /**
34  * Creates an instance of the view defined in the descriptor.
35  */

36 public IViewPart createView() throws CoreException;
37 /**
38  * Returns an array of strings that represent
39  * view's category path. This array will be used
40  * for hierarchical presentation of the
41  * view in places like submenus.
42  * @return array of category tokens or null if not specified.
43  */

44 public String JavaDoc[] getCategoryPath();
45 /**
46  * Returns the configuration element which contributed this view.
47  */

48 public IConfigurationElement getConfigurationElement();
49 /**
50  * Returns the description of this view.
51  * This is the value of its <code>"description"</code> attribute.
52  *
53  * @return the description
54  */

55 public String JavaDoc getDescription();
56 /**
57  * Returns the id of the view.
58  */

59 public String JavaDoc getID() ;
60 /**
61  * Returns the descriptor for the icon to show for this view.
62  */

63 public ImageDescriptor getImageDescriptor();
64 /**
65  * Returns the label to show for this view.
66  */

67 public String JavaDoc getLabel() ;
68
69 /**
70  * Returns the text of the accelerator to use for this view.
71  */

72 public String JavaDoc getAccelerator();
73
74 /**
75  * Returns the default fast view width ratio for this view.
76  *
77  * @since 2.0
78  */

79 public float getFastViewWidthRatio();
80
81 /**
82  * Returns whether this view allows multiple instances.
83  *
84  * @since 3.0
85  */

86 public boolean getAllowMultiple();
87
88 }
89
Popular Tags