KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > views > IViewDescriptor


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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 package org.eclipse.ui.views;
12
13 import org.eclipse.core.runtime.CoreException;
14 import org.eclipse.core.runtime.IAdaptable;
15 import org.eclipse.jface.resource.ImageDescriptor;
16 import org.eclipse.ui.IViewPart;
17 import org.eclipse.ui.IWorkbenchPartDescriptor;
18
19 /**
20  * This is a view descriptor. It provides a "description" of a given
21  * given view so that the view can later be constructed.
22  * <p>
23  * The view registry provides facilities to map from an extension
24  * to a IViewDescriptor.
25  * </p>
26  * <p>
27  * This interface is not intended to be implemented by clients.
28  * </p>
29  *
30  * @see org.eclipse.ui.views.IViewRegistry
31  * @since 3.1
32  */

33 public interface IViewDescriptor extends IWorkbenchPartDescriptor, IAdaptable {
34     /**
35      * Creates an instance of the view defined in the descriptor.
36      *
37      * @return the view part
38      * @throws CoreException thrown if there is a problem creating the part
39      */

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

49     public String JavaDoc[] getCategoryPath();
50
51     /**
52      * Returns the description of this view.
53      *
54      * @return the description
55      */

56     public String JavaDoc getDescription();
57
58     /**
59      * Returns the id of the view.
60      *
61      * @return the id
62      */

63     public String JavaDoc getId();
64
65     /**
66      * Returns the descriptor for the icon to show for this view.
67      */

68     public ImageDescriptor getImageDescriptor();
69
70     /**
71      * Returns the label to show for this view.
72      *
73      * @return the label
74      */

75     public String JavaDoc getLabel();
76
77     /**
78      * Returns the default fast view width ratio for this view.
79      *
80      * @return the fast view width ratio
81      */

82     public float getFastViewWidthRatio();
83
84     /**
85      * Returns whether this view allows multiple instances.
86      *
87      * @return whether this view allows multiple instances
88      */

89     public boolean getAllowMultiple();
90
91 }
92
Popular Tags