Class NotifySettings

All Implemented Interfaces:
HasHandlers

public class NotifySettings extends DataClass
An object used to configure how messages shown by Notify.addMessage() are drawn and behave.
See Also:
  • Constructor Details

    • NotifySettings

      public NotifySettings()
    • NotifySettings

      public NotifySettings(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static NotifySettings getOrCreateRef(JavaScriptObject jsObj)
    • setActionSeparator

      public NotifySettings setActionSeparator(String actionSeparator)
      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

      public String 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

      public NotifySettings setActionStyleName(String actionStyleName)
      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 NotifyTypes.
      However, if you specify a messagePriority, it will determine the default rather than the actual NotifyType, if applyPriorityToAppearance is true.
      Parameters:
      actionStyleName - New actionStyleName value. Default value is varies
      Returns:
      NotifySettings instance, for chaining setter calls
      See Also:
    • getActionStyleName

      public String 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 NotifyTypes.
      However, if you specify a messagePriority, it will determine the default rather than the actual NotifyType, if applyPriorityToAppearance is true.
      Returns:
      Current actionStyleName value. Default value is varies
      See Also:
    • setAppearMethod

      public NotifySettings setAppearMethod(NotifyTransition appearMethod)
      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

      public NotifyTransition 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

      public NotifySettings setApplyPriorityToAppearance(boolean applyPriorityToAppearance)
      Whether to default properties affecting the message appearance to those of the built-in NotifyType corresponding to the messagePriority. Default is true except for NotifyTypes "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-in NotifyType corresponding to the messagePriority. Default is true except for NotifyTypes "error" and "warn", which default to false.
      Returns:
      Current applyPriorityToAppearance value. Default value is varies
      See Also:
    • setAutoFitMaxWidth

      public NotifySettings setAutoFitMaxWidth(Integer autoFitMaxWidth)
      Maximum auto-fit width for a message if autoFitWidth 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

      public Integer getAutoFitMaxWidth()
      Maximum auto-fit width for a message if autoFitWidth 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

      public NotifySettings setAutoFitMaxWidth(String autoFitMaxWidth)
      Maximum auto-fit width for a message if autoFitWidth 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

      public String getAutoFitMaxWidthAsString()
      Maximum auto-fit width for a message if autoFitWidth 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

      public NotifySettings setAutoFitWidth(Boolean autoFitWidth)
      If true, the specified width of the Label drawn for this message will be treated as a minimum width. If the message content string exceeds this, the Label will expand to accommodate it up to autoFitMaxWidth (without the text wrapping).

      Using this setting differs from simply disabling wrapping via wrap:false as the content will wrap if the autoFitMaxWidth 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

      public Boolean getAutoFitWidth()
      If true, the specified width of the Label drawn for this message will be treated as a minimum width. If the message content string exceeds this, the Label will expand to accommodate it up to autoFitMaxWidth (without the text wrapping).

      Using this setting differs from simply disabling wrapping via wrap:false as the content will wrap if the autoFitMaxWidth is exceeded.

      Returns:
      Current autoFitWidth value. Default value is null
    • setCanDismiss

      public NotifySettings setCanDismiss(Boolean canDismiss)
      Displays an icon to allow a message to be dismissed through the UI. Messages can always be dismissed programmatically by calling Notify.dismissMessage().
      Parameters:
      canDismiss - New canDismiss value. Default value is false
      Returns:
      NotifySettings instance, for chaining setter calls
    • getCanDismiss

      public Boolean getCanDismiss()
      Displays an icon to allow a message to be dismissed through the UI. Messages can always be dismissed programmatically by calling Notify.dismissMessage().
      Returns:
      Current canDismiss value. Default value is false
    • setDisappearMethod

      public NotifySettings setDisappearMethod(NotifyTransition disappearMethod)
      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

      public NotifyTransition 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

      public NotifySettings setDuration(int duration)
      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 calling Notify.dismissMessage() or, if canDismiss 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 calling Notify.dismissMessage() or, if canDismiss is set, by performing a "close click".
      Returns:
      Current duration value. Default value is 5000
    • setFadeInDuration

      public NotifySettings setFadeInDuration(int fadeInDuration)
      Time over which the fade-in effect runs for NotifyTransition: "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 for NotifyTransition: "fade", in milliseconds.
      Returns:
      Current fadeInDuration value. Default value is 500
    • setFadeOutDuration

      public NotifySettings setFadeOutDuration(int fadeOutDuration)
      Time over which the fade-out effect runs for NotifyTransition: "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 for NotifyTransition: "fade", in milliseconds.
      Returns:
      Current fadeOutDuration value. Default value is 500
    • setLabelProperties

      public NotifySettings setLabelProperties(Label labelProperties)
      Configures the properties, such as Label.autoFit, Label.align, and Label.width. of the Label autochildren that will be used to draw messages, where not already determined by message layout or other NotifySettings properties such as styleName.

      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 NameIssueGuidance
      margin Layout and positioning of the messages is handled by the Notify system. Use stackSpacing to configure the separation between messages, and leftOffset and topOffset to fine-tine stack positioning.
      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, set autoFitMaxWidth 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

      public Label getLabelProperties()
      Configures the properties, such as Label.autoFit, Label.align, and Label.width. of the Label autochildren that will be used to draw messages, where not already determined by message layout or other NotifySettings properties such as styleName.

      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 NameIssueGuidance
      margin Layout and positioning of the messages is handled by the Notify system. Use stackSpacing to configure the separation between messages, and leftOffset and topOffset to fine-tine stack positioning.
      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, set autoFitMaxWidth 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

      public NotifySettings setLeftOffset(Integer leftOffset)
      Specifies a left offset from the position specified by position or positionCanvas where the message should be shown. Ignored if coordinates 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

      public Integer getLeftOffset()
      Specifies a left offset from the position specified by position or positionCanvas where the message should be shown. Ignored if coordinates are provided to position the message.
      Returns:
      Current leftOffset value. Default value is null
      See Also:
    • setMaxStackDismissMode

      public NotifySettings setMaxStackDismissMode(MaxStackDismissMode maxStackDismissMode)
      Specifies how to pick which message to dismiss when the maxStackSize is reached, and the lowest priority value (highest numerical messagePriority) 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

      public MaxStackDismissMode getMaxStackDismissMode()
      Specifies how to pick which message to dismiss when the maxStackSize is reached, and the lowest priority value (highest numerical messagePriority) 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

      public NotifySettings setMaxStackSize(int maxStackSize)
      Sets a limit on how many messages may be stacked if MultiMessageMode is "stack". The oldest message of the affected NotifyType 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 if MultiMessageMode is "stack". The oldest message of the affected NotifyType will be dismissed to enforce this limit.
      Returns:
      Current maxStackSize value. Default value is 3
    • setMessageControlPadding

      public NotifySettings setMessageControlPadding(Integer messageControlPadding)
      Optional specified padding to apply after the message content when showing a dismiss button so that the button doesn't occlude any content. Only needed if the message styling doesn't already provide enough padding.
      Parameters:
      messageControlPadding - New messageControlPadding value. Default value is null
      Returns:
      NotifySettings instance, for chaining setter calls
    • getMessageControlPadding

      public Integer getMessageControlPadding()
      Optional specified padding to apply after the message content when showing a dismiss button so that the button doesn't occlude any content. Only needed if the message styling doesn't already provide enough padding.
      Returns:
      Current messageControlPadding value. Default value is null
    • setMessageIcon

      public NotifySettings setMessageIcon(String messageIcon)
      Optional icon to be shown in the Label 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 NotifyTypes.
      However, if you specify a messagePriority, it will determine the default rather than the actual NotifyType, if applyPriorityToAppearance is true.
      Parameters:
      messageIcon - New messageIcon value. Default value is varies
      Returns:
      NotifySettings instance, for chaining setter calls
      See Also:
    • getMessageIcon

      public String getMessageIcon()
      Optional icon to be shown in the Label 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 NotifyTypes.
      However, if you specify a messagePriority, it will determine the default rather than the actual NotifyType, if applyPriorityToAppearance is true.
      Returns:
      Current messageIcon value. Default value is varies
      See Also:
    • setMessageIconHeight

      public NotifySettings setMessageIconHeight(int messageIconHeight)
      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

      public NotifySettings 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". If unset, default is "left" unless RTL 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

      public String 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" unless RTL 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

      public NotifySettings setMessageIconSpacing(int messageIconSpacing)
      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

      public NotifySettings setMessageIconWidth(int messageIconWidth)
      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

      public NotifySettings setMessagePriority(int messagePriority)
      Sets the priority of the message. Priority is used to determine which message to dismiss if maxStackSize is hit. Lower numerical values have higher priority.

      The default is:

      Impact on Appearance

      If you specify messagePriority, and applyPriorityToAppearance is set, the properties:

      will be assigned, if not specified, to the default values from: This allows you to automatically set "error" or "warn" styling, on a per-message basis, for any non-"error" or "warn" NotifyType by simply supplying a messagePriority 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 if maxStackSize is hit. Lower numerical values have higher priority.

      The default is:

      Impact on Appearance

      If you specify messagePriority, and applyPriorityToAppearance is set, the properties:

      will be assigned, if not specified, to the default values from: This allows you to automatically set "error" or "warn" styling, on a per-message basis, for any non-"error" or "warn" NotifyType by simply supplying a messagePriority for that message.
      Returns:
      Current messagePriority value. Default value is varies
      See Also:
    • setMultiMessageMode

      public NotifySettings setMultiMessageMode(MultiMessageMode multiMessageMode)
      Determines what happens if a message appears while there's still another one of the same NotifyType 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

      public MultiMessageMode getMultiMessageMode()
      Determines what happens if a message appears while there's still another one of the same NotifyType being shown. Such messages are either stacked or replace one another,
      Returns:
      Current multiMessageMode value. Default value is "stack"
    • setPosition

      public NotifySettings 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 to Canvas.snapTo. If an edge is specified, the message will be shown at its center (or the very center for "C"). Only used if coordinates haven't been provided.

      If a positionCanvas has been specified, the position is interpreted relative to it instead of the viewport, and this property defaults to "C". Otherwise, if no positionCanvas is present, the default is to use slideInOrigin or slideOutOrigin, or "L" if neither property is defined.

      To place the message at an offset from the specified position, use leftOffset or topOffset.

      Parameters:
      position - New position value. Default value is varies
      Returns:
      NotifySettings instance, for chaining setter calls
      See Also:
    • getPosition

      public EdgeName 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 to Canvas.snapTo. If an edge is specified, the message will be shown at its center (or the very center for "C"). Only used if coordinates haven't been provided.

      If a positionCanvas has been specified, the position is interpreted relative to it instead of the viewport, and this property defaults to "C". Otherwise, if no positionCanvas is present, the default is to use slideInOrigin or slideOutOrigin, or "L" if neither property is defined.

      To place the message at an offset from the specified position, use leftOffset or topOffset.

      Returns:
      Current position value. Default value is varies
      See Also:
    • setPositionCanvas

      public NotifySettings setPositionCanvas(Canvas positionCanvas)
      Canvas over which to position the message, available as an alternative means of placement if viewport-relative coordinates 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

      public Canvas getPositionCanvas()
      Canvas over which to position the message, available as an alternative means of placement if viewport-relative coordinates 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

      public NotifySettings setRepositionMethod(NotifyTransition repositionMethod)
      Controls how the stack or message is repositioned, if required, after Notify.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

      public NotifyTransition getRepositionMethod()
      Controls how the stack or message is repositioned, if required, after Notify.setMessageContents() has been called. Valid values are "slide" and "instant".
      Returns:
      Current repositionMethod value. Default value is "slide"
    • setSlideInOrigin

      public NotifySettings setSlideInOrigin(String slideInOrigin)
      Determines where messages originate when they appear for appearMethod: "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

      public String getSlideInOrigin()
      Determines where messages originate when they appear for appearMethod: "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

      public NotifySettings setSlideOutOrigin(String slideOutOrigin)
      Determines where messages go when they disappear for disappearMethod: "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

      public String getSlideOutOrigin()
      Determines where messages go when they disappear for disappearMethod: "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

      public NotifySettings setSlideSpeed(int slideSpeed)
      Animation speed for NotifyTransition: "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 for NotifyTransition: "slide", in pixels/second.
      Returns:
      Current slideSpeed value. Default value is 300
    • setStackDirection

      public NotifySettings setStackDirection(StackDirection stackDirection)
      Determines how messages are stacked if MultiMessageMode is "stack". For example, "down" means that older messages move down when a new message of the same NotifyType appears.
      Parameters:
      stackDirection - New stackDirection value. Default value is "down"
      Returns:
      NotifySettings instance, for chaining setter calls
    • getStackDirection

      public StackDirection getStackDirection()
      Determines how messages are stacked if MultiMessageMode is "stack". For example, "down" means that older messages move down when a new message of the same NotifyType appears.
      Returns:
      Current stackDirection value. Default value is "down"
    • setStackPersistence

      public NotifySettings setStackPersistence(StackPersistence stackPersistence)
      Controls how older messages' duration countdowns are affected when a new message of the same NotifyType 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's duration.

      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

      public StackPersistence getStackPersistence()
      Controls how older messages' duration countdowns are affected when a new message of the same NotifyType 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's duration.

      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

      public NotifySettings setStackSpacing(int stackSpacing)
      Space between each message when MultiMessageMode 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 when MultiMessageMode is "stack".
      Returns:
      Current stackSpacing value. Default value is 2
    • setStayIfHovered

      public NotifySettings setStayIfHovered(boolean stayIfHovered)
      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

      public NotifySettings setStyleName(String styleName)
      The CSS class to apply to the Label drawn for this message. Default is: However, if you specify a messagePriority, it will determine the default rather than the actual NotifyType, if applyPriorityToAppearance 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:
    • getStyleName

      public String getStyleName()
      The CSS class to apply to the Label drawn for this message. Default is: However, if you specify a messagePriority, it will determine the default rather than the actual NotifyType, if applyPriorityToAppearance 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:
    • setTopOffset

      public NotifySettings setTopOffset(Integer topOffset)
      Specifies a top offset from the position specified by position or positionCanvas where the message should be shown. Ignored if coordinates 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

      public Integer getTopOffset()
      Specifies a top offset from the position specified by position or positionCanvas where the message should be shown. Ignored if coordinates are provided to position the message.
      Returns:
      Current topOffset value. Default value is null
      See Also:
    • setX

      public NotifySettings setX(Integer x)
      Where to show the message, as a viewport-relative x coordinate offset to the left edge of the Label rendering the message. Properties position and positionCanvas 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

      public Integer getX()
      Where to show the message, as a viewport-relative x coordinate offset to the left edge of the Label rendering the message. Properties position and positionCanvas will only be used to place messages if coordinates aren't provided.
      Returns:
      Current x value. Default value is null
      See Also:
    • setY

      public NotifySettings setY(Integer y)
      Where to show the message, as a viewport-relative y coordinate offset to the top edge of the Label rendering the message.
      Parameters:
      y - New y value. Default value is null
      Returns:
      NotifySettings instance, for chaining setter calls
      See Also:
    • getY

      public Integer getY()
      Where to show the message, as a viewport-relative y coordinate offset to the top edge of the Label rendering the message.
      Returns:
      Current y value. Default value is null
      See Also: