KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > forms > IMessageToolTipManager


1 /*******************************************************************************
2  * Copyright (c) 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.internal.forms;
12
13 import org.eclipse.swt.widgets.Control;
14 import org.eclipse.ui.forms.IMessageManager;
15 import org.eclipse.ui.forms.widgets.Form;
16
17 /**
18  * The classes that implement this interface are responsible for managing custom
19  * tool tips for message-related controls in the form header. By default, a
20  * simple manager is installed by the form that uses the built-in widget tool
21  * tips for this purpose. Clients can replace this behaviour with richer tool
22  * tips that show images, links and other content.
23  * <p>
24  * The message-related controls in the header are:
25  * <ul>
26  * <li>Image label - used to replace the form title image with the message type
27  * image</li>
28  * <li>Message label - renders the message as a static text.</li>
29  * <li>Message hyperlink - renders the message as a hyperlink.</li>
30  * </ul>
31  * The message manager will be asked to create the tool tip for any and all of
32  * the controls listed above in its factory method. After that, it will be asked
33  * to update whenever the message information changes in the form. For this
34  * reason, the manager is expected to retain references to the tool tips and
35  * update them with new content when asked.
36  *
37  * @see IMessageManager
38  * @see Form
39  * <p>
40  * <strong>EXPERIMENTAL</strong>. This class or interface has been added
41  * as part of a work in progress. There is no guarantee that this API will
42  * work or that it will remain the same. Please do not use this API without
43  * consulting with the Platform UA team.
44  * </p>
45  * @since 3.3
46  */

47 public interface IMessageToolTipManager {
48     /**
49      * Creates the custom tool tip for the provided control.
50      *
51      * @param control
52      * the control for which to create a custom tool tip
53      * @param imageControl
54      * <code>true</code> if the control is used to render the title
55      * image, <code>false</code> otherwise.
56      */

57     void createToolTip(Control control, boolean imageControl);
58
59     /**
60      * Updates all the managed tool tips. The manager should get the current
61      * message, message type and optional children messages from the form to
62      * update the custom tool tips.
63      */

64     void update();
65 }
Popular Tags