Class ControlDecorationUpdater


  • public class ControlDecorationUpdater
    extends Object
    Controls the appearance of a ControlDecoration managed by a ControlDecorationSupport.
    Since:
    1.4
    • Constructor Detail

      • ControlDecorationUpdater

        public ControlDecorationUpdater()
    • Method Detail

      • update

        protected void update​(ControlDecoration decoration,
                              IStatus status)
        Updates the visibility, image, and description text of the given ControlDecoration to represent the given status.
        Parameters:
        decoration - the ControlDecoration to update
        status - the status to be displayed by the decoration
      • getDescriptionText

        protected String getDescriptionText​(IStatus status)
        Returns the description text to show in a ControlDecoration for the given status. The default implementation of this method returns status.getMessage().
        Parameters:
        status - the status object.
        Returns:
        the description text to show in a ControlDecoration for the given status.
      • getImage

        protected Image getImage​(IStatus status)
        Returns an image to display in a ControlDecoration which is appropriate for the given status. The default implementation of this method returns an image according to status.getSeverity():
        • IStatus.OK => No image
        • IStatus.INFO => FieldDecorationRegistry.DEC_INFORMATION
        • IStatus.WARNING => FieldDecorationRegistry.DEC_WARNING
        • IStatus.ERROR => FieldDecorationRegistry.DEC_ERROR
        • IStatus.CANCEL => FieldDecorationRegistry.DEC_ERROR
        • Other => No image
        Parameters:
        status - the status object.
        Returns:
        an image to display in a ControlDecoration which is appropriate for the given status.