Package com.google.gwt.json.client

Examples of com.google.gwt.json.client.JSONNumber


   public void setErrorManagementType(
         int type,
         ServerRequestCallback<Void> requestCallback)
   {
      JSONArray params = new JSONArray();
      params.set(0, new JSONNumber(type));
     
      sendRequest(RPC_SCOPE,
            SET_ERROR_MANAGEMENT_TYPE,
            params,
            requestCallback);
View Full Code Here


   @Override
   public void setShinyViewerType(int viewerType,
         ServerRequestCallback<Void> requestCallback)
   {
      JSONArray params = new JSONArray();
      params.set(0, new JSONNumber(viewerType));
      sendRequest(RPC_SCOPE,
            SET_SHINY_VIEWER_TYPE,
            params,
            requestCallback);
   }
View Full Code Here

                         boolean asTempfile, boolean asShiny,
         ServerRequestCallback<Boolean> requestCallback)
   {
      JSONArray params = new JSONArray();
      params.set(0, new JSONString(file));
      params.set(1, new JSONNumber(line));
      params.set(2, new JSONString(StringUtil.notNull(format)));
      params.set(3, new JSONString(encoding));
      params.set(4, JSONBoolean.getInstance(asTempfile));
      params.set(5, JSONBoolean.getInstance(asShiny));
      sendRequest(RPC_SCOPE,
View Full Code Here

         sourceWindow_ = null;
      if (clientId != null)
         clientId_ = new JSONString(clientId);
      else
         clientId_ = null;
      clientVersion_ = new JSONNumber(clientVersion);
   }
View Full Code Here

  public JSONObject toJson() {
    JSONObject jso = new JSONObject();
    jso.put( "fullPath", new JSONString( fullPath ) );
    if ( lastUse != null ) {
      jso.put( "title", new JSONString( title ) );
      jso.put( "lastUse", new JSONNumber( lastUse ) );
    }
    return jso;
  }
View Full Code Here

  public JSONObject toJson() {
    JSONObject jso = new JSONObject();
    jso.put( "fullPath", new JSONString( fullPath ) );
    jso.put( "title", new JSONString( title ) );
    jso.put( "lastUse", new JSONNumber( lastUse ) );
    return jso;
  }
View Full Code Here

  }

  protected JSONObject getJsonSimpleTrigger( int repeatCount, int interval, Date startDate, Date endDate ) {
    JSONObject trigger = new JSONObject();
    trigger.put( "uiPassParam", new JSONString( scheduleEditorWizardPanel.getScheduleType().name() ) ); //$NON-NLS-1$
    trigger.put( "repeatInterval", new JSONNumber( interval ) ); //$NON-NLS-1$
    trigger.put( "repeatCount", new JSONNumber( repeatCount ) ); //$NON-NLS-1$
    addJsonStartEnd( trigger, startDate, endDate );
    return trigger;
  }
View Full Code Here

        /* PentahoSessionHolder.getSession().getName() */"admin" + ":" + duration; //$NON-NLS-1$ //$NON-NLS-2$

    // Add blockout specific parameters
    JSONObject addBlockoutParams = schedule;
    addBlockoutParams.put( "jobName", new JSONString( blockoutPeriodName ) ); //$NON-NLS-1$
    addBlockoutParams.put( "duration", new JSONNumber( duration ) ); //$NON-NLS-1$
    addBlockoutParams.put( "timeZone", new JSONString( scheduleEditorWizardPanel.getTimeZone() ) );

    try {
      addBlockoutPeriodRequest.sendRequest( addBlockoutParams.toString(), new RequestCallback() {
        @Override
View Full Code Here

    JSONObject fileCoverage =
        coverage.get("com/google/gwt/dev/js/client/CoverageTestModule.java").isObject();
    assertNotNull(fileCoverage);
    for (Map.Entry<String, Double> lineCoverage : EXPECTED_COVERAGE.entrySet()) {
      assertTrue(fileCoverage.containsKey(lineCoverage.getKey()));
      JSONNumber value = fileCoverage.get(lineCoverage.getKey()).isNumber();
      assertNotNull(value);
      assertEquals(lineCoverage.getValue(), value.doubleValue(), 0.0001);
    }
  }
View Full Code Here

        }
        else if (k.equals(NUMERIC_VALUE)) {
          if (parent != null) {
            if (obj.get(k).isString() != null) {
              String numValue = obj.get(k).isString().stringValue();
              parent.put(key, new JSONNumber(Double.parseDouble(numValue)));
            }
            else {
              parent.put(key, obj.get(k));
            }
          }
        }
        else if (k.equals(QUALIFIED_VALUE)) {
          if (parent != null) {
            if (encType.isString().stringValue().equals("java.util.Date")) {
              String dateValue = obj.get(k).isString().stringValue();
              parent.put(key, new JSONNumber(Double.parseDouble(dateValue)));
            }
            else {
              parent.put(key, obj.get(k));
            }
          }
View Full Code Here

TOP

Related Classes of com.google.gwt.json.client.JSONNumber

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.