-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- * VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.g2d.gallery;\r
-\r
-import org.eclipse.jface.viewers.IBaseLabelProvider;\r
-import org.eclipse.swt.SWT;\r
-import org.eclipse.swt.graphics.Color;\r
-import org.simantics.g2d.image.Image;\r
-\r
-public interface ILabelProvider extends IBaseLabelProvider {\r
- /**\r
- * Returns the image for the label of the given element. The image\r
- * is owned by the label provider and must not be disposed directly.\r
- * Instead, dispose the label provider when no longer needed.\r
- *\r
- * @param element the element for which to provide the label image\r
- * @return the image used to label the element, or <code>null</code>\r
- * if there is no image for the given object\r
- */\r
- public Image getImage(Object element);\r
-\r
- /**\r
- * Returns the text for the label of the given element.\r
- *\r
- * @param element the element for which to provide the label text\r
- * @return the text string used to label the element, or <code>null</code>\r
- * if there is no text label for the given object\r
- */\r
- public String getText(Object element);\r
- \r
- /**\r
- * Get the image displayed in the tool tip for object.\r
- * \r
- * <p>\r
- * <b>If {@link #getToolTipText(Object)} and\r
- * {@link #getToolTipImage(Object)} both return <code>null</code> the\r
- * control is set back to standard behavior</b>\r
- * </p>\r
- * \r
- * @param object\r
- * the element for which the tool tip is shown\r
- * @return {@link Image} or <code>null</code> if there is not image.\r
- */\r
-\r
- public java.awt.Image getToolTipImage(Object object);\r
- \r
- /**\r
- * Get the text displayed in the tool tip for object.\r
- * \r
- * <p>\r
- * <b>If {@link #getToolTipText(Object)} and\r
- * {@link #getToolTipImage(Object)} both return <code>null</code> the\r
- * control is set back to standard behavior</b>\r
- * </p>\r
- * \r
- * @param element\r
- * the element for which the tool tip is shown\r
- * @return the {@link String} or <code>null</code> if there is not text to\r
- * display\r
- */\r
- public String getToolTipText(Object element);\r
- \r
- /**\r
- * Return the background color used for the tool tip\r
- * \r
- * @param object\r
- * the {@link Object} for which the tool tip is shown\r
- * \r
- * @return the {@link Color} used or <code>null</code> if you want to use\r
- * the default color {@link SWT#COLOR_INFO_BACKGROUND}\r
- * @see SWT#COLOR_INFO_BACKGROUND\r
- */\r
- public Color getToolTipBackgroundColor(Object object);\r
- \r
- /**\r
- * The foreground color used to display the the text in the tool tip\r
- * \r
- * @param object\r
- * the {@link Object} for which the tool tip is shown\r
- * @return the {@link Color} used or <code>null</code> if you want to use\r
- * the default color {@link SWT#COLOR_INFO_FOREGROUND}\r
- * @see SWT#COLOR_INFO_FOREGROUND\r
- */\r
- public Color getToolTipForegroundColor(Object object);\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.g2d.gallery;
+
+import org.eclipse.jface.viewers.IBaseLabelProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.simantics.g2d.image.Image;
+
+public interface ILabelProvider extends IBaseLabelProvider {
+ /**
+ * Returns the image for the label of the given element. The image
+ * is owned by the label provider and must not be disposed directly.
+ * Instead, dispose the label provider when no longer needed.
+ *
+ * @param element the element for which to provide the label image
+ * @return the image used to label the element, or <code>null</code>
+ * if there is no image for the given object
+ */
+ public Image getImage(Object element);
+
+ /**
+ * Returns the text for the label of the given element.
+ *
+ * @param element the element for which to provide the label text
+ * @return the text string used to label the element, or <code>null</code>
+ * if there is no text label for the given object
+ */
+ public String getText(Object element);
+
+ /**
+ * Get the image displayed in the tool tip for object.
+ *
+ * <p>
+ * <b>If {@link #getToolTipText(Object)} and
+ * {@link #getToolTipImage(Object)} both return <code>null</code> the
+ * control is set back to standard behavior</b>
+ * </p>
+ *
+ * @param object
+ * the element for which the tool tip is shown
+ * @return {@link Image} or <code>null</code> if there is not image.
+ */
+
+ public java.awt.Image getToolTipImage(Object object);
+
+ /**
+ * Get the text displayed in the tool tip for object.
+ *
+ * <p>
+ * <b>If {@link #getToolTipText(Object)} and
+ * {@link #getToolTipImage(Object)} both return <code>null</code> the
+ * control is set back to standard behavior</b>
+ * </p>
+ *
+ * @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 background color used for the tool tip
+ *
+ * @param object
+ * the {@link Object} for which the tool tip is shown
+ *
+ * @return the {@link Color} used or <code>null</code> if you want to use
+ * the default color {@link SWT#COLOR_INFO_BACKGROUND}
+ * @see SWT#COLOR_INFO_BACKGROUND
+ */
+ public Color getToolTipBackgroundColor(Object object);
+
+ /**
+ * The foreground color used to display the the text in the tool tip
+ *
+ * @param object
+ * the {@link Object} for which the tool tip is shown
+ * @return the {@link Color} used or <code>null</code> if you want to use
+ * the default color {@link SWT#COLOR_INFO_FOREGROUND}
+ * @see SWT#COLOR_INFO_FOREGROUND
+ */
+ public Color getToolTipForegroundColor(Object object);
+
+}