KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > intro > IIntroManager


1 /*******************************************************************************
2  * Copyright (c) 2004, 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.ui.intro;
12
13 import org.eclipse.ui.IWorkbenchWindow;
14
15 /**
16  * Manages the intro part that introduces the product to new users.
17  * The intro part is typically shown the first time a product is started up.
18  * <p>
19  * The initial behavior of the intro part is controlled by the application
20  * from via the {@link org.eclipse.ui.application.WorkbenchWindowAdvisor#openIntro()}
21  * method.
22  * </p>
23  * <p>
24  * See {@link org.eclipse.ui.intro.IIntroPart} for details on where intro parts
25  * come from.
26  * </p>
27  * <p>
28  * This interface is not intended to be extended or implemented by clients.
29  * </p>
30  *
31  * @see org.eclipse.ui.IWorkbench#getIntroManager()
32  * @since 3.0
33  */

34 public interface IIntroManager {
35
36     /**
37      * Closes the given intro part.
38      *
39      * @param part the intro part
40      * @return <code>true</code> if the intro part was closed, and
41      * <code>false</code> otherwise. <code>false</code> is returned
42      * if part is <code>null</code> or it is not the intro part returned
43      * by {@link #getIntro()}.
44      */

45     public boolean closeIntro(IIntroPart part);
46
47     /**
48      * Returns the intro part. Returns <code>null</code> if there is no intro
49      * part, if it has been previously closed via {@link #closeIntro(IIntroPart)}
50      * or if there is an intro part but {@link #showIntro(IWorkbenchWindow, boolean)}
51      * has not yet been called to create it.
52      *
53      * @return the intro part, or <code>null</code> if none is available
54      */

55     public IIntroPart getIntro();
56
57     /**
58      * Return whether an intro is available. Note that this checks whether
59      * there is an applicable intro part that could be instantiated and shown
60      * to the user.
61      * Use {@link #getIntro()} to discover whether an intro part has already
62      * been created.
63      *
64      * @return <code>true</code> if there is an intro that could be shown, and
65      * <code>false</code> if there is no intro
66      */

67     public boolean hasIntro();
68
69     /**
70      * Return the standby state of the given intro part.
71      *
72      * @param part the intro part
73      * @return <code>true</code> if the part in its partially
74      * visible standy mode, and <code>false</code> if in its fully visible state.
75      * <code>false</code> is returned if part is <code>null</code> or it is not
76      * the intro part returned by {@link #getIntro()}.
77      */

78     boolean isIntroStandby(IIntroPart part);
79
80     /**
81      * Sets the standby state of the given intro part. Intro part usually should
82      * render themselves differently in the full and standby modes. In standby
83      * mode, the part should be partially visible to the user but otherwise
84      * allow them to work. In full mode, the part should be fully visible and
85      * be the center of the user's attention.
86      * <p>
87      * This method does nothing if the part is <code>null</code> or is not
88      * the intro part returned by {@link #getIntro()}.
89      * </p>
90      *
91      * @param part the intro part, or <code>null</code>
92      * @param standby <code>true</code> to put the part in its partially
93      * visible standy mode, and <code>false</code> to make it fully visible.
94      */

95     public void setIntroStandby(IIntroPart part, boolean standby);
96
97     /**
98      * Shows the intro part in the given workbench window. If the intro part has
99      * not been created yet, one will be created. If the intro part is currently
100      * being shown in some workbench window, that other window is made active.
101      *
102      * @param preferredWindow the preferred workbench window, or
103      * <code>null</code> to indicate the currently active workbench window
104      * @param standby <code>true</code> to put the intro part in its partially
105      * visible standy mode, and <code>false</code> to make it fully visible
106      * @return the newly-created or existing intro part, or <code>null</code>
107      * if no intro part is available or if <code>preferredWindow</code> is
108      * <code>null</code> and there is no currently active workbench window
109      */

110     public IIntroPart showIntro(IWorkbenchWindow preferredWindow,
111             boolean standby);
112     
113     /**
114      * Returns <code>true</code> if there is an intro content detector and it
115      * reports that new intro content is available.
116      *
117      * @return <code>true</code> if new intro content is available
118      *
119      * @since 3.3
120      */

121     public boolean isNewContentAvailable();
122 }
123
Popular Tags