public class Notify
extends java.lang.Object
modal notification dialogs that can lower end
 user productivity.  Messages may be shown at a particular location, specified either with viewport-relative coordinates,
 or as an edge or center location relative to the viewport or a canvas.  Messages can be configured to appear and
 disappear instantly, by sliding into (or out of) view, or by fading in (or out).  One or more actions can be provided when addMessage() is called to display a message.  They will be
 rendered as links on which to click to execute the action. 
 The behavior and appearance of messages are configured
 per NotifyType, which is simply a string that identifies that message group, similar to
 log category. By calling configureMessages() with
 the NotifyType, it can be assigned a NotifySettings
 configuration to control message animation, placement, and the the Label used to
 render each message, allowing styling and autofit behavior to be configured. 
 Messages of the same
 NotifyType may be stacked to provide a visible history, with a configurable stacking direction and maximum
 stacking depth.  Details on how to configure messages are provided in the documentation for NotifySettings. 
 Messages for different NotifyTypes are stacked
 separately and animated by independent Framework pipelines.  It's up to you to configure the placement of supported
 NotifyTypes in your app so that they don't overlap, as the Framework doesn't manage it.  For example,
 separate NotifyTypes could be assigned separate screen edges, or assigned a different NotifySettings.positionCanvas. 
 To dismiss a
 message manually before its scheduled duration expires, you may call dismissMessage() with a NotifyType (to dismiss
 all such messages) or an ID previously returned by addMessage() (to dismiss that single message). 
Warnings and Errors
 Each notification may be assigned a
 messagePriority in the settings passed to
 addMessage().  By default, all NotifyTypes are
 configured to have priority MESSAGE, except for "error" and
 "warn" NotifyTypes, which are configured with priority ERROR and WARN,
 respectively. 
 The messagePriority
 determines the default styling of a message, and which message to remove if a new message is sent while the message
 stack is already at its limit.  We recommended applying a messagePriority as the best approach for showing
 pre-styled warnings and errors, since that allows you to interleave them with ordinary messages in a single
 NotifyType. 
 Alternatively, you can display pre-styled warnings and errors by calling addMessage() with the separate NotifyTypes "warning"
 and "error", respectively, but then you must take care to assign each NotifyType used to a separate screen location
 to avoid one rendering on top of the other. 
Viewport Considerations
 Messages are edge or corner-aligned
 based on the viewport width and viewport height of the current page rather than screen, so you may need
 to scroll to see the targeted corner or edge.  Note that widgets placed offscreen below or to the right of a page may
 cause the browser to report a larger viewport, and prevent messages from being visible, even if no scrollbars are
 present.  If you need to stage widgets offscreen for measurement or other reasons, place them above or to the left. 
Modal Windows and Click Masks
 Messages are always shown above all other widgets, including modal windows and click masks.  This is because it's expected that messages are "out of band" and logically indepedent of the widget
 hierarchy being shown. We apply this layering policy even for windows and widgets created by NotifyActions. If there may a scenario where a message can block a window created by
 an action, set NotifySettings.canDismiss to true
 so that an unobstructed view of the underlying widgets can be restored. 
In the linked sample, note how we take care to reuse the existing modal window, if any, if the "Launch..." link is clicked, so that repeated clicks never stack windows over each other.
com.smartgwt.client.util.isc#say, 
com.smartgwt.client.util.isc#confirm| Modifier and Type | Field and Description | 
|---|---|
| static int | ERRORHighest priority. | 
| static int | MESSAGEThird-highest priority. | 
| static int | WARNSecond-highest priority. | 
| Constructor and Description | 
|---|
| Notify() | 
| Modifier and Type | Method and Description | 
|---|---|
| static MessageID | addMessage(java.lang.String contents)Displays a new message, subject to the  stored
 configurationfor the passednotifyType, overridden by any passedsettings. | 
| static MessageID | addMessage(java.lang.String contents,
          NotifyAction... actions) | 
| static MessageID | addMessage(java.lang.String contents,
          NotifyAction[] actions,
          java.lang.String notifyType) | 
| static MessageID | addMessage(java.lang.String contents,
          NotifyAction[] actions,
          java.lang.String notifyType,
          NotifySettings settings)Displays a new message, subject to the  stored
 configurationfor the passednotifyType, overridden by any passedsettings. | 
| static boolean | canDismissMessage(MessageID messageID)Can the message corresponding to the  messageIDbe dismissed?  Returns false if the message is no longer
 being shown. | 
| static void | configureDefaultSettings(NotifySettings settings)Changes the default settings that are applied when you create a new  NotifyTypewithconfigureMessages(). | 
| static void | configureMessages(java.lang.String notifyType,
                 NotifySettings settings)Sets the default  NotifySettingsfor the specifiedNotifyType. | 
| static void | dismissMessage(MessageID messageID)Dismisses one or more messages currently being shown, subject to the existing settings for their  NotifyType. | 
| static void | dismissMessage(java.lang.String messageID)Dismisses one or more messages currently being shown, subject to the existing settings for their  NotifyType. | 
| static boolean | messageHasActions(MessageID messageID) | 
| static void | setMessageActions(MessageID messageID,
                 NotifyAction... actions)Updates the actions of the message from those, if any, passed originally to  addMessage(), while preserving any existingcontents. | 
| static void | setMessageContents(MessageID messageID,
                  java.lang.String contents)Updates the contents of the message from what was passed originally to  addMessage(), while preserving any existingactions. | 
