X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.g2d%2Fsrc%2Forg%2Fsimantics%2Fg2d%2Fgallery%2FILabelProvider.java;h=7cdc8a53e69b58122ef57230e17fab08f41e214c;hp=7829a3b20cec1938018a476529e1e15120cf9a90;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.g2d/src/org/simantics/g2d/gallery/ILabelProvider.java b/bundles/org.simantics.g2d/src/org/simantics/g2d/gallery/ILabelProvider.java index 7829a3b20..7cdc8a53e 100644 --- a/bundles/org.simantics.g2d/src/org/simantics/g2d/gallery/ILabelProvider.java +++ b/bundles/org.simantics.g2d/src/org/simantics/g2d/gallery/ILabelProvider.java @@ -1,95 +1,95 @@ -/******************************************************************************* - * 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 null - * 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 null - * 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. - * - *

- * If {@link #getToolTipText(Object)} and - * {@link #getToolTipImage(Object)} both return null the - * control is set back to standard behavior - *

- * - * @param object - * the element for which the tool tip is shown - * @return {@link Image} or null if there is not image. - */ - - public java.awt.Image getToolTipImage(Object object); - - /** - * Get the text displayed in the tool tip for object. - * - *

- * If {@link #getToolTipText(Object)} and - * {@link #getToolTipImage(Object)} both return null the - * control is set back to standard behavior - *

- * - * @param element - * the element for which the tool tip is shown - * @return the {@link String} or null 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 null 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 null if you want to use - * the default color {@link SWT#COLOR_INFO_FOREGROUND} - * @see SWT#COLOR_INFO_FOREGROUND - */ - public Color getToolTipForegroundColor(Object object); - -} +/******************************************************************************* + * 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 null + * 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 null + * 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. + * + *

+ * If {@link #getToolTipText(Object)} and + * {@link #getToolTipImage(Object)} both return null the + * control is set back to standard behavior + *

+ * + * @param object + * the element for which the tool tip is shown + * @return {@link Image} or null if there is not image. + */ + + public java.awt.Image getToolTipImage(Object object); + + /** + * Get the text displayed in the tool tip for object. + * + *

+ * If {@link #getToolTipText(Object)} and + * {@link #getToolTipImage(Object)} both return null the + * control is set back to standard behavior + *

+ * + * @param element + * the element for which the tool tip is shown + * @return the {@link String} or null 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 null 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 null if you want to use + * the default color {@link SWT#COLOR_INFO_FOREGROUND} + * @see SWT#COLOR_INFO_FOREGROUND + */ + public Color getToolTipForegroundColor(Object object); + +}