Package org.eclipse.jface.fieldassist
Class FieldDecoration
java.lang.Object
org.eclipse.jface.fieldassist.FieldDecoration
FieldDecoration is a simple data structure class for specifying a decoration
for a field. A decoration may be rendered in different ways depending on the
type of field it is used with.
- Since:
- 3.2
- See Also:
-
Constructor Summary
ConstructorDescriptionFieldDecoration
(Image image, String description) Create a decoration for a field with the specified image and description text. -
Method Summary
Modifier and TypeMethodDescriptionReturn the description for the decoration shown when the user hovers over the decoration.getImage()
Return the image shown in the decoration, ornull
if no image is specified.void
setDescription
(String description) Set the description for the decoration shown when the user hovers over the decoration.void
Set the image shown in the decoration, ornull
if no image is specified.
-
Constructor Details
-
FieldDecoration
Create a decoration for a field with the specified image and description text.- Parameters:
image
- the image shown in the decoration. Anull
image will result in a blank decoration, which may be used to reserve space near the field.description
- the description shown when the user hovers over the decoration. Anull
description indicates that there will be no hover for the decoration.
-
-
Method Details
-
getImage
Return the image shown in the decoration, ornull
if no image is specified.- Returns:
- the image shown in the decoration. A return value of
null
signifies a blank decoration.
-
setImage
Set the image shown in the decoration, ornull
if no image is specified. It is up to the caller to update any decorated fields that are showing the description in order to display the new image.- Parameters:
image
- the image shown in the decoration. A value ofnull
signifies a blank decoration.
-
getDescription
Return the description for the decoration shown when the user hovers over the decoration.- Returns:
- the String description of the decoration. A return value of
null
indicates that no description will be shown.
-
setDescription
Set the description for the decoration shown when the user hovers over the decoration. It is up to the caller to update any decorated fields showing the description.- Parameters:
description
- the String description of the decoration. A value ofnull
indicates that no description will be shown.
-