KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > console > IConsole


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.ui.console;
12
13 import org.eclipse.jface.resource.ImageDescriptor;
14 import org.eclipse.jface.util.IPropertyChangeListener;
15 import org.eclipse.ui.part.IPageBookViewPage;
16
17 /**
18  * A console. A console is commonly used to display messages such as the output
19  * streams of a system process. A console can be displayed in one or more console
20  * views.
21  * <p>
22  * The console implementations provided by this plug-in are textual
23  * (<code>TextConsole</code>, <code>MessageConsole</code> and <code>IOConsole</code>).
24  * However a client can provide alternate presentations since a console implementation
25  * is responsible for providing is page for the page book views in which consoles are
26  * displayed.
27  * </p>
28  * <p>
29  * This interface is not intended to be implemented directly by clients.
30  * Subclass <code>AbstractConsole</code> instead.
31  * </p>
32  * @since 3.0
33  */

34 public interface IConsole {
35         
36     /**
37      * Returns the name of this console.
38      *
39      * @return the name of this console
40      */

41     public String JavaDoc getName();
42     
43     /**
44      * Returns an image descriptor for this console, or <code>null</code>
45      * if none.
46      *
47      * @return an image descriptor for this console, or <code>null</code>
48      * if none
49      */

50     public ImageDescriptor getImageDescriptor();
51         
52     /**
53      * Creates and returns a new page for this console. The page is displayed
54      * for this console in the console given view.
55      *
56      * @param view the view in which the page is to be created
57      * @return a page book view page representation of this console
58      */

59     public IPageBookViewPage createPage(IConsoleView view);
60     
61     /**
62      * Adds a listener for changes to properties of this console.
63      * Has no effect if an identical listener is already registered.
64      * <p>
65      * The changes supported by the console view are as follows:
66      * <ul>
67      * <li><code>IBasicPropertyConstants.P_TEXT</code> - indicates the name
68      * of a console has changed</li>
69      * <li><code>IBasicPropertyConstants.P_IMAGE</code> - indicates the image
70      * of a console has changed</li>
71      * </ul>
72      * </p>
73      * <p>
74      * Consoles may define additional properties as required.
75      * </p>
76      *
77      * @param listener a property change listener
78      */

79     public void addPropertyChangeListener(IPropertyChangeListener listener);
80     
81     /**
82      * Removes the given property listener from this console page.
83      * Has no effect if an identical listener is not already registered.
84      *
85      * @param listener a property listener
86      */

87     public void removePropertyChangeListener(IPropertyChangeListener listener);
88     
89     /**
90      * Returns a unique identifier for this console's type, or <code>null</code>
91      * if unspecified.
92      *
93      * @return a unique identifier for this console's type, or <code>null</code>
94      * @since 3.1
95      */

96     public String JavaDoc getType();
97
98 }
99
Popular Tags