Example usage for com.google.gwt.user.client Window alert

List of usage examples for com.google.gwt.user.client Window alert

Introduction

In this page you can find the example usage for com.google.gwt.user.client Window alert.

Prototype

public static void alert(String msg) 

Source Link

Usage

From source file:com.ait.toolkit.editors.ckeditor.client.CKEditor.java

License:Open Source License

/**
 * Set the focus natively if ckEditor is attached, alerts you if it's not
 * the case./*from  w w  w. j a v a  2  s .c  o  m*/
 * 
 * @param focus
 */
public void setFocus(boolean focus) {
    if (replaced == true) {
        setNativeFocus(focus);
    } else {
        Window.alert("You can't set the focus on startup with the method setFocus(boolean focus).\n"
                + "If you want to add focus to your instance on startup, use the config object\n"
                + "with the method setFocusOnStartup(boolean focus) instead.");
    }
}

From source file:com.ait.toolkit.sencha.touch.client.core.ConfigurableTouchEntryPoint.java

License:Open Source License

protected void initTouchNative() {
    final double endTime = System.currentTimeMillis() + MAX_TIME_TO_WAIT;
    new Timer() {
        @Override/*from   w  w w .  ja  v  a2 s . com*/
        public void run() {
            if (isDeviceReady()) {
                initTouch();
                return;
            } else {
                if (System.currentTimeMillis() - endTime > 0) {
                    Window.alert(message);
                    return;
                } else {
                    schedule(TICK);
                }
            }
        }
    }.schedule(TICK);
}

From source file:com.akanoo.client.atmosphere.CometListener.java

License:Apache License

@SuppressWarnings("unused")
public void initialize() {
    if (initialized)
        return;//from ww w.  jav a 2  s. co m

    if (!WebSocketCometTransport.hasWebSocketSupport() && ENFORCE_WEBSOCKET) {
        Window.alert(messages.webSocketSupportMissingAlert());
        return;
    }

    MyCometListener cometListener = new MyCometListener();

    AtmosphereGWTSerializer serializer = GWT.create(StringSerializer.class);
    // set a small length parameter to force refreshes
    // normally you should remove the length parameter
    String url = Akanoo.getAtmosphereUrl();

    client = new AtmosphereClient(url, serializer, cometListener, SUPPORT_WEBSOCKET);
    client.start();

    initialized = true;
}

From source file:com.akanoo.client.views.HeaderView.java

License:Apache License

@Override
public void alertCanvasDeleted() {
    Window.alert(messages.canvasNoLongerAvailableMessage());
}

From source file:com.akanoo.client.views.SharingPopupView.java

License:Apache License

@Override
public void alertInvalidEmail() {
    Window.alert(messages.invalidEmailMessage());
}

From source file:com.akanoo.client.views.SharingPopupView.java

License:Apache License

@Override
public void alertDuplicateEmail() {
    Window.alert(messages.duplicateEmailMessage());
}

From source file:com.akolchin.stmg.client.application.widget.header.HeaderPresenter.java

License:Apache License

@Override
public void onTestClick() {
    Window.alert("The Presenter says Hi test");
}

From source file:com.allen_sauer.gwt.dnd.client.util.DOMUtil.java

License:Apache License

/**
 * Report a fatal exception via <code>Window.alert()</code> than throw a
 * <code>RuntimeException</code>.
 * //  ww  w  .  j  av a 2 s.  co m
 * @param msg the message to report
 * @throws RuntimeException a new exception based on the provided message
 */
public static void reportFatalAndThrowRuntimeException(String msg) throws RuntimeException {
    msg = "gwt-dnd warning: " + msg;
    Window.alert(msg);
    throw new RuntimeException(msg);
}

From source file:com.allen_sauer.gwt.log.client.impl.LogImplBase.java

License:Apache License

@Override
public void init() {
    addLogger((Logger) GWT.create(GWTLogger.class));
    addLogger((Logger) GWT.create(SystemLogger.class));
    addLogger((Logger) GWT.create(ConsoleLogger.class));

    // GWT hacking may prevent the DOM/UI from working properly
    try {//from   www .  j  av a2 s. c  om
        addLogger((Logger) GWT.create(DivLogger.class));
    } catch (Throwable ex) {
        Window.alert("WARNING: Unable to instantiate '" + DivLogger.class + "' due to " + ex.toString());
    }

    // GWT hacking may prevent the DOM/UI from working properly
    try {
        addLogger((Logger) GWT.create(WindowLogger.class));
    } catch (Throwable ex) {
        Window.alert("WARNING: Unable to instantiate '" + WindowLogger.class + "' due to " + ex.toString());
    }

    // notify loggers
    setCurrentLogLevelLoggers(getRequestedRuntimeLogLevel());

    clear();
}

From source file:com.allen_sauer.gwt.log.client.impl.LogImplBase.java

License:Apache License

private int setCurrentLogLevelLoggers(int level) {
    if (level < getLowestLogLevel()) {
        Window.alert("Unable to lower runtime log level to " + level + " due to compile time minimum of "
                + getLowestLogLevel());/*from   ww w  . j a  va2  s.com*/
        level = getLowestLogLevel();
    }

    remoteLogger.loggersSetCurrentLogLevel(level);
    return level;
}