KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > ui > IDetailPane


1 /*******************************************************************************
2  * Copyright (c) 2006, 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 package org.eclipse.debug.ui;
12
13 import org.eclipse.jface.viewers.IStructuredSelection;
14 import org.eclipse.swt.widgets.Composite;
15 import org.eclipse.swt.widgets.Control;
16 import org.eclipse.ui.IWorkbenchPartSite;
17
18 /**
19  * A detail pane is created from a detail pane factory and displays detailed information about
20  * a current selection with an SWT <code>Control</code>. Use the
21  * <code>org.eclipse.debug.ui.detailFactories</code> extension point to contribute a detail pane
22  * factory.
23  * <p>
24  * Clients may implement this interface.
25  * </p>
26  * @see IDetailPaneFactory
27  * @since 3.3
28  */

29 public interface IDetailPane {
30
31     /**
32      * Initializes this detail pane for the given workbench part site. This is the first method
33      * invoked on a detail pane after instantiation. If this detail pane is being added to a
34      * non-view component such as a dialog, the passed workbench part site will be <code>null</code>.
35      *
36      * @param partSite The workbench part site that this detail pane has been created in or <code>null</code>
37      */

38     public void init(IWorkbenchPartSite partSite);
39     
40     /**
41      * Creates and returns the main control for this detail pane using the given composite as a
42      * parent.
43      *
44      * @param parent The parent composite that UI components should be added to
45      * @return The main control for this detail pane
46      */

47     public Control createControl(Composite parent);
48     
49     /**
50      * Disposes this detail pane. This is the last method invoked on a detail pane and should
51      * dispose of all UI components including the main composite returned in <code>createControl()</code>.
52      */

53     public void dispose();
54     
55     /**
56      * Displays details for the given selection, possible <code>null</code>. An empty selection
57      * or <code>null</code> should clear this detail pane.
58      *
59      * @param selection The selection to be displayed, possibly empty or <code>null</code>
60      */

61     public void display(IStructuredSelection selection);
62     
63     /**
64      * Allows this detail pane to give focus to an appropriate control, and returns whether
65      * the detail pane accepted focus. If this detail pane does not want focus, it should
66      * return <code>false</code>, allowing the containing view to choose another target
67      * for focus.
68      *
69      * @return whether focus was taken
70      */

71     public boolean setFocus();
72     
73     /**
74      * Returns a unique identifier for this detail pane.
75      *
76      * @return A unique identifier for this detail pane
77      */

78     public String JavaDoc getID();
79     
80     /**
81      * The human readable name of this detail pane. This is a short description of the type
82      * of details this pane displays that appears in the context menu.
83      *
84      * @return name of this detail pane
85      */

86     public String JavaDoc getName();
87     
88     /**
89      * A brief description of this detail pane, or <code>null</code> if none
90      *
91      * @return a description of this detail pane, or <code>null</code> if none
92      */

93     public String JavaDoc getDescription();
94     
95 }
96
Popular Tags