Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.gwtbootstrap3.extras.growl.client.ui;
  
  /*
   * #%L
   * GwtBootstrap3
   * %%
   * Copyright (C) 2013 - 2014 GwtBootstrap3
   * %%
   * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  * 
  *      http://www.apache.org/licenses/LICENSE-2.0
  * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * #L%
  */
 
 
This class represent instance of displayed Growl.

You can display new Growl using static methods, e.g.: .growl(String), .growl(String, GrowlType), .growl(String, GrowlOptions) and others

To further configure Growl before displaying see: org.gwtbootstrap3.extras.growl.client.ui.GrowlOptions

You can update displayed Growl by: .updateTitle(String), .updateMessage(String), .updateIcon(String), .updateType(GrowlType),

You can hide displayed Growl: .hide(), .hideAll(), .hideAll(GrowlPosition)

Author(s):
jeffisenhart
Sven Jacobs
Joshua Godi
Pavel Zlámal
 
 public class Growl extends JavaScriptObject {
 
     protected Growl() {
     }

    
Display Growl with custom message and default settings.

Parameters:
message Message to set
Returns:
Displayed Growl for update or hiding.
 
     public static final native Growl growl(final String message/*-{
         return $wnd.jQuery.growl({ message: message }, null);
     }-*/;

    
Display Growl with custom title, message and default settings.

Parameters:
title Title to set
message Message to set
Returns:
Displayed Growl for update or hiding.
 
     public static final native Growl growl(final String titlefinal String message/*-{
         return $wnd.jQuery.growl({ title: title, message: message }, null);
     }-*/;

    
Display Growl with custom title, message, icon and default settings.

Parameters:
title Title to set
message Message to set
icon Icon to set
Returns:
Displayed Growl for update or hiding.
 
     public static final native Growl growl(final String titlefinal String messagefinal String icon/*-{
         return $wnd.jQuery.growl({ title: title, message: message, icon: icon }, null);
     }-*/;

    
Display Growl with custom title, message, icon and default settings.

Parameters:
title Title to set
message Message to set
iconType IconType to set
Returns:
Displayed Growl for update or hiding.
    public static final Growl growl(final String titlefinal String messagefinal IconType iconType) {
        return Growl.growl(titlemessage. + " " + iconType.getCssName());
    }

    
Display Growl with custom title, message, icon and default settings.

Parameters:
title Title to set
message Message to set
icon IconType to set
url Url to set
Returns:
Displayed Growl for update or hiding.
    public static final native Growl growl(final String titlefinal String messagefinal String iconfinal String url/*-{
        return $wnd.jQuery.growl({ title: title, message: message, icon: icon, url: url }, null);
    }-*/;

    
Display Growl with custom title, message, icon, url and default settings.

Parameters:
title Title to set
message Message to set
iconType IconType to set
url Url to set
Returns:
Displayed Growl for update or hiding.
    public static final Growl growl(final String titlefinal String messagefinal IconType iconTypefinal String url) {
        return Growl.growl(titlemessage. + " " + iconType.getCssName(), url);
    }

    
Display Growl with custom message, type and default settings.

Parameters:
message Message to set
type GrowlType
Returns:
Displayed Growl for update or hiding.
See also:
GrowlType
    public static final native Growl growl(final String messagefinal GrowlType type/*-{
        return $wnd.jQuery.growl({ message: message }, { type: type.@org.gwtbootstrap3.extras.growl.client.ui.GrowlType::getCssName()() });
    }-*/;

    
Display Growl with custom title, message, type and default settings.

Parameters:
title Title to set
message Message to set
type GrowlType
Returns:
Displayed Growl for update or hiding.
See also:
GrowlType
    public static final native Growl growl(final String titlefinal String messagefinal GrowlType type/*-{
        return $wnd.jQuery.growl({ title: title, message: message }, { type: type.@org.gwtbootstrap3.extras.growl.client.ui.GrowlType::getCssName()() });
    }-*/;

    
Display Growl with custom title, message, icon, type and default settings.

Parameters:
title Title to set
message Message to set
icon Icon to set
type GrowlType
Returns:
Displayed Growl for update or hiding.
See also:
GrowlType
    public static final native Growl growl(final String titlefinal String messagefinal String iconfinal GrowlType type/*-{
        return $wnd.jQuery.growl({ title: title, message: message, icon: icon }, { type: type.@org.gwtbootstrap3.extras.growl.client.ui.GrowlType::getCssName()() });
    }-*/;

    
Display Growl with custom title, message, icon, type and default settings.

Parameters:
title Title to set
message Message to set
iconType IconType to set (css name of icon form FONT AWESOME)
type GrowlType
Returns:
Displayed Growl for update or hiding.
See also:
GrowlType
    public static final Growl growl(final String titlefinal String messagefinal IconType iconTypefinal GrowlType type) {
        return Growl.growl(titlemessage. + " " + iconType.getCssName(), type);
    }

    
Display Growl with custom title, message, icon, url, type and default settings.

Parameters:
title Title to set
message Message to set
icon Icon to set
url Url to set
type GrowlType
Returns:
Displayed Growl for update or hiding.
See also:
GrowlType
    public static final native Growl growl(final String titlefinal String messagefinal String iconfinal String urlfinal GrowlType type/*-{
        return $wnd.jQuery.growl({ title: title, message: message, icon: icon, url: url }, { type: type.@org.gwtbootstrap3.extras.growl.client.ui.GrowlType::getCssName()() });
    }-*/;

    
Display Growl with custom title, message, icon, url, type and default settings.

Parameters:
title Title to set
message Message to set
iconType IconType to set (css name of icon form FONT AWESOME)
url Url to set
type GrowlType
Returns:
Displayed Growl for update or hiding.
See also:
GrowlType
    public static final Growl growl(final String titlefinal String messagefinal IconType iconTypefinal String urlfinal GrowlType type) {
        return Growl.growl(titlemessage. + " " + iconType.getCssName(), urltype);
    }

    
Display Growl with custom message and custom settings.

Parameters:
message Message to set
options custom options
Returns:
Displayed Growl for update or hiding.
See also:
GrowlOptions
    public static final native Growl growl(final String messagefinal GrowlOptions options/*-{
        return $wnd.jQuery.growl({ message: message }, options);
    }-*/;

    
Display Growl with custom title, message and custom settings.

Parameters:
title Title to set
message Message to set
options custom options
Returns:
Displayed Growl for update or hiding.
See also:
GrowlOptions
    public static final native Growl growl(final String titlefinal String messagefinal GrowlOptions options/*-{
        return $wnd.jQuery.growl({ title: title, message: message }, options);
    }-*/;

    
Display Growl with custom title, message, icon and custom settings.

Parameters:
title Title to set
message Message to set
icon Icon to set
options custom options
Returns:
Displayed Growl for update or hiding.
See also:
GrowlOptions
    public static final native Growl growl(final String titlefinal String messagefinal String iconfinal GrowlOptions options/*-{
        return $wnd.jQuery.growl({ title: title, message: message, icon: icon }, options);
    }-*/;

    
Display Growl with custom title, message, icon and custom settings.

Parameters:
title Title to set
message Message to set
iconType IconType to set (css name of icon form FONT AWESOME)
options custom options
Returns:
Displayed Growl for update or hiding.
See also:
GrowlOptions
    public static final Growl growl(final String titlefinal String messagefinal IconType iconTypefinal GrowlOptions options) {
        return Growl.growl(titlemessage. + " " + iconType.getCssName(), options);
    }

    
Display Growl with custom title, message, icon, URL and custom settings.

Parameters:
title Title to set
message Message to set
icon Icon to set
url Url to set
options custom options
Returns:
Displayed Growl for update or hiding.
See also:
GrowlOptions
    public static final native Growl growl(final String titlefinal String messagefinal String iconfinal String urlfinal GrowlOptions options/*-{
        return $wnd.jQuery.growl({ title: title, message: message, icon: icon, url: url}, options);
    }-*/;

    
Display Growl with custom title, message, icon, URL and custom settings.

Parameters:
title Title to set
message Message to set
iconType IconType to set
url Url to set
options custom options
Returns:
Displayed Growl for update or hiding.
See also:
GrowlOptions
    public static final Growl growl(final String titlefinal String messagefinal IconType iconTypefinal String urlfinal GrowlOptions options) {
        return Growl.growl(titlemessage. + " " + iconType.getCssName(), urloptions);
    }

    
Hide all displayed Growls.
    public static final void hideAll() {
        hideAllGrowls(null);
    }

    
Hide all displayed Growls on specific screen location.

Parameters:
position Growls position on screen.
See also:
GrowlPosition
    public static final void hideAll(GrowlPosition position) {
        if (position != null) {
            hideAllGrowls(position.getPosition());
        }
    }

    
Hide all displayed Growls, optionally only on specified position.

Parameters:
position
    private static final native void hideAllGrowls(String position/*-{
        if (position !== null) {
            $wnd.jQuery.growl(false, {
                command: 'closeAll',
                position: position
            });
        } else {
            $wnd.jQuery.growl(false, {
                command: 'closeAll'
            });
        }
    }-*/;

    
Updates title parameter of once displayed Growl.

Parameters:
title Title to set
    public final native void updateTitle(String title/*-{
        this.update('title', title);
    }-*/;

    
Updates message parameter of once displayed Growl.

Parameters:
message Message to set
    public final native void updateMessage(String message/*-{
        this.update('message', message);
    }-*/;

    
Updates Icon parameter of once displayed Growl.

Parameters:
icon Icon to set
    public final native void updateIcon(String icon/*-{
        this.update('icon', icon);
    }-*/;

    
Updates Icon parameter of once displayed Growl. This method is shortcut when using FONT AWESOME iconic font.

Parameters:
type IconType to get CSS class name to set
    public final void updateIcon(final IconType type) {
        if (type != nullupdateIcon(. + " " + type.getCssName());
    }

    
Update type of once displayed Growl (CSS style class name).

Parameters:
type one of INFO, WARNING, DANGER, SUCCESS
See also:
GrowlType
    public final void updateType(final GrowlType type) {
        if (type != null) {
            updateType(type.getCssName());
        }
    }

    
Update type of once displayed Growl (CSS style class name). Resulting class name to use is "alert-[type]".

Parameters:
type CSS class name to set
    private final native void updateType(String type/*-{
        this.update('type', type);
    }-*/;

    
Hide this Growl.
    public final native void hide() /*-{
        this.close();
    }-*/;
New to GrepCode? Check out our FAQ X