Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/core/org.eclipse.papyrus.modelexplorer/src/org/eclipse/papyrus/modelexplorer/ITooltip.java')
-rw-r--r--plugins/core/org.eclipse.papyrus.modelexplorer/src/org/eclipse/papyrus/modelexplorer/ITooltip.java67
1 files changed, 67 insertions, 0 deletions
diff --git a/plugins/core/org.eclipse.papyrus.modelexplorer/src/org/eclipse/papyrus/modelexplorer/ITooltip.java b/plugins/core/org.eclipse.papyrus.modelexplorer/src/org/eclipse/papyrus/modelexplorer/ITooltip.java
new file mode 100644
index 00000000000..0e14e56ffd7
--- /dev/null
+++ b/plugins/core/org.eclipse.papyrus.modelexplorer/src/org/eclipse/papyrus/modelexplorer/ITooltip.java
@@ -0,0 +1,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);
+}

Back to the top