blob: 0e14e56ffd728d8fa03b241b905ad3c20a164884 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
package org.eclipse.papyrus.modelexplorer;
import org.eclipse.jface.viewers.CellLabelProvider;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
/**
* Interface containing operations from {@Link org.eclipse.jface.viewers.CellLabelProvider}
* It's a design fault that no interface has been defined by jface in the first place.
*
* @author ansgar
*
*/
public interface ITooltip {
/**
* @see CellLabelProvider
*
* @param object
* the element for which the tool tip is shown
* @return {@link Image} or <code>null</code> if there is not image.
*/
public Image getToolTipImage(Object object);
/**
* @see CellLabelProvider
*
*
* @param element
* the element for which the tool tip is shown
* @return the {@link String} or <code>null</code> if there is not text to
* display
*/
public String getToolTipText(Object element);
/**
* Return the amount of pixels in x and y direction you want the tool tip to
* pop up from the mouse pointer. The default shift is 10px right and 0px
* below your mouse cursor. Be aware of the fact that you should at least
* position the tool tip 1px right to your mouse cursor else click events
* may not get propagated properly.
*
* @param object
* the element for which the tool tip is shown
* @return {@link Point} to shift of the tool tip or <code>null</code> if the
* default shift should be used.
*/
public Point getToolTipShift(Object object);
/**
* The time in milliseconds the tool tip is shown for.
*
* @param object
* the {@link Object} for which the tool tip is shown
* @return time in milliseconds the tool tip is shown for
*/
public int getToolTipTimeDisplayed(Object object);
/**
* The time in milliseconds until the tool tip is displayed.
*
* @param object
* the {@link Object} for which the tool tip is shown
* @return time in milliseconds until the tool tip is displayed
*/
public int getToolTipDisplayDelayTime(Object object);
}
|