01: /*******************************************************************************
02: * Copyright (c) 2007 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: ******************************************************************************/package org.eclipse.ui.internal.forms;
11:
12: import org.eclipse.swt.widgets.Control;
13: import org.eclipse.ui.forms.IMessageManager;
14: import org.eclipse.ui.forms.widgets.Form;
15:
16: /**
17: * The classes that implement this interface are responsible for managing custom
18: * tool tips for message-related controls in the form header. By default, a
19: * simple manager is installed by the form that uses the built-in widget tool
20: * tips for this purpose. Clients can replace this behaviour with richer tool
21: * tips that show images, links and other content.
22: * <p>
23: * The message-related controls in the header are:
24: * <ul>
25: * <li>Image label - used to replace the form title image with the message type
26: * image</li>
27: * <li>Message label - renders the message as a static text.</li>
28: * <li>Message hyperlink - renders the message as a hyperlink.</li>
29: * </ul>
30: * The message manager will be asked to create the tool tip for any and all of
31: * the controls listed above in its factory method. After that, it will be asked
32: * to update whenever the message information changes in the form. For this
33: * reason, the manager is expected to retain references to the tool tips and
34: * update them with new content when asked.
35: *
36: * @see IMessageManager
37: * @see Form
38: * <p>
39: * <strong>EXPERIMENTAL</strong>. This class or interface has been added
40: * as part of a work in progress. There is no guarantee that this API will
41: * work or that it will remain the same. Please do not use this API without
42: * consulting with the Platform UA team.
43: * </p>
44: * @since 3.3
45: */
46: public interface IMessageToolTipManager {
47: /**
48: * Creates the custom tool tip for the provided control.
49: *
50: * @param control
51: * the control for which to create a custom tool tip
52: * @param imageControl
53: * <code>true</code> if the control is used to render the title
54: * image, <code>false</code> otherwise.
55: */
56: void createToolTip(Control control, boolean imageControl);
57:
58: /**
59: * Updates all the managed tool tips. The manager should get the current
60: * message, message type and optional children messages from the form to
61: * update the custom tool tips.
62: */
63: void update();
64: }
|