public interface AlertManager
Modifier and Type | Method and Description |
---|---|
Alert |
postAlert(java.lang.String title,
java.lang.Class<?> group,
java.lang.String text)
Send notification of a specific event.
|
UpdatableAlert |
postCustomAlert(java.lang.String title,
javax.swing.JComponent contents)
Create an alert containing the provided special contents.
|
UpdatableAlert |
postUpdatableAlert(java.lang.String title,
java.lang.String text)
Create a UpdatableAlert.
|
Alert postAlert(java.lang.String title, java.lang.Class<?> group, java.lang.String text)
If the user dismisses one of these alerts, they are effectively clearing the "message history" for the alert. Future calls to this method will create a new alert rather than resurrect the old one.
title
- Title text to show above the alert. May be null.group
- Object to use for grouping multiple alert texts together.
May be null; null-group alerts are always displayed.text
- Text of the alert.UpdatableAlert postUpdatableAlert(java.lang.String title, java.lang.String text)
title
- Title text to show above the main text. May be null.text
- Initial text to display to the user.UpdatableAlert postCustomAlert(java.lang.String title, javax.swing.JComponent contents)
This method returns a UpdatableAlert primarily so that the custom alert may update the text of the alert (via UpdatableAlert.setText()). While this does not directly affect the display of the alert in the Messages window (the caller is of course responsible for that), it does affect the text that is displayed in the main window.
title
- Title text to show above the custom contents. May be null.contents
- Contents to be inserted into the alert dialog.