public class NotifySettings extends JavaScriptObject
makeDefault()
Modifier | Constructor and Description |
---|---|
protected |
NotifySettings()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
makeDefault()
Make this NotifySettings as default for all new Notifies.
|
static NotifySettings |
newSettings()
Creates a new instance of
NotifySettings . |
void |
setAllowDismiss(boolean allowDismiss)
If
false , the data-notify="dismiss" element in
the template will be hidden. |
void |
setAnimation(Animation enter,
Animation exit)
Set Animation to Notify when it enters and exit the screen.
|
void |
setAnimation(String enter,
String exit)
Set custom CSS style for animations of Notify when it enters and exits the screen.
|
void |
setClosedHandler(NotifyClosedHandler handler)
Set the Notify's closed event handler.
|
void |
setCloseHandler(NotifyCloseHandler handler)
Set the Notify's close event handler.
|
void |
setDelay(int mDelay)
Set delay, how long Notify stays on screen.
|
void |
setElement(String element)
Set element name or class or ID to append Notify to.
|
void |
setIconType(NotifyIconType iconType)
Set icon type you will use for Notify.
|
void |
setNewestOnTop(boolean newestOnTop)
If
true , newer notifications push down older ones. |
void |
setOffset(int offX,
int offY)
Set offset (space between Notify and screen/browser edges) for each axis.
|
void |
setPauseOnMouseOver(boolean pauseOnMouseOver)
Pause countdown of display timeout when mouse is hovering above the Notify.
|
void |
setPlacement(NotifyPlacement placement)
Set placement of Notify on screen.
|
void |
setPosition(NotifyPosition position)
Set custom position to the Notify container element.
|
void |
setShowHandler(NotifyShowHandler handler)
Set the Notify's show event handler.
|
void |
setShownHandler(NotifyShownHandler handler)
Set the Notify's shown event handler.
|
void |
setShowProgressbar(boolean showProgressbar)
If
true , the notification should display a progress bar. |
void |
setSpacing(int space)
Set custom spacing between two Notifies.
|
void |
setTemplate(String html)
Set custom HTML Template of Notify.
|
void |
setTimer(int timer)
Set timer.
|
void |
setType(NotifyType type)
Set type of Notify (CSS style class name).
|
void |
setType(String customType)
Set custom style name to Notify.
|
void |
setUrlTarget(NotifyUrlTarget urlTarget)
|
void |
setUrlTarget(String customUrlTarget)
Set custom URL target.
|
void |
setZIndex(int zIndex)
Set custom Z-index.
|
cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString
protected NotifySettings()
public static NotifySettings newSettings()
NotifySettings
.NotifySettings
.public final void setElement(String element)
element
- Name, class or IDpublic final void setPosition(NotifyPosition position)
position
- one of STATIC, FIXED, RELATIVE, ABSOLUTE, or nullpublic final void setType(NotifyType type)
type
- one of INFO, WARNING, DANGER, SUCCESSNotifyType
public final void setType(String customType)
customType
- Style name to setpublic final void setAllowDismiss(boolean allowDismiss)
false
, the data-notify="dismiss"
element in
the template will be hidden. Default is true
.allowDismiss
- if false
, the close icon will be hiddenpublic final void setShowProgressbar(boolean showProgressbar)
true
, the notification should display a progress bar.
Default is false
.showProgressbar
- if true
, the progress bar will be displayedpublic final void setPlacement(NotifyPlacement placement)
NotifyPlacement.TOP_RIGHT
.placement
- Notify's placement on screenNotifyPlacement
public final void setNewestOnTop(boolean newestOnTop)
true
, newer notifications push down older ones. Default
is false
.newestOnTop
to true
when a placement that
already contains a notification has newest_on_top
to
false
. It may cause issues with the plug-ins ability to
place the notification in the correct location.newestOnTop
- if true
, newer notifications push down older onespublic final void setOffset(int offX, int offY)
offX
- Offset for X axis in PXoffY
- Offset for Y axis in PXpublic final void setSpacing(int space)
space
- Spacing in PXpublic final void setZIndex(int zIndex)
zIndex
- Z-indexpublic final void setDelay(int mDelay)
mDelay
- Delay in milliseconds or zero for unlimitedpublic final void setTimer(int timer)
timer
- Time in millisecondssetDelay(int)
public final void setUrlTarget(NotifyUrlTarget urlTarget)
urlTarget
- URL targetpublic final void setUrlTarget(String customUrlTarget)
customUrlTarget
- URL targetpublic final void setPauseOnMouseOver(boolean pauseOnMouseOver)
pauseOnMouseOver
- TRUE = pause / FALSE = not pausepublic final void setAnimation(Animation enter, Animation exit)
enter
- animation style when Notify enters the screenexit
- animation style when Notify exists the screenAnimation
public final void setAnimation(String enter, String exit)
enter
- animation style when Notify enters the screenexit
- animation style when Notify exists the screenpublic final void setShowHandler(NotifyShowHandler handler)
handler
- public final void setShownHandler(NotifyShownHandler handler)
handler
- public final void setCloseHandler(NotifyCloseHandler handler)
handler
- public final void setClosedHandler(NotifyClosedHandler handler)
handler
- public final void setIconType(NotifyIconType iconType)
NotifyIconType.CLASS
.iconType
- the icon typeNotifyIconType
public final void setTemplate(String html)
html
- Custom HTML templateat: http://bootstrap-notify.remabledesigns.com/
public final void makeDefault()
Copyright © 2017. All rights reserved.