本文整理汇总了Java中org.gwtbootstrap3.extras.notify.client.constants.NotifyType类的典型用法代码示例。如果您正苦于以下问题:Java NotifyType类的具体用法?Java NotifyType怎么用?Java NotifyType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
NotifyType类属于org.gwtbootstrap3.extras.notify.client.constants包,在下文中一共展示了NotifyType类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: notifySuccess
import org.gwtbootstrap3.extras.notify.client.constants.NotifyType; //导入依赖的package包/类
public static void notifySuccess(String message, int delay) {
NotifySettings settings = NotifySettings.newSettings();
settings.setType(NotifyType.SUCCESS);
settings.setDelay(delay);
settings.setAllowDismiss(false);
Notify.notify("", message, IconType.SMILE_O, settings);
}
示例2: notifyFailure
import org.gwtbootstrap3.extras.notify.client.constants.NotifyType; //导入依赖的package包/类
public static void notifyFailure(String message) {
NotifySettings settings = NotifySettings.newSettings();
settings.setType(NotifyType.DANGER);
settings.setAllowDismiss(false);
GWT.log("Error: "+message);
Notify.notify("", message, IconType.WARNING, settings);
}
示例3: showError
import org.gwtbootstrap3.extras.notify.client.constants.NotifyType; //导入依赖的package包/类
@Override
public SessionPresenterView showError(final String message) {
settings.setType(NotifyType.DANGER);
showNotification("Error",
buildHtmlEscapedText(message),
IconType.CLOSE);
return this;
}
示例4: showWarning
import org.gwtbootstrap3.extras.notify.client.constants.NotifyType; //导入依赖的package包/类
@Override
public SessionPresenter.View showWarning(final String message) {
settings.setType(NotifyType.WARNING);
showNotification("Warning",
buildHtmlEscapedText(message),
IconType.CLOSE);
return this;
}
示例5: showMessage
import org.gwtbootstrap3.extras.notify.client.constants.NotifyType; //导入依赖的package包/类
@Override
public SessionPresenterView showMessage(final String message) {
settings.setType(NotifyType.SUCCESS);
showNotification("Info",
buildHtmlEscapedText(message),
IconType.STICKY_NOTE);
return this;
}
示例6: setType
import org.gwtbootstrap3.extras.notify.client.constants.NotifyType; //导入依赖的package包/类
/**
* Set type of Notify (CSS style class name). Default is INFO.
*
* @param type one of INFO, WARNING, DANGER, SUCCESS
* @see NotifyType
*/
public final void setType(final NotifyType type) {
setType((type != null) ? type.getCssName() : NotifyType.INFO.getCssName());
}
示例7: notify
import org.gwtbootstrap3.extras.notify.client.constants.NotifyType; //导入依赖的package包/类
/**
* Display Notify with custom message, type and default settings.
*
* @param message Message to set
* @param type NotifyType
* @return Displayed Notify for update or hiding.
* @see org.gwtbootstrap3.extras.notify.client.constants.NotifyType
*/
public static final native Notify notify(final String message, final NotifyType type) /*-{
return $wnd.jQuery.notify({ message: message }, { type: [email protected]e::getCssName()() });
}-*/;
示例8: updateType
import org.gwtbootstrap3.extras.notify.client.constants.NotifyType; //导入依赖的package包/类
/**
* Update type of once displayed Notify (CSS style class name).
*
* @param type one of INFO, WARNING, DANGER, SUCCESS
* @see org.gwtbootstrap3.extras.notify.client.constants.NotifyType
*/
public final void updateType(final NotifyType type) {
if (type != null) {
updateType(type.getCssName());
}
}