Package com.google.gwt.core.client

Examples of com.google.gwt.core.client.JavaScriptObject


    if (removeListeners == null) {
      removeListeners = new ListenerCollection<RemoveListener>();
    }

    JavaScriptObject removeEventHandles[] = {EVENT_IMPL.addListenerVoid(
        jsoPeer, MapEvent.REMOVE, new VoidCallback() {
          @Override
          public void callback() {
            listener.onRemove(Marker.this);
          }
View Full Code Here


  @Deprecated
  public void addVisibilityListener(final VisibilityListener listener) {
    if (visibilityListeners == null) {
      visibilityListeners = new ListenerCollection<VisibilityListener>();
    }
    JavaScriptObject visibilityEventHandles[] = {EVENT_IMPL.addListener(
        jsoPeer, MapEvent.VISIBILITYCHANGED, new BooleanCallback() {
          @Override
          public void callback(boolean isVisible) {
            listener.onVisibilityChanged(Marker.this, isVisible);
          }
View Full Code Here

    }

    @Override
    protected void init() {
        if (!inited) {
            JavaScriptObject eventDispatcherMapExtensions = JavaScriptObject
                    .createObject();
            JavaScriptObject captureEventDispatcherMapExtensions = JavaScriptObject
                    .createObject();
            for (EventType e : EventType.values()) {
                addEventDispatcher(e.getNativeEventName(),
                        eventDispatcherMapExtensions);
                getPointerEventCaptureDispatchers(e.getNativeEventName(),
View Full Code Here

    public void init() {
        connector.addStateChangeHandler(new StateChangeHandler() {
            @Override
            public void onStateChanged(StateChangeEvent stateChangeEvent) {
                JavaScriptObject wrapper = getConnectorWrapper();
                JavaScriptConnectorState state = getConnectorState();

                for (String callback : state.getCallbackNames()) {
                    ensureCallback(JavaScriptConnectorHelper.this, wrapper,
                            callback);
                }

                for (Entry<String, Set<String>> entry : state
                        .getRpcInterfaces().entrySet()) {
                    String rpcName = entry.getKey();
                    String jsName = getJsInterfaceName(rpcName);
                    if (!rpcObjects.containsKey(jsName)) {
                        Set<String> methods = entry.getValue();
                        rpcObjects.put(jsName,
                                createRpcObject(rpcName, methods));

                        // Init all methods for wildcard rpc
                        for (String method : methods) {
                            JavaScriptObject wildcardRpcObject = rpcObjects
                                    .get("");
                            Set<String> interfaces = rpcMethods.get(method);
                            if (interfaces == null) {
                                interfaces = new HashSet<String>();
                                rpcMethods.put(method, interfaces);
View Full Code Here

    private static String getJsInterfaceName(String rpcName) {
        return rpcName.replace('$', '.');
    }

    protected JavaScriptObject createRpcObject(String iface, Set<String> methods) {
        JavaScriptObject object = JavaScriptObject.createObject();

        for (String method : methods) {
            attachRpcMethod(object, iface, method);
        }
View Full Code Here

        String method = invocation.getMethodName();
        if ("com.vaadin.ui.JavaScript$JavaScriptCallbackRpc".equals(iface)
                && "call".equals(method)) {
            String callbackName = parametersJson.get(0).isString()
                    .stringValue();
            JavaScriptObject arguments = parametersJson.get(1).isArray()
                    .getJavaScriptObject();
            invokeCallback(getConnectorWrapper(), callbackName, arguments);
        } else {
            JavaScriptObject arguments = parametersJson.getJavaScriptObject();
            invokeJsRpc(rpcMap, iface, method, arguments);
            // Also invoke wildcard interface
            invokeJsRpc(rpcMap, "", method, arguments);
        }
    }
View Full Code Here

            }

            path = PARENTCHILD_SEPARATOR + "domChild[" + childIndex + "]"
                    + path;

            JavaScriptObject parent = e.getParentElement();
            if (parent == null) {
                return null;
            }
            // The parent check is a work around for Firefox 15 which fails to
            // compare elements properly (#9534)
            if (parent == baseElement) {
                break;
            }

            e = parent.cast();
        }

        return path;
    }
View Full Code Here

   * returns the current value of the start Date
   *
   * @return {Date} start A Date object
   */
  public DateRange getVisibleChartRange() {
    JavaScriptObject jso = getJso();
    Date start = new Date((long) nativeGetStart(jso));
    Date end = new Date((long) nativeGetEnd(jso));
    return new DateRange(start, end);
  }
View Full Code Here

   * returns the current value of the start Date
   *
   * @return {Date} start A Date object
   */
  public DateRange getVisibleChartRange() {
    JavaScriptObject jso = getJso();
    Date start = new Date((long) nativeGetStart(jso));
    Date end = new Date((long) nativeGetEnd(jso));
    return new DateRange(start, end);
  }
View Full Code Here

   * returns the current value of the start Date
   *
   * @return {Date} start A Date object
   */
  public DateRange getVisibleChartRange() {
    JavaScriptObject jso = getJso();
    Date start = new Date((long) nativeGetStart(jso));
    Date end = new Date((long) nativeGetEnd(jso));
    return new DateRange(start, end);
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.core.client.JavaScriptObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.