Class LabelImageProvider

java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.jface.viewers.BaseLabelProvider
org.eclipse.jface.viewers.LabelProvider
org.eclipse.nebula.widgets.geomap.jface.LabelImageProvider
All Implemented Interfaces:
org.eclipse.jface.viewers.IBaseLabelProvider, org.eclipse.jface.viewers.ILabelProvider, IPinPointProvider, IToolTipProvider

public class LabelImageProvider
extends org.eclipse.jface.viewers.LabelProvider
implements IPinPointProvider, IToolTipProvider
A default implementation of a LabelProvider that uses a GoogleIconDescriptor to create a bubble image with the text returned by getText.
  • Constructor Summary

    Constructors 
    Constructor Description
    LabelImageProvider()  
  • Method Summary

    Modifier and Type Method Description
    protected org.eclipse.jface.resource.ImageRegistry createImageRegistry()
    Creates the ImageRegistry
    void dispose()  
    org.eclipse.swt.graphics.RGB getFillColor()
    Gets the setting for the fillColor argument provided to GoogleIconDescriptor
    java.lang.String getFrameStyle()
    Gets the setting for the frameStyle argument provided to GoogleIconDescriptor
    java.lang.String getIconStyle()
    Gets the setting for the iconStyle argument provided to GoogleIconDescriptor
    org.eclipse.swt.graphics.Image getImage​(java.lang.Object element)  
    protected org.eclipse.jface.resource.ImageRegistry getImageRegistry()
    Gets the ImageRegistry use by this LabelImageProvider
    protected org.eclipse.swt.graphics.Image getLabelImage​(java.lang.Object element)
    Gets the label image for the provided element
    org.eclipse.swt.graphics.Point getPinPoint​(java.lang.Object element)
    Provides the relative position of the hot spot for the an image of an element, e.g. a pin on a map.
    protected org.eclipse.swt.graphics.Point getPinPoint​(java.lang.Object element, float alignX, float alignY)
    Helper method for computing the point based on the size of the image.
    org.eclipse.swt.graphics.RGB getTextColor()
    Gets the setting for the textColor argument provided to GoogleIconDescriptor
    java.lang.Object getToolTip​(java.lang.Object element)
    Gets the tool tip for the given element
    boolean hasShadow()
    Gets the setting for the shadow argument provided to GoogleIconDescriptor
    void setFillColor​(org.eclipse.swt.graphics.RGB fillColor)
    Sets the fillColor argument provided to GoogleIconDescriptor
    void setFrameStyle​(java.lang.String frameStyle)
    Sets the frameStyle argument provided to GoogleIconDescriptor
    void setHasShadow​(boolean hasShadow)
    Sets the shadow argument provided to GoogleIconDescriptor
    void setIconStyle​(java.lang.String iconStyle)
    Sets the iconStyle argument provided to GoogleIconDescriptor
    void setTextColor​(org.eclipse.swt.graphics.RGB textColor)
    Sets the textColor argument provided to GoogleIconDescriptor

    Methods inherited from class org.eclipse.jface.viewers.LabelProvider

    createImageProvider, createTextImageProvider, createTextProvider, getText

    Methods inherited from class org.eclipse.jface.viewers.BaseLabelProvider

    addListener, fireLabelProviderChanged, isLabelProperty, removeListener

    Methods inherited from class org.eclipse.core.commands.common.EventManager

    addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.eclipse.jface.viewers.IBaseLabelProvider

    addListener, isLabelProperty, removeListener
  • Constructor Details

  • Method Details

    • getImageRegistry

      protected org.eclipse.jface.resource.ImageRegistry getImageRegistry()
      Gets the ImageRegistry use by this LabelImageProvider
      Returns:
      the
    • createImageRegistry

      protected org.eclipse.jface.resource.ImageRegistry createImageRegistry()
      Creates the ImageRegistry
      Returns:
      the newly created ImageRegistry
    • dispose

      public void dispose()
      Specified by:
      dispose in interface org.eclipse.jface.viewers.IBaseLabelProvider
      Overrides:
      dispose in class org.eclipse.jface.viewers.BaseLabelProvider
    • hasShadow

      public boolean hasShadow()
      Gets the setting for the shadow argument provided to GoogleIconDescriptor
      Returns:
      the current shaddow value
    • setHasShadow

      public void setHasShadow​(boolean hasShadow)
      Sets the shadow argument provided to GoogleIconDescriptor
      Parameters:
      hasShadow - the new shadow value
    • getTextColor

      public org.eclipse.swt.graphics.RGB getTextColor()
      Gets the setting for the textColor argument provided to GoogleIconDescriptor
      Returns:
      the current textColor
    • setTextColor

      public void setTextColor​(org.eclipse.swt.graphics.RGB textColor)
      Sets the textColor argument provided to GoogleIconDescriptor
      Parameters:
      textColor - the new textColor value
    • getFillColor

      public org.eclipse.swt.graphics.RGB getFillColor()
      Gets the setting for the fillColor argument provided to GoogleIconDescriptor
      Returns:
      the current fillColor
    • setFillColor

      public void setFillColor​(org.eclipse.swt.graphics.RGB fillColor)
      Sets the fillColor argument provided to GoogleIconDescriptor
      Parameters:
      fillColor - the new fillColor value
    • getIconStyle

      public java.lang.String getIconStyle()
      Gets the setting for the iconStyle argument provided to GoogleIconDescriptor
      Returns:
      the current iconStyle
    • setIconStyle

      public void setIconStyle​(java.lang.String iconStyle)
      Sets the iconStyle argument provided to GoogleIconDescriptor
      Parameters:
      iconStyle - the new iconStyle value
    • getFrameStyle

      public java.lang.String getFrameStyle()
      Gets the setting for the frameStyle argument provided to GoogleIconDescriptor
      Returns:
      the current frameStyle
    • setFrameStyle

      public void setFrameStyle​(java.lang.String frameStyle)
      Sets the frameStyle argument provided to GoogleIconDescriptor
      Parameters:
      frameStyle - the new frameStyle value
    • getLabelImage

      protected org.eclipse.swt.graphics.Image getLabelImage​(java.lang.Object element)
      Gets the label image for the provided element
      Parameters:
      element - the element
      Returns:
      the label image
    • getImage

      public org.eclipse.swt.graphics.Image getImage​(java.lang.Object element)
      Specified by:
      getImage in interface org.eclipse.jface.viewers.ILabelProvider
      Overrides:
      getImage in class org.eclipse.jface.viewers.LabelProvider
    • getPinPoint

      public org.eclipse.swt.graphics.Point getPinPoint​(java.lang.Object element)
      Description copied from interface: IPinPointProvider
      Provides the relative position of the hot spot for the an image of an element, e.g. a pin on a map.
      Specified by:
      getPinPoint in interface IPinPointProvider
      Parameters:
      element - the element for which to find the hot spot
      Returns:
      the relative position, or null for 0, 0
    • getPinPoint

      protected org.eclipse.swt.graphics.Point getPinPoint​(java.lang.Object element, float alignX, float alignY)
      Helper method for computing the point based on the size of the image. The float arguments alignX and alignY are multiplied with the width and height of the image, respectively.
      Parameters:
      element - the element to provide the point for
      alignX - a float that is multiplied with the width of the image, to give the x coordinate of the point
      alignY - a float that is multiplied with the height of the image, to give the y coordinate of the point
      Returns:
      the computed point
    • getToolTip

      public java.lang.Object getToolTip​(java.lang.Object element)
      Description copied from interface: IToolTipProvider
      Gets the tool tip for the given element
      Specified by:
      getToolTip in interface IToolTipProvider
      Returns:
      the tool tip for the given element