Class NotifySettings
- All Implemented Interfaces:
HasHandlers
Notify.addMessage()
are drawn and behave.-
Field Summary
Fields inherited from class com.smartgwt.client.core.DataClass
factoryCreated, factoryProperties
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionHTML to be added before each action to separate it from the previous action.The CSS class to apply to action text in this message.Controls how messages appear at or reach their requested location.boolean
Whether to default properties affecting the message appearance to those of the built-inNotifyType
corresponding to themessagePriority
.Maximum auto-fit width for a message ifautoFitWidth
is enabled.Maximum auto-fit width for a message ifautoFitWidth
is enabled.If true, the specified width of theLabel
drawn for this message will be treated as a minimum width.Displays an icon to allow a message to be dismissed through the UI.Controls how messages disappear from or leave their requested location.int
Length of time a message is shown before being auto-dismissed, in milliseconds.int
Time over which the fade-in effect runs forNotifyTransition
: "fade", in milliseconds.int
Time over which the fade-out effect runs forNotifyTransition
: "fade", in milliseconds.Specifies a left offset from the position specified byposition
orpositionCanvas
where the message should be shown.Specifies how to pick which message to dismiss when themaxStackSize
is reached, and the lowest priority value (highest numericalmessagePriority
) is shared by more than one message.int
Sets a limit on how many messages may be stacked ifMultiMessageMode
is "stack".Optional specified padding to apply after the message content when showing adismiss button
so that the button doesn't occlude any content.Optional icon to be shown in theLabel
drawn for this message.int
Height in pixels of the icon image.If an icon is present, should it appear to the left or right of the title? valid options are"left"
and"right"
.int
Pixels between icon and title text.int
Width in pixels of the icon image.int
Sets the priority of the message.Determines what happens if a message appears while there's still another one of the sameNotifyType
being shown.static NotifySettings
getOrCreateRef
(JavaScriptObject jsObj) Where to show the message, specified as an edge ("T", "B", "R", "L"), a corner ("TL", "TR", "BL", "BR), or "C" for center, similar toCanvas.snapTo
.Canvas over which to position the message, available as an alternative means of placement if viewport-relativecoordinates
aren't provided.Controls how the stack or message is repositioned, if required, afterNotify.setMessageContents()
has been called.Determines where messages originate when they appear forappearMethod
: "slide".Determines where messages go when they disappear fordisappearMethod
: "slide".int
Animation speed forNotifyTransition
: "slide", in pixels/second.Determines how messages are stacked ifMultiMessageMode
is "stack".Controls how older messages'duration
countdowns are affected when a new message of the sameNotifyType
appears.int
Space between each message whenMultiMessageMode
is "stack".boolean
If true, pauses the auto-dismiss countdown timer when the mouse is over the messasge.The CSS class to apply to theLabel
drawn for this message.Specifies a top offset from the position specified byposition
orpositionCanvas
where the message should be shown.getX()
Where to show the message, as a viewport-relative x coordinate offset to the left edge of theLabel
rendering the message.getY()
Where to show the message, as a viewport-relative y coordinate offset to the top edge of theLabel
rendering the message.setActionSeparator
(String actionSeparator) HTML to be added before each action to separate it from the previous action.setActionStyleName
(String actionStyleName) The CSS class to apply to action text in this message.setAppearMethod
(NotifyTransition appearMethod) Controls how messages appear at or reach their requested location.setApplyPriorityToAppearance
(boolean applyPriorityToAppearance) Whether to default properties affecting the message appearance to those of the built-inNotifyType
corresponding to themessagePriority
.setAutoFitMaxWidth
(Integer autoFitMaxWidth) Maximum auto-fit width for a message ifautoFitWidth
is enabled.setAutoFitMaxWidth
(String autoFitMaxWidth) Maximum auto-fit width for a message ifautoFitWidth
is enabled.setAutoFitWidth
(Boolean autoFitWidth) If true, the specified width of theLabel
drawn for this message will be treated as a minimum width.setCanDismiss
(Boolean canDismiss) Displays an icon to allow a message to be dismissed through the UI.setDisappearMethod
(NotifyTransition disappearMethod) Controls how messages disappear from or leave their requested location.setDuration
(int duration) Length of time a message is shown before being auto-dismissed, in milliseconds.setFadeInDuration
(int fadeInDuration) Time over which the fade-in effect runs forNotifyTransition
: "fade", in milliseconds.setFadeOutDuration
(int fadeOutDuration) Time over which the fade-out effect runs forNotifyTransition
: "fade", in milliseconds.setLabelProperties
(Label labelProperties) setLeftOffset
(Integer leftOffset) Specifies a left offset from the position specified byposition
orpositionCanvas
where the message should be shown.setMaxStackDismissMode
(MaxStackDismissMode maxStackDismissMode) Specifies how to pick which message to dismiss when themaxStackSize
is reached, and the lowest priority value (highest numericalmessagePriority
) is shared by more than one message.setMaxStackSize
(int maxStackSize) Sets a limit on how many messages may be stacked ifMultiMessageMode
is "stack".setMessageControlPadding
(Integer messageControlPadding) Optional specified padding to apply after the message content when showing adismiss button
so that the button doesn't occlude any content.setMessageIcon
(String messageIcon) Optional icon to be shown in theLabel
drawn for this message.setMessageIconHeight
(int messageIconHeight) Height in pixels of the icon image.setMessageIconOrientation
(String messageIconOrientation) If an icon is present, should it appear to the left or right of the title? valid options are"left"
and"right"
.setMessageIconSpacing
(int messageIconSpacing) Pixels between icon and title text.setMessageIconWidth
(int messageIconWidth) Width in pixels of the icon image.setMessagePriority
(int messagePriority) Sets the priority of the message.setMultiMessageMode
(MultiMessageMode multiMessageMode) Determines what happens if a message appears while there's still another one of the sameNotifyType
being shown.setPosition
(EdgeName position) Where to show the message, specified as an edge ("T", "B", "R", "L"), a corner ("TL", "TR", "BL", "BR), or "C" for center, similar toCanvas.snapTo
.setPositionCanvas
(Canvas positionCanvas) Canvas over which to position the message, available as an alternative means of placement if viewport-relativecoordinates
aren't provided.setRepositionMethod
(NotifyTransition repositionMethod) Controls how the stack or message is repositioned, if required, afterNotify.setMessageContents()
has been called.setSlideInOrigin
(String slideInOrigin) Determines where messages originate when they appear forappearMethod
: "slide".setSlideOutOrigin
(String slideOutOrigin) Determines where messages go when they disappear fordisappearMethod
: "slide".setSlideSpeed
(int slideSpeed) Animation speed forNotifyTransition
: "slide", in pixels/second.setStackDirection
(StackDirection stackDirection) Determines how messages are stacked ifMultiMessageMode
is "stack".setStackPersistence
(StackPersistence stackPersistence) Controls how older messages'duration
countdowns are affected when a new message of the sameNotifyType
appears.setStackSpacing
(int stackSpacing) Space between each message whenMultiMessageMode
is "stack".setStayIfHovered
(boolean stayIfHovered) If true, pauses the auto-dismiss countdown timer when the mouse is over the messasge.setStyleName
(String styleName) The CSS class to apply to theLabel
drawn for this message.setTopOffset
(Integer topOffset) Specifies a top offset from the position specified byposition
orpositionCanvas
where the message should be shown.Where to show the message, as a viewport-relative x coordinate offset to the left edge of theLabel
rendering the message.Where to show the message, as a viewport-relative y coordinate offset to the top edge of theLabel
rendering the message.Methods inherited from class com.smartgwt.client.core.DataClass
applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated
-
Constructor Details
-
NotifySettings
public NotifySettings() -
NotifySettings
-
-
Method Details
-
getOrCreateRef
-
setActionSeparator
HTML to be added before each action to separate it from the previous action. For the first action, it will only be added if the message contents aren't empty.You may override this on a per action basis using
NotifyAction.separator
.Besides the default, some other known useful values are " " and " ".
- Parameters:
actionSeparator
- New actionSeparator value. Default value is " "- Returns:
NotifySettings
instance, for chaining setter calls- See Also:
-
getActionSeparator
HTML to be added before each action to separate it from the previous action. For the first action, it will only be added if the message contents aren't empty.You may override this on a per action basis using
NotifyAction.separator
.Besides the default, some other known useful values are " " and " ".
- Returns:
- Current actionSeparator value. Default value is " "
- See Also:
-
setActionStyleName
The CSS class to apply to action text in this message. default is:- "notifyErrorActionLink" for
NotifyType
: "error", - "notifyWarnActionLink" for
NotifyType
: "warn", and - "notifyMessageActionLink" for all other
NotifyType
s.
messagePriority
, it will determine the default rather than the actualNotifyType
, ifapplyPriorityToAppearance
is true.- Parameters:
actionStyleName
- New actionStyleName value. Default value is varies- Returns:
NotifySettings
instance, for chaining setter calls- See Also:
- "notifyErrorActionLink" for
-
getActionStyleName
The CSS class to apply to action text in this message. default is:- "notifyErrorActionLink" for
NotifyType
: "error", - "notifyWarnActionLink" for
NotifyType
: "warn", and - "notifyMessageActionLink" for all other
NotifyType
s.
messagePriority
, it will determine the default rather than the actualNotifyType
, ifapplyPriorityToAppearance
is true.- Returns:
- Current actionStyleName value. Default value is varies
- See Also:
- "notifyErrorActionLink" for
-
setAppearMethod
Controls how messages appear at or reach their requested location. The default of "slide" is recommended because the motion will draw the user's attention to the notification.- Parameters:
appearMethod
- New appearMethod value. Default value is "slide"- Returns:
NotifySettings
instance, for chaining setter calls
-
getAppearMethod
Controls how messages appear at or reach their requested location. The default of "slide" is recommended because the motion will draw the user's attention to the notification.- Returns:
- Current appearMethod value. Default value is "slide"
-
setApplyPriorityToAppearance
Whether to default properties affecting the message appearance to those of the built-inNotifyType
corresponding to themessagePriority
. Default is true except forNotifyType
s "error" and "warn", which default to false.Note : This is an advanced setting
- Parameters:
applyPriorityToAppearance
- New applyPriorityToAppearance value. Default value is varies- Returns:
NotifySettings
instance, for chaining setter calls- See Also:
-
getApplyPriorityToAppearance
public boolean getApplyPriorityToAppearance()Whether to default properties affecting the message appearance to those of the built-inNotifyType
corresponding to themessagePriority
. Default is true except forNotifyType
s "error" and "warn", which default to false.- Returns:
- Current applyPriorityToAppearance value. Default value is varies
- See Also:
-
setAutoFitMaxWidth
Maximum auto-fit width for a message ifautoFitWidth
is enabled. May be specified as a pixel value, or a percentage of page width.- Parameters:
autoFitMaxWidth
- New autoFitMaxWidth value. Default value is 300- Returns:
NotifySettings
instance, for chaining setter calls- See Also:
-
getAutoFitMaxWidth
Maximum auto-fit width for a message ifautoFitWidth
is enabled. May be specified as a pixel value, or a percentage of page width.- Returns:
- Current autoFitMaxWidth value. Default value is 300
- See Also:
-
setAutoFitMaxWidth
Maximum auto-fit width for a message ifautoFitWidth
is enabled. May be specified as a pixel value, or a percentage of page width.- Parameters:
autoFitMaxWidth
- New autoFitMaxWidth value. Default value is 300- Returns:
NotifySettings
instance, for chaining setter calls- See Also:
-
getAutoFitMaxWidthAsString
Maximum auto-fit width for a message ifautoFitWidth
is enabled. May be specified as a pixel value, or a percentage of page width.- Returns:
- Current autoFitMaxWidth value. Default value is 300
- See Also:
-
setAutoFitWidth
If true, the specified width of theLabel
drawn for this message will be treated as a minimum width. If the message content string exceeds this, theLabel
will expand to accommodate it up toautoFitMaxWidth
(without the text wrapping).Using this setting differs from simply disabling wrapping via
wrap:false
as the content will wrap if theautoFitMaxWidth
is exceeded.Note : This is an advanced setting
- Parameters:
autoFitWidth
- New autoFitWidth value. Default value is null- Returns:
NotifySettings
instance, for chaining setter calls
-
getAutoFitWidth
If true, the specified width of theLabel
drawn for this message will be treated as a minimum width. If the message content string exceeds this, theLabel
will expand to accommodate it up toautoFitMaxWidth
(without the text wrapping).Using this setting differs from simply disabling wrapping via
wrap:false
as the content will wrap if theautoFitMaxWidth
is exceeded.- Returns:
- Current autoFitWidth value. Default value is null
-
setCanDismiss
Displays an icon to allow a message to be dismissed through the UI. Messages can always be dismissed programmatically by callingNotify.dismissMessage()
.- Parameters:
canDismiss
- New canDismiss value. Default value is false- Returns:
NotifySettings
instance, for chaining setter calls
-
getCanDismiss
Displays an icon to allow a message to be dismissed through the UI. Messages can always be dismissed programmatically by callingNotify.dismissMessage()
.- Returns:
- Current canDismiss value. Default value is false
-
setDisappearMethod
Controls how messages disappear from or leave their requested location. The default of "fade" is recommended because a slide animation would draw too much attention to a notification that is no longer current, whereas a subtle fade should draw a minimum of attention (less even than instantaneously disappearing).- Parameters:
disappearMethod
- New disappearMethod value. Default value is "fade"- Returns:
NotifySettings
instance, for chaining setter calls
-
getDisappearMethod
Controls how messages disappear from or leave their requested location. The default of "fade" is recommended because a slide animation would draw too much attention to a notification that is no longer current, whereas a subtle fade should draw a minimum of attention (less even than instantaneously disappearing).- Returns:
- Current disappearMethod value. Default value is "fade"
-
setDuration
Length of time a message is shown before being auto-dismissed, in milliseconds. A value of 0 means that the message will not be dismissed automatically. Messages can always be dismissed by callingNotify.dismissMessage()
or, ifcanDismiss
is set, by performing a "close click".- Parameters:
duration
- New duration value. Default value is 5000- Returns:
NotifySettings
instance, for chaining setter calls
-
getDuration
public int getDuration()Length of time a message is shown before being auto-dismissed, in milliseconds. A value of 0 means that the message will not be dismissed automatically. Messages can always be dismissed by callingNotify.dismissMessage()
or, ifcanDismiss
is set, by performing a "close click".- Returns:
- Current duration value. Default value is 5000
-
setFadeInDuration
Time over which the fade-in effect runs forNotifyTransition
: "fade", in milliseconds.- Parameters:
fadeInDuration
- New fadeInDuration value. Default value is 500- Returns:
NotifySettings
instance, for chaining setter calls
-
getFadeInDuration
public int getFadeInDuration()Time over which the fade-in effect runs forNotifyTransition
: "fade", in milliseconds.- Returns:
- Current fadeInDuration value. Default value is 500
-
setFadeOutDuration
Time over which the fade-out effect runs forNotifyTransition
: "fade", in milliseconds.- Parameters:
fadeOutDuration
- New fadeOutDuration value. Default value is 500- Returns:
NotifySettings
instance, for chaining setter calls
-
getFadeOutDuration
public int getFadeOutDuration()Time over which the fade-out effect runs forNotifyTransition
: "fade", in milliseconds.- Returns:
- Current fadeOutDuration value. Default value is 500
-
setLabelProperties
Configures the properties, such asLabel.autoFit
,Label.align
, andLabel.width
. of theLabel
autochildren that will be used to draw messages, where not already determined by message layout or otherNotifySettings
properties such asstyleName
.Not all label properties are guaranteed to work here, as the Notify system is assumed to layout message content and manage positioning messages. In particular, the following properties should be avoided:
Property Name Issue Guidance margin Layout and positioning of the messages is handled by the Notify system. Use stackSpacing
to configure the separation between messages, andleftOffset
andtopOffset
to fine-tine stackpositioning
.padding Padding is set by notification CSS so that children are positioned corrected relative to content. You can apply your own styling
to messages via CSS. Or you can use HTML as the message contents to create whatever sort of interior layout you like.wrap Autowrap behavior is managed by the Notify system. To have autofitted
content not wrap, setautoFitMaxWidth
higher than your expected message widths. You can set it to "100%" if needed to allow the message to expand across the entire page.- Parameters:
labelProperties
- New labelProperties value. Default value is null- Returns:
NotifySettings
instance, for chaining setter calls- See Also:
-
getLabelProperties
Configures the properties, such asLabel.autoFit
,Label.align
, andLabel.width
. of theLabel
autochildren that will be used to draw messages, where not already determined by message layout or otherNotifySettings
properties such asstyleName
.Not all label properties are guaranteed to work here, as the Notify system is assumed to layout message content and manage positioning messages. In particular, the following properties should be avoided:
Property Name Issue Guidance margin Layout and positioning of the messages is handled by the Notify system. Use stackSpacing
to configure the separation between messages, andleftOffset
andtopOffset
to fine-tine stackpositioning
.padding Padding is set by notification CSS so that children are positioned corrected relative to content. You can apply your own styling
to messages via CSS. Or you can use HTML as the message contents to create whatever sort of interior layout you like.wrap Autowrap behavior is managed by the Notify system. To have autofitted
content not wrap, setautoFitMaxWidth
higher than your expected message widths. You can set it to "100%" if needed to allow the message to expand across the entire page.- Returns:
- Current labelProperties value. Default value is null
-
setLeftOffset
Specifies a left offset from the position specified byposition
orpositionCanvas
where the message should be shown. Ignored ifcoordinates
are provided to position the message.- Parameters:
leftOffset
- New leftOffset value. Default value is null- Returns:
NotifySettings
instance, for chaining setter calls- See Also:
-
getLeftOffset
Specifies a left offset from the position specified byposition
orpositionCanvas
where the message should be shown. Ignored ifcoordinates
are provided to position the message.- Returns:
- Current leftOffset value. Default value is null
- See Also:
-
setMaxStackDismissMode
Specifies how to pick which message to dismiss when themaxStackSize
is reached, and the lowest priority value (highest numericalmessagePriority
) is shared by more than one message.We can simply dismiss the oldest message of that
messagePriority
, or we can pick the message with the least time left until it's auto-dismissed.- Parameters:
maxStackDismissMode
- New maxStackDismissMode value. Default value is "oldest"- Returns:
NotifySettings
instance, for chaining setter calls- See Also:
-
getMaxStackDismissMode
Specifies how to pick which message to dismiss when themaxStackSize
is reached, and the lowest priority value (highest numericalmessagePriority
) is shared by more than one message.We can simply dismiss the oldest message of that
messagePriority
, or we can pick the message with the least time left until it's auto-dismissed.- Returns:
- Current maxStackDismissMode value. Default value is "oldest"
- See Also:
-
setMaxStackSize
Sets a limit on how many messages may be stacked ifMultiMessageMode
is "stack". The oldest message of the affectedNotifyType
will be dismissed to enforce this limit.- Parameters:
maxStackSize
- New maxStackSize value. Default value is 3- Returns:
NotifySettings
instance, for chaining setter calls
-
getMaxStackSize
public int getMaxStackSize()Sets a limit on how many messages may be stacked ifMultiMessageMode
is "stack". The oldest message of the affectedNotifyType
will be dismissed to enforce this limit.- Returns:
- Current maxStackSize value. Default value is 3
-
setMessageControlPadding
Optional specified padding to apply after the message content when showing adismiss button
so that the button doesn't occlude any content. Only needed if the messagestyling
doesn't already provide enough padding.- Parameters:
messageControlPadding
- New messageControlPadding value. Default value is null- Returns:
NotifySettings
instance, for chaining setter calls
-
getMessageControlPadding
Optional specified padding to apply after the message content when showing adismiss button
so that the button doesn't occlude any content. Only needed if the messagestyling
doesn't already provide enough padding.- Returns:
- Current messageControlPadding value. Default value is null
-
setMessageIcon
Optional icon to be shown in theLabel
drawn for this message. Default is- "[SKIN]/Notify/error.png" for
NotifyType
: "error", - "[SKIN]/Notify/warning.png"
for
NotifyType
: "warn", and - "[SKIN]/Notify/checkmark.png" for all other
NotifyType
s.
messagePriority
, it will determine the default rather than the actualNotifyType
, ifapplyPriorityToAppearance
is true.- Parameters:
messageIcon
- New messageIcon value. Default value is varies- Returns:
NotifySettings
instance, for chaining setter calls- See Also:
- "[SKIN]/Notify/error.png" for
-
getMessageIcon
Optional icon to be shown in theLabel
drawn for this message. Default is- "[SKIN]/Notify/error.png" for
NotifyType
: "error", - "[SKIN]/Notify/warning.png"
for
NotifyType
: "warn", and - "[SKIN]/Notify/checkmark.png" for all other
NotifyType
s.
messagePriority
, it will determine the default rather than the actualNotifyType
, ifapplyPriorityToAppearance
is true.- Returns:
- Current messageIcon value. Default value is varies
- See Also:
- "[SKIN]/Notify/error.png" for
-
setMessageIconHeight
Height in pixels of the icon image.- Parameters:
messageIconHeight
- New messageIconHeight value. Default value is 17- Returns:
NotifySettings
instance, for chaining setter calls- See Also:
-
getMessageIconHeight
public int getMessageIconHeight()Height in pixels of the icon image.- Returns:
- Current messageIconHeight value. Default value is 17
- See Also:
-
setMessageIconOrientation
If an icon is present, should it appear to the left or right of the title? valid options are"left"
and"right"
. If unset, default is "left" unlessRTL
is active, in which case it's "right".Note that the icon will automatically be given an alignment matching its orientation, so "left" for
messageIconOrientation
"left", and vice versa.- Parameters:
messageIconOrientation
- New messageIconOrientation value. Default value is varies- Returns:
NotifySettings
instance, for chaining setter calls- See Also:
-
getMessageIconOrientation
If an icon is present, should it appear to the left or right of the title? valid options are"left"
and"right"
. If unset, default is "left" unlessRTL
is active, in which case it's "right".Note that the icon will automatically be given an alignment matching its orientation, so "left" for
messageIconOrientation
"left", and vice versa.- Returns:
- Current messageIconOrientation value. Default value is varies
- See Also:
-
setMessageIconSpacing
Pixels between icon and title text.- Parameters:
messageIconSpacing
- New messageIconSpacing value. Default value is 20- Returns:
NotifySettings
instance, for chaining setter calls- See Also:
-
getMessageIconSpacing
public int getMessageIconSpacing()Pixels between icon and title text.- Returns:
- Current messageIconSpacing value. Default value is 20
- See Also:
-
setMessageIconWidth
Width in pixels of the icon image.- Parameters:
messageIconWidth
- New messageIconWidth value. Default value is 17- Returns:
NotifySettings
instance, for chaining setter calls- See Also:
-
getMessageIconWidth
public int getMessageIconWidth()Width in pixels of the icon image.- Returns:
- Current messageIconWidth value. Default value is 17
- See Also:
-
setMessagePriority
Sets the priority of the message. Priority is used to determine which message to dismiss ifmaxStackSize
is hit. Lower numerical values have higher priority.The default is:
ERROR
forNotifyType
: "error",WARN
forNotifyType
: "warn", andMESSAGE
for all otherNotifyType
s
If you specify
will be assigned, if not specified, to the default values from:messagePriority
, andapplyPriorityToAppearance
is set, the properties:-
NotifyType
: "error" for priorityERROR
, -
NotifyType
: "warn" for priorityWARN
, or -
NotifyType
: "message" for priorities at or belowMESSAGE
(greater or equal numerically)
NotifyType
by simply supplying amessagePriority
for that message.Note : This is an advanced setting
- Parameters:
messagePriority
- New messagePriority value. Default value is varies- Returns:
NotifySettings
instance, for chaining setter calls- See Also:
-
getMessagePriority
public int getMessagePriority()Sets the priority of the message. Priority is used to determine which message to dismiss ifmaxStackSize
is hit. Lower numerical values have higher priority.The default is:
ERROR
forNotifyType
: "error",WARN
forNotifyType
: "warn", andMESSAGE
for all otherNotifyType
s
If you specify
will be assigned, if not specified, to the default values from:messagePriority
, andapplyPriorityToAppearance
is set, the properties:-
NotifyType
: "error" for priorityERROR
, -
NotifyType
: "warn" for priorityWARN
, or -
NotifyType
: "message" for priorities at or belowMESSAGE
(greater or equal numerically)
NotifyType
by simply supplying amessagePriority
for that message.- Returns:
- Current messagePriority value. Default value is varies
- See Also:
-
setMultiMessageMode
Determines what happens if a message appears while there's still another one of the sameNotifyType
being shown. Such messages are either stacked or replace one another,- Parameters:
multiMessageMode
- New multiMessageMode value. Default value is "stack"- Returns:
NotifySettings
instance, for chaining setter calls
-
getMultiMessageMode
Determines what happens if a message appears while there's still another one of the sameNotifyType
being shown. Such messages are either stacked or replace one another,- Returns:
- Current multiMessageMode value. Default value is "stack"
-
setPosition
Where to show the message, specified as an edge ("T", "B", "R", "L"), a corner ("TL", "TR", "BL", "BR), or "C" for center, similar toCanvas.snapTo
. If an edge is specified, the message will be shown at its center (or the very center for "C"). Only used ifcoordinates
haven't been provided.If a
positionCanvas
has been specified, theposition
is interpreted relative to it instead of the viewport, and this property defaults to "C". Otherwise, if nopositionCanvas
is present, the default is to useslideInOrigin
orslideOutOrigin
, or "L" if neither property is defined.To place the message at an offset from the specified position, use
leftOffset
ortopOffset
.- Parameters:
position
- New position value. Default value is varies- Returns:
NotifySettings
instance, for chaining setter calls- See Also:
-
getPosition
Where to show the message, specified as an edge ("T", "B", "R", "L"), a corner ("TL", "TR", "BL", "BR), or "C" for center, similar toCanvas.snapTo
. If an edge is specified, the message will be shown at its center (or the very center for "C"). Only used ifcoordinates
haven't been provided.If a
positionCanvas
has been specified, theposition
is interpreted relative to it instead of the viewport, and this property defaults to "C". Otherwise, if nopositionCanvas
is present, the default is to useslideInOrigin
orslideOutOrigin
, or "L" if neither property is defined.To place the message at an offset from the specified position, use
leftOffset
ortopOffset
.- Returns:
- Current position value. Default value is varies
- See Also:
-
setPositionCanvas
Canvas over which to position the message, available as an alternative means of placement if viewport-relativecoordinates
aren't provided. Note that the canvas is only used to compute where to the place message, and will not be altered.- Parameters:
positionCanvas
- New positionCanvas value. Default value is null- Returns:
NotifySettings
instance, for chaining setter calls- See Also:
-
getPositionCanvas
Canvas over which to position the message, available as an alternative means of placement if viewport-relativecoordinates
aren't provided. Note that the canvas is only used to compute where to the place message, and will not be altered.- Returns:
- Current positionCanvas value. Default value is null
- See Also:
-
setRepositionMethod
Controls how the stack or message is repositioned, if required, afterNotify.setMessageContents()
has been called. Valid values are "slide" and "instant".- Parameters:
repositionMethod
- New repositionMethod value. Default value is "slide"- Returns:
NotifySettings
instance, for chaining setter calls
-
getRepositionMethod
Controls how the stack or message is repositioned, if required, afterNotify.setMessageContents()
has been called. Valid values are "slide" and "instant".- Returns:
- Current repositionMethod value. Default value is "slide"
-
setSlideInOrigin
Determines where messages originate when they appear forappearMethod
: "slide". Possible values are "L", "R", "T", and "B".If not specified, the edge nearest the message's requested coordinates or position is used.
- Parameters:
slideInOrigin
- New slideInOrigin value. Default value is null- Returns:
NotifySettings
instance, for chaining setter calls
-
getSlideInOrigin
Determines where messages originate when they appear forappearMethod
: "slide". Possible values are "L", "R", "T", and "B".If not specified, the edge nearest the message's requested coordinates or position is used.
- Returns:
- Current slideInOrigin value. Default value is null
-
setSlideOutOrigin
Determines where messages go when they disappear fordisappearMethod
: "slide". Possible values are "L", "R", "T", and "B".If not specified, the edge nearest the message's requested coordinates or position is used.
- Parameters:
slideOutOrigin
- New slideOutOrigin value. Default value is null- Returns:
NotifySettings
instance, for chaining setter calls
-
getSlideOutOrigin
Determines where messages go when they disappear fordisappearMethod
: "slide". Possible values are "L", "R", "T", and "B".If not specified, the edge nearest the message's requested coordinates or position is used.
- Returns:
- Current slideOutOrigin value. Default value is null
-
setSlideSpeed
Animation speed forNotifyTransition
: "slide", in pixels/second.- Parameters:
slideSpeed
- New slideSpeed value. Default value is 300- Returns:
NotifySettings
instance, for chaining setter calls
-
getSlideSpeed
public int getSlideSpeed()Animation speed forNotifyTransition
: "slide", in pixels/second.- Returns:
- Current slideSpeed value. Default value is 300
-
setStackDirection
Determines how messages are stacked ifMultiMessageMode
is "stack". For example, "down" means that older messages move down when a new message of the sameNotifyType
appears.- Parameters:
stackDirection
- New stackDirection value. Default value is "down"- Returns:
NotifySettings
instance, for chaining setter calls
-
getStackDirection
Determines how messages are stacked ifMultiMessageMode
is "stack". For example, "down" means that older messages move down when a new message of the sameNotifyType
appears.- Returns:
- Current stackDirection value. Default value is "down"
-
setStackPersistence
Controls how older messages'duration
countdowns are affected when a new message of the sameNotifyType
appears. We either continue the countdowns on the older messages as if they are unrelated, or we reset any countdowns that are less than the new message'sduration
.Note that you can set this property in a call to
Notify.addMessage()
even though it has "stack" in its name, since it governs the logic run on behalf of this message.Note : This is an advanced setting
- Parameters:
stackPersistence
- New stackPersistence value. Default value is "none"- Returns:
NotifySettings
instance, for chaining setter calls
-
getStackPersistence
Controls how older messages'duration
countdowns are affected when a new message of the sameNotifyType
appears. We either continue the countdowns on the older messages as if they are unrelated, or we reset any countdowns that are less than the new message'sduration
.Note that you can set this property in a call to
Notify.addMessage()
even though it has "stack" in its name, since it governs the logic run on behalf of this message.- Returns:
- Current stackPersistence value. Default value is "none"
-
setStackSpacing
Space between each message whenMultiMessageMode
is "stack".- Parameters:
stackSpacing
- New stackSpacing value. Default value is 2- Returns:
NotifySettings
instance, for chaining setter calls
-
getStackSpacing
public int getStackSpacing()Space between each message whenMultiMessageMode
is "stack".- Returns:
- Current stackSpacing value. Default value is 2
-
setStayIfHovered
If true, pauses the auto-dismiss countdown timer when the mouse is over the messasge.- Parameters:
stayIfHovered
- New stayIfHovered value. Default value is false- Returns:
NotifySettings
instance, for chaining setter calls
-
getStayIfHovered
public boolean getStayIfHovered()If true, pauses the auto-dismiss countdown timer when the mouse is over the messasge.- Returns:
- Current stayIfHovered value. Default value is false
-
setStyleName
The CSS class to apply to theLabel
drawn for this message. Default is:- "notifyError" for
NotifyType
: "error", - "notifyWarn" for
NotifyType
: "warn", and - "notifyMessage" for all other
NotifyType
s.
messagePriority
, it will determine the default rather than the actualNotifyType
, ifapplyPriorityToAppearance
is true.Note that if
RTL
is active, the default will be as above, but with an "RTL" suffix added.- Parameters:
styleName
- New styleName value. Default value is varies- Returns:
NotifySettings
instance, for chaining setter calls- See Also:
- "notifyError" for
-
getStyleName
The CSS class to apply to theLabel
drawn for this message. Default is:- "notifyError" for
NotifyType
: "error", - "notifyWarn" for
NotifyType
: "warn", and - "notifyMessage" for all other
NotifyType
s.
messagePriority
, it will determine the default rather than the actualNotifyType
, ifapplyPriorityToAppearance
is true.Note that if
RTL
is active, the default will be as above, but with an "RTL" suffix added.- Returns:
- Current styleName value. Default value is varies
- See Also:
- "notifyError" for
-
setTopOffset
Specifies a top offset from the position specified byposition
orpositionCanvas
where the message should be shown. Ignored ifcoordinates
are provided to position the message.- Parameters:
topOffset
- New topOffset value. Default value is null- Returns:
NotifySettings
instance, for chaining setter calls- See Also:
-
getTopOffset
Specifies a top offset from the position specified byposition
orpositionCanvas
where the message should be shown. Ignored ifcoordinates
are provided to position the message.- Returns:
- Current topOffset value. Default value is null
- See Also:
-
setX
Where to show the message, as a viewport-relative x coordinate offset to the left edge of theLabel
rendering the message. Propertiesposition
andpositionCanvas
will only be used to place messages if coordinates aren't provided.- Parameters:
x
- New x value. Default value is null- Returns:
NotifySettings
instance, for chaining setter calls- See Also:
-
getX
Where to show the message, as a viewport-relative x coordinate offset to the left edge of theLabel
rendering the message. Propertiesposition
andpositionCanvas
will only be used to place messages if coordinates aren't provided.- Returns:
- Current x value. Default value is null
- See Also:
-
setY
Where to show the message, as a viewport-relative y coordinate offset to the top edge of theLabel
rendering the message.- Parameters:
y
- New y value. Default value is null- Returns:
NotifySettings
instance, for chaining setter calls- See Also:
-
getY
Where to show the message, as a viewport-relative y coordinate offset to the top edge of theLabel
rendering the message.- Returns:
- Current y value. Default value is null
- See Also:
-