Package org.eclipse.jface.dialogs
Class DialogMessageArea
java.lang.Object
org.eclipse.jface.dialogs.DialogMessageArea
The DialogMessageArea is a resusable component for adding an accessible
message area to a dialog.
When the message is normal a CLabel is used but an errors replaces the
message area with a non editable text that can take focus for use by screen
readers.
- Since:
- 3.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear the error message.void
createContents
(Composite parent) Create the contents for the receiver.void
Enable the title and disable the message text and image.void
setMessageLayoutData
(Object layoutData) Set the layoutData for the messageArea.void
setTitleLayoutData
(Object layoutData) Set the layoutData for the title area.void
Show the title.void
updateText
(String newMessage, int newType) Show the new message in the message text and update the image.
-
Constructor Details
-
DialogMessageArea
public DialogMessageArea()Create a new instance of the receiver.
-
-
Method Details
-
createContents
Create the contents for the receiver.- Parameters:
parent
- the Composite that the children will be created in
-
setTitleLayoutData
Set the layoutData for the title area. In most cases this will be a copy of the layoutData used in setMessageLayoutData.- Parameters:
layoutData
- the layoutData for the title- See Also:
-
setMessageLayoutData
Set the layoutData for the messageArea. In most cases this will be a copy of the layoutData used in setTitleLayoutData.- Parameters:
layoutData
- the layoutData for the message area composite.- See Also:
-
showTitle
Show the title.- Parameters:
titleMessage
- String for the titketitleImage
- Image ornull
-
restoreTitle
public void restoreTitle()Enable the title and disable the message text and image. -
updateText
Show the new message in the message text and update the image. Base the background color on whether or not there are errors.- Parameters:
newMessage
- The new value for the messagenewType
- One of the IMessageProvider constants. If newType is IMessageProvider.NONE show the title.- See Also:
-
clearErrorMessage
public void clearErrorMessage()Clear the error message. Restore the previously displayed message if there is one, if not restore the title label.
-