Class ControlDecorationUpdater
java.lang.Object
org.eclipse.jface.databinding.fieldassist.ControlDecorationUpdater
Controls the appearance of a ControlDecoration managed by a
ControlDecorationSupport.
- Since:
- 1.4
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
getDescriptionText
(IStatus status) Returns the description text to show in a ControlDecoration for the given status.protected Image
Returns an image to display in a ControlDecoration which is appropriate for the given status.protected void
update
(ControlDecoration decoration, IStatus status) Updates the visibility, image, and description text of the given ControlDecoration to represent the given status.
-
Constructor Details
-
ControlDecorationUpdater
public ControlDecorationUpdater()
-
-
Method Details
-
update
Updates the visibility, image, and description text of the given ControlDecoration to represent the given status.- Parameters:
decoration
- the ControlDecoration to updatestatus
- the status to be displayed by the decoration
-
getDescriptionText
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
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 tostatus.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.
-