Package com.dubture.getcomposer.core.entities

Examples of com.dubture.getcomposer.core.entities.JsonValue


    if (filterItem.isChecked()) {
      downloadButton.setSelection(true);
    }

    GridDataFactory.swtDefaults().align(SWT.BEGINNING, SWT.CENTER).span(1, 2).applyTo(downloadButton);
    JsonValue downloads = item.get("downloads");
    JsonValue favorites = item.get("favers");
    if (downloads != null && favorites != null) {
      Number number = downloads.getAsNumber();
      DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(new Locale("en_US"));
      DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols();
      symbols.setGroupingSeparator(' ');
      downloadButton.setText(formatter.format(number));
      downloadButton.setImage(ComposerUIPluginImages.DOWNLOAD.createImage());
      favorButton.setText("" + favorites.getAsNumber());
    }

    versionCombo = new Combo(this, SWT.READ_ONLY);
   
    GridDataFactory.fillDefaults().align(SWT.END, SWT.CENTER).span(1, 2).hint(200, SWT.DEFAULT).applyTo(versionCombo);
View Full Code Here


   *            the property
   * @return the value
   */
  public JsonArray getAsArray(String property) {
    if (!super.has(property)) {
      super.set(property, new JsonValue(new JsonArray()), false);
    }
    return get(property).getAsArray();
  }
View Full Code Here

   *            the property
   * @return the value as entity
   */
  public JsonObject getAsObject(String property) {
    if (!super.has(property)) {
      super.set(property, new JsonValue(new JsonObject()), false);
    }
    return get(property).getAsObject();
  }
View Full Code Here

   *            the property
   * @param value
   *            the new value
   */
  public void set(String property, Object value) {
    super.set(property, new JsonValue(value));
  }
View Full Code Here

   *            the property
   * @return the value
   */
  public JsonArray getAsArray(String property) {
    if (!has(property)) {
      super.set(property, new JsonValue(new JsonArray()), false);
    }
    return get(property).getAsArray();
  }
View Full Code Here

   *            the property
   * @return the value as entity
   */
  public JsonObject getAsObject(String property) {
    if (!has(property)) {
      super.set(property, new JsonValue(new JsonObject()), false);
    }
    return get(property).getAsObject();
  }
View Full Code Here

   *            the property
   * @param value
   *            the new value
   */
  public void set(String property, Object value) {
    super.set(property, new JsonValue(value));
  }
View Full Code Here

TOP

Related Classes of com.dubture.getcomposer.core.entities.JsonValue

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.