Examples of JSONString


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

 
  void drawNetworkOffline() {

    JSONObject n1 = new JSONObject();
    n1.put("id", new JSONNumber(1));
    n1.put("text", new JSONString("Node 1"));

    JSONObject n2 = new JSONObject();
    n2.put("id", new JSONNumber(2));
    n2.put("text", new JSONString("Node 2"));

    JSONObject n3 = new JSONObject();
    n3.put("id", new JSONNumber(3));
    n3.put("text", new JSONString("Node 3"));

    JSONArray nodes = new JSONArray();
    nodes.set(0, n1);
    nodes.set(1, n2);
    nodes.set(2, n3);
View Full Code Here

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

  void deletePackageOffline() {
    JSONObject p = new JSONObject();
    p.put("id", new JSONNumber(packageId));
    p.put("from", new JSONNumber(2));
    p.put("to", new JSONNumber(3));
    p.put("action", new JSONString("delete"));

    JSONArray packages = new JSONArray();
    packages.set(0, p);

    network.addPackages(packages.getJavaScriptObject());
View Full Code Here

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

    /**
     * Convert the Object to JSON
     */
    public JSONObject toJSON() {
      JSONObject json = new JSONObject();
      json.put("_uuid", new JSONString(_uuid));
      json.put("_updateSeq", new JSONNumber(_updateSeq));
     
      json.put("name", new JSONString(name));
      json.put("capacity", new JSONNumber(capacity));
      json.put("store", new JSONString(store));
     
      // json.put("_childs", new JSONArray()); // TODO: remove
      return json;
    }   
View Full Code Here

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

    JSONArray data = new JSONArray();
    JSONObject item;
   
    item = new JSONObject();
    item.put("start", new JSONNumber(dateToLong("2010-08-23")));
    item.put("content", new JSONString("<div>Conversation</div><img src='img/comments-icon.png' style='width:32px; height:32px;'>"));
    data.set(data.size(), item);
   
    item = new JSONObject();
    item.put("start", new JSONNumber(datetimeToLong("2010-08-23 23:00:00")));
    item.put("content", new JSONString("<div>Mail from boss</div><img src='img/mail-icon.png' style='width:32px; height:32px;'>"));
    data.set(data.size(), item);

    item = new JSONObject();
    item.put("start", new JSONNumber(datetimeToLong("2010-08-24 16:00:00")));
    item.put("content", new JSONString("Report"));
    data.set(data.size(), item);

    item = new JSONObject();
    item.put("start", new JSONNumber(dateToLong("2010-08-26")));
    item.put("end", new JSONNumber(dateToLong("2010-09-02")));
    item.put("content", new JSONString("Traject A"));
    data.set(data.size(), item);
   
    item = new JSONObject();
    item.put("start", new JSONNumber(dateToLong("2010-08-28")));
    item.put("content", new JSONString("<div>Memo</div><img src='img/notes-edit-icon.png' style='width:48px; height:48px;'>"));
    data.set(data.size(), item);

    item = new JSONObject();
    item.put("start", new JSONNumber(dateToLong("2010-08-29")));
    item.put("content", new JSONString("<div>Phone call</div><img src='img/Hardware-Mobile-Phone-icon.png' style='width:32px; height:32px;'>"));
    data.set(data.size(), item);

    item = new JSONObject();
    item.put("start", new JSONNumber(dateToLong("2010-08-31")));
    item.put("end", new JSONNumber(dateToLong("2010-09-03")));
    item.put("content", new JSONString("Traject B"));
    data.set(data.size(), item);

    item = new JSONObject();
    item.put("start", new JSONNumber(datetimeToLong("2010-09-04 12:00:00")));
    item.put("content", new JSONString("<div>Report</div><img src='img/attachment-icon.png' style='width:32px; height:32px;'>"));
    data.set(data.size(), item);

    return data;
  }
View Full Code Here

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

            // apply the new title
            JSONValue value = data.get(row);
            if (value != null && value.isObject() != null) {
              JSONObject item = value.isObject();

              item.put("content", new JSONString(title));
              timeline.setData(data.getJavaScriptObject());

              String info = "Added event " + String.valueOf(row);
              RootPanel.get("lblInfo").add(new Label(info));
            }
View Full Code Here

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

              Window.prompt("Change the title of this event",
                  content);
 
            if (title != null) {
              // apply the new title
              item.put("content", new JSONString(title));
              timeline.setData(data.getJavaScriptObject());

              String info = "Edited event " + String.valueOf(row);
              RootPanel.get("lblInfo").add(new Label(info));
            }
View Full Code Here

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

      d.setTime(d.getTime() + 1000 * 60); // steps of one minute
    }
   
    JSONObject dataSetA = new JSONObject();
    dataSetA.put("label", new JSONString("Function A"));
    dataSetA.put("data", dataA);
   
    JSONObject dataSetB = new JSONObject();
    dataSetB.put("label", new JSONString("Function B"));
    dataSetB.put("data", dataB);

    Graph.Options options = Graph.Options.create();
    options.setHeight("400px");
    options.setLineStyle(Graph.Options.LINESTYLE.DOT, 1);
View Full Code Here

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

    /**
     * Convert the Object to JSON
     */
    public JSONObject toJSON() {
      JSONObject json = new JSONObject();
      json.put("_uuid", new JSONString(_uuid));
      json.put("_updateSeq", new JSONNumber(_updateSeq));
     
      json.put("name", new JSONString(name));
      json.put("capacity", new JSONNumber(capacity));
      json.put("store", new JSONString(store));
     
      // json.put("_childs", new JSONArray()); // TODO: remove
      return json;
    }   
View Full Code Here

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

  }

  protected void set(int index, String value) {
    JSONValue val = JSONNull.getInstance();
    if (value != null) {
      val = new JSONString(value);
    }
    set(index, val);
  }
View Full Code Here

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

  }

  protected void push(String value) {
    JSONValue val = JSONNull.getInstance();
    if (value != null) {
      val = new JSONString(value);
    }
    set(++m_currentIndex, val);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.