Class PrototypeDecorator

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addListener​(ILabelProviderListener listener)
      Adds a listener to this label provider.
      void decorate​(java.lang.Object element, IDecoration decoration)
      Calculates decorations based on element.
      void dispose()
      Disposes of this label provider.
      boolean isLabelProperty​(java.lang.Object element, java.lang.String property)
      Returns whether the label would be affected by a change to the given property of the given element.
      void removeListener​(ILabelProviderListener listener)
      Removes a listener to this label provider.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PrototypeDecorator

        public PrototypeDecorator()
    • Method Detail

      • 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
        Parameters:
        listener - a label provider listener
      • dispose

        public void dispose()
        Description copied from interface: IBaseLabelProvider
        Disposes of this label provider. When a label provider is attached to a viewer, the viewer will automatically call this method when the viewer is being closed. When label providers are used outside of the context of a viewer, it is the client's responsibility to ensure that this method is called when the provider is no longer needed.
        Specified by:
        dispose in interface IBaseLabelProvider
      • isLabelProperty

        public boolean isLabelProperty​(java.lang.Object element,
                                       java.lang.String property)
        Description copied from interface: IBaseLabelProvider
        Returns whether the label would be affected by a change to the given property of the given element. This can be used to optimize a non-structural viewer update. If the property mentioned in the update does not affect the label, then the viewer need not update the label.
        Specified by:
        isLabelProperty in interface IBaseLabelProvider
        Parameters:
        element - the element
        property - the property
        Returns:
        true if the label would be affected, and false if it would be unaffected