public static final int ERROR
NotifyType: "error".public static final int WARN
NotifyType: "warn".public static final int MESSAGE
NotifyTypes other than "error" and "warn".public static MessageID addMessage(java.lang.String contents)
stored
 configuration for the passed notifyType, overridden by any passed settings. Returns an opaque
 MessageID that can be passed to dismissMessage() to clear it.  Note that an empty string may be passed for contents if
 actions have been provided, so you may have the message consist only of your specified actions. 
 Most
 users should do all configuration up front via a call to configureMessages(). The settings argument in
 this method is provided to allow adjustment of properties that affect only one message, such as autoFitWidth, styleName, or  labelProperties.  Making changes to  stacking-related properties via this argument isn't supported, unless
 specifically documented on the property.
contents - message to be displayed.
 See HTMLStringcom.smartgwt.client.util.isc#say, 
com.smartgwt.client.util.isc#confirm, 
com.smartgwt.client.util.isc#notify, 
HTMLStringpublic static MessageID addMessage(java.lang.String contents, NotifyAction... actions)
addMessage(java.lang.String)public static MessageID addMessage(java.lang.String contents, NotifyAction[] actions, java.lang.String notifyType)
addMessage(java.lang.String)public static MessageID addMessage(java.lang.String contents, NotifyAction[] actions, java.lang.String notifyType, NotifySettings settings)
stored
 configuration for the passed notifyType, overridden by any passed settings. Returns an opaque
 MessageID that can be passed to dismissMessage() to clear it.  Note that an empty string may be passed for contents if
 actions have been provided, so you may have the message consist only of your specified actions. 
 Most
 users should do all configuration up front via a call to configureMessages(). The settings argument in
 this method is provided to allow adjustment of properties that affect only one message, such as autoFitWidth, styleName, or  labelProperties.  Making changes to  stacking-related properties via this argument isn't supported, unless
 specifically documented on the property.
contents - message to be displayed.
 See HTMLStringactions - actions (if any) for this messagenotifyType - category of message; default "message".
 See NotifyTypesettings - display and behavior settings for                                               this message that override the          
 configured                                          
     settings for the notifyTypecom.smartgwt.client.util.isc#say, 
com.smartgwt.client.util.isc#confirm, 
com.smartgwt.client.util.isc#notifypublic static boolean canDismissMessage(MessageID messageID)
messageID be dismissed?  Returns false if the message is no longer
 being shown.  The messageID must have been previously returned by addMessage().messageID - message identifier to dismissdismissMessage(com.smartgwt.client.widgets.notify.MessageID)public static void configureDefaultSettings(NotifySettings settings)
NotifyType with
 configureMessages().  If you want to change the
 defaults for the built-in NotifyTypes "message", "warn", and "error", with this method, it must be called before the
 first call to configureMessages() or addMessage().  Once a NotifyType has been created, you must use
 configureMessages() to change its settings. Note that for defaults that depend on priority (and thus differ between the built-in NotifyTypes), this method only sets the defaults for the "message" NotifyType.
settings - changes to NotifyType defaultsconfigureMessages(java.lang.String, com.smartgwt.client.widgets.notify.NotifySettings)public static void configureMessages(java.lang.String notifyType,
                                     NotifySettings settings)
NotifySettings for the specified NotifyType.  This may be overridden by passing settings to addMessage() when the message is shown, but changing stacking-related properties via addMessage() isn't supported,  By default, the NotifyTypes "message", "warn", and "error" are predefined, each with their own NotifySettings with different styleNames.  When configuring a new (non-predefined)
 NotifyType with this method, any NotifySettings left unset will default to
 those for NotifyType "message".
notifyType - category of message; null defaults to "message".
 See NotifyTypesettings - settings to store for the notifyTypeconfigureDefaultSettings(com.smartgwt.client.widgets.notify.NotifySettings)public static void dismissMessage(MessageID messageID)
NotifyType.  You may either pass the opaque message identifier returned from the call to
 addMessage() to dismiss a single message, or a
 NotifyType to dismiss all such messages.messageID - message identifier or category to dismissNotifySettings.getDuration(), 
NotifyAction.getWholeMessage()public static void dismissMessage(java.lang.String messageID)
NotifyType.  You may either pass the opaque message identifier returned from the call to
 addMessage() to dismiss a single message, or a
 NotifyType to dismiss all such messages.messageID - message identifier or category to dismissNotifySettings.getDuration(), 
NotifyAction.getWholeMessage(), 
NotifyTypepublic static boolean messageHasActions(MessageID messageID)
messageID - message identifier to checkaddMessage(java.lang.String), 
setMessageActions(com.smartgwt.client.widgets.notify.MessageID, com.smartgwt.client.widgets.notify.NotifyAction...)public static void setMessageActions(MessageID messageID, NotifyAction... actions)
addMessage(), while preserving any existing contents.  See setMessageContents() for further guidance and animation
 details.
messageID - message identifier from addMessage()actions - updated actions for this messagepublic static void setMessageContents(MessageID messageID, java.lang.String contents)
addMessage(), while preserving any existing actions. The purpose of this method is to support messages that contain timer countdowns or other data that perhaps need refreshing during display. If you find yourself replacing the entire content with something new, you should probably just add it as a new message.
 Note that this method has
 minimal animation support.  The change in message content and corresponding resizing are instant, but the repositioning
 of the message or stack (if stacked) to keep your requested alignment is controlled by NotifySettings.repositionMethod, allowing slide
 animation.  However, that setting is ignored and the repositioning is instant if you've chosen viewport alignment to a border or corner along the
 bottom or right viewport edge, or if an animation
 is already in progress, in which case the instant repositioning will happen after it completes.
messageID - message identifier from addMessage()contents - updated message.
 See HTMLString