Class ControlDecorationUpdater
- java.lang.Object
-
- org.eclipse.jface.databinding.fieldassist.ControlDecorationUpdater
-
public class ControlDecorationUpdater extends Object
Controls the appearance of a ControlDecoration managed by a ControlDecorationSupport.- Since:
- 1.4
-
-
Constructor Summary
Constructors Constructor Description ControlDecorationUpdater()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getDescriptionText(IStatus status)
Returns the description text to show in a ControlDecoration for the given status.protected Image
getImage(IStatus status)
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.
-
-
-
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 updatestatus
- 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 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.
-
-