KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ltk > ui > refactoring > IStatusContextViewer


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 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.ltk.ui.refactoring;
12
13 import org.eclipse.swt.widgets.Composite;
14 import org.eclipse.swt.widgets.Control;
15
16 import org.eclipse.ltk.core.refactoring.RefactoringStatusContext;
17
18 /**
19  * Viewer to present the context object of a {@linkplain org.eclipse.ltk.core.refactoring.RefactoringStatusEntry
20  * refactoring status entry}.
21  * <p>
22  * Status context viewers are associated with a context object via the extension point <code>
23  * org.eclipse.ltk.ui.refactoring.statusContextViewers</code>. Implementors of this
24  * extension point must therefore implement this interface.
25  * </p>
26  * <p>
27  * To ensure visual consistency across all provided context viewers the widget
28  * hierarchy provided through the method {@link #createControl(Composite)} has to
29  * use a {@link org.eclipse.swt.custom.ViewForm} as its root widget.
30  * </p>
31  * <p>
32  * Clients of this interface should call <code>createControl</code> before calling
33  * <code>setInput</code>.
34  * </p>
35  * @since 3.0
36  */

37 public interface IStatusContextViewer {
38     
39     /**
40      * Creates the status viewer's widget hierarchy. This method
41      * is only called once. Method <code>getControl()</code> should
42      * be used to retrieve the widget hierarchy.
43      *
44      * @param parent the parent for the widget hierarchy
45      *
46      * @see #getControl()
47      */

48     public void createControl(Composite parent);
49     
50     /**
51      * Returns the status context viewer's SWT control.
52      *
53      * @return the status context viewer's SWT control or <code>null</code>
54      * is the widget hierarchy hasn't been created yet
55      */

56     public Control getControl();
57     
58     /**
59      * Sets the status context viewer's input element.
60      *
61      * @param input the input element
62      */

63     public void setInput(RefactoringStatusContext input);
64 }
65
66
Popular Tags