|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.globalmentor.beans.BoundPropertyObject
com.guiseframework.model.AbstractModel
com.guiseframework.model.DefaultLabelModel
com.guiseframework.model.Notification
public class Notification
A notification to the user of some event or state, such as an error or invalid user input. A notification also allows certain options indicating response choices for the user when presented with the notification.
| Nested Class Summary | |
|---|---|
static class |
Notification.Option
The options which can be expected as responses for this notification. |
static class |
Notification.Severity
The severity of the notification. |
| Field Summary |
|---|
| Fields inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS |
| Fields inherited from interface com.guiseframework.model.LabelModel |
|---|
GLYPH_URI_PROPERTY, LABEL_CONTENT_TYPE_PROPERTY, LABEL_PROPERTY |
| Fields inherited from interface com.guiseframework.model.Model |
|---|
PLAIN_TEXT_CONTENT_TYPE, XHTML_CONTENT_TYPE, XHTML_FRAGMENT_CONTENT_TYPE |
| Constructor Summary | |
|---|---|
Notification(java.lang.String message,
com.globalmentor.net.ContentType messageContentType,
Notification.Option... options)
Message and message content type constructor with a Notification.Severity.INFO severity and no associated error. |
|
Notification(java.lang.String message,
com.globalmentor.net.ContentType messageContentType,
Notification.Severity severity,
Notification.Option... options)
Message, message content type, and severity constructor with no associated error. |
|
Notification(java.lang.String message,
com.globalmentor.net.ContentType messageContentType,
Notification.Severity severity,
java.lang.Throwable error,
Notification.Option... options)
Message, message content type, severity, error, and options constructor. |
|
Notification(java.lang.String message,
Notification.Option... options)
Message constructor with a Notification.Severity.INFO severity, no error, and a text/plain content type. |
|
Notification(java.lang.String message,
Notification.Severity severity,
Notification.Option... options)
Message and severity constructor with no error and a text/plain content type. |
|
Notification(java.lang.String message,
Notification.Severity severity,
java.lang.Throwable error,
Notification.Option... options)
Message, severity, and error constructor with a text/plain content type. |
|
Notification(java.lang.Throwable error,
Notification.Option... options)
Error constructor with a Notification.Severity.ERROR severity and a text/plain content type. |
|
Notification(java.lang.Throwable error,
java.lang.String message,
Notification.Option... options)
Error and message constructor with a Notification.Severity.ERROR severity and a text/plain content type. |
|
| Method Summary | |
|---|---|
java.lang.Throwable |
getError()
|
java.lang.String |
getMessage()
|
com.globalmentor.net.ContentType |
getMessageContentType()
|
java.util.List<Notification.Option> |
getOptions()
|
Notification.Severity |
getSeverity()
|
java.lang.String |
toString()
|
| Methods inherited from class com.guiseframework.model.DefaultLabelModel |
|---|
getGlyphURI, getLabel, getLabelContentType, setGlyphURI, setLabel, setLabelContentType |
| Methods inherited from class com.guiseframework.model.AbstractModel |
|---|
getEventListenerManager, getPlainText |
| Methods inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.globalmentor.beans.PropertyBindable |
|---|
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface com.globalmentor.beans.PropertyConstrainable |
|---|
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, hasVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener |
| Constructor Detail |
|---|
public Notification(java.lang.Throwable error,
Notification.Option... options)
Notification.Severity.ERROR severity and a text/plain content type.
If the error provides a message, it is used as the notification message; otherwise, the error's string value is used as the message.
error - The associated error or exception.options - The available response options; if no options are given, Notification.Option.OK will be assumed.
java.lang.NullPointerException - if the given error and/or options is null.
public Notification(java.lang.Throwable error,
java.lang.String message,
Notification.Option... options)
Notification.Severity.ERROR severity and a text/plain content type.
error - The associated error or exception.message - The message text, which may include a resource reference.options - The available response options; if no options are given, Notification.Option.OK will be assumed.
java.lang.NullPointerException - if the given error, message, and/or options is null.
public Notification(java.lang.String message,
Notification.Option... options)
Notification.Severity.INFO severity, no error, and a text/plain content type.
message - The message text, which may include a resource reference.options - The available response options; if no options are given, Notification.Option.OK will be assumed.
java.lang.NullPointerException - if the given message and/or options is null.
public Notification(java.lang.String message,
Notification.Severity severity,
Notification.Option... options)
text/plain content type.
message - The message text, which may include a resource reference.severity - The severity of the notification.options - The available response options; if no options are given, Notification.Option.OK will be assumed.
java.lang.NullPointerException - if the given message, severity, and/or options is null.
public Notification(java.lang.String message,
Notification.Severity severity,
java.lang.Throwable error,
Notification.Option... options)
text/plain content type.
message - The message text, which may include a resource reference.severity - The severity of the notification.error - The associated error or exception, or null if there is no related error.options - The available response options; if no options are given, Notification.Option.OK will be assumed.
java.lang.NullPointerException - if the given message, severity, and/or options is null.
public Notification(java.lang.String message,
com.globalmentor.net.ContentType messageContentType,
Notification.Option... options)
Notification.Severity.INFO severity and no associated error.
message - The message text, which may include a resource referencemessageContentType - The message text content type.options - The available response options; if no options are given, Notification.Option.OK will be assumed.
java.lang.NullPointerException - if the given message, severity, and/or options is null.
java.lang.IllegalArgumentException - if the given content type is not a text content type.
public Notification(java.lang.String message,
com.globalmentor.net.ContentType messageContentType,
Notification.Severity severity,
Notification.Option... options)
message - The message text, which may include a resource reference.messageContentType - The message text content type.severity - The severity of the notification.options - The available response options; if no options are given, Notification.Option.OK will be assumed.
java.lang.NullPointerException - if the given message, severity, and/or options is null.
java.lang.IllegalArgumentException - if the given content type is not a text content type.
public Notification(java.lang.String message,
com.globalmentor.net.ContentType messageContentType,
Notification.Severity severity,
java.lang.Throwable error,
Notification.Option... options)
message - The message text, which may include a resource reference.messageContentType - The message text content type.severity - The severity of the notification.error - The associated error or exception, or null if there is no related error.options - The available response options; if no options are given, Notification.Option.OK will be assumed.
java.lang.IllegalArgumentException - if the given content type is not a text content type.| Method Detail |
|---|
public java.lang.Throwable getError()
public Notification.Severity getSeverity()
public java.util.List<Notification.Option> getOptions()
public java.lang.String getMessage()
public com.globalmentor.net.ContentType getMessageContentType()
public java.lang.String toString()
toString in class DefaultLabelModel
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||