Class DelegatingStyledCellLabelProvider

    • Method Detail

      • getForeground

        public Color getForeground​(Object element)
        Provides a foreground color for the given element.
        Parameters:
        element - the element
        Returns:
        the foreground color for the element, or null to use the default foreground color
      • getBackground

        public Color getBackground​(Object element)
        Provides a background color for the given element.
        Parameters:
        element - the element
        Returns:
        the background color for the element, or null to use the default background color
      • getFont

        public Font getFont​(Object element)
        Provides a font for the given element.
        Parameters:
        element - the element
        Returns:
        the font for the element, or null to use the default font
      • getImage

        public Image getImage​(Object element)
        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.
        Parameters:
        element - the element for which to provide the label image
        Returns:
        the image used to label the element, or null if there is no image for the given object
      • getStyledText

        protected StyledString getStyledText​(Object element)
        Returns the styled text for the label of the given element.
        Parameters:
        element - the element for which to provide the styled label text
        Returns:
        the styled text string used to label the element
      • addListener

        public void addListener​(ILabelProviderListener listener)
        Description copied from interface: IBaseLabelProvider
        Adds a listener to this label provider. Has no effect if an identical listener is already registered.

        Label provider listeners are informed about state changes that affect the rendering of the viewer that uses this label provider.

        Specified by:
        addListener in interface IBaseLabelProvider
        Overrides:
        addListener in class BaseLabelProvider
        Parameters:
        listener - a label provider listener
      • isLabelProperty

        public boolean isLabelProperty​(Object element,
                                       String property)
        Description copied from class: BaseLabelProvider
        The BaseLabelProvider implementation of this IBaseLabelProvider method returns true. Subclasses may override.
        Specified by:
        isLabelProperty in interface IBaseLabelProvider
        Overrides:
        isLabelProperty in class BaseLabelProvider
        Parameters:
        element - the element
        property - the property
        Returns:
        true if the label would be affected, and false if it would be unaffected
      • dispose

        public void dispose()
        Description copied from class: BaseLabelProvider
        The BaseLabelProvider implementation of this IBaseLabelProvider method clears its internal listener list. Subclasses may extend but should call the super implementation.
        Specified by:
        dispose in interface IBaseLabelProvider
        Overrides:
        dispose in class StyledCellLabelProvider