List of usage examples for com.google.gwt.json.client JSONNumber JSONNumber
public JSONNumber(double value)
From source file:com.rcharts.client.styles.Style.java
License:Apache License
public void setStrokeOpacity(double strokeOpacity) { style.put(Keys.STROKE_OPACITY, new JSONNumber(strokeOpacity)); }
From source file:com.rcharts.client.styles.Style.java
License:Apache License
public void setFillOpacity(double fillOpacity) { style.put(Keys.FILL_OPACITY, new JSONNumber(fillOpacity)); }
From source file:com.rcharts.client.styles.Style.java
License:Apache License
public void setRotation(double angle) { style.put(Keys.ROTATION, new JSONNumber(angle)); }
From source file:com.rcharts.client.styles.TextStyle.java
License:Apache License
public void setFontSize(double fontSize) { style.put(Keys.FONT_SIZE, new JSONNumber(fontSize)); }
From source file:com.rednels.ofcgwt.client.model.axis.AbstractAxis.java
License:Open Source License
public JSONValue buildJSON() { JSONObject json = new JSONObject(); if (stroke != null) json.put("stroke", new JSONNumber(stroke)); if (colour != null) json.put("colour", new JSONString(colour)); if (gridColour != null) json.put("grid-colour", new JSONString(gridColour)); if (steps != null) json.put("steps", new JSONNumber(steps.doubleValue())); if (offset != null) json.put("offset", new JSONNumber(offset)); if (zdepth3d != null) json.put("3d", new JSONNumber(zdepth3d)); if (min != null) json.put("min", new JSONNumber(min.doubleValue())); if (max != null) json.put("max", new JSONNumber(max.doubleValue())); return json;//from w w w . j a v a 2 s. c om }
From source file:com.rednels.ofcgwt.client.model.axis.Keys.java
License:Open Source License
public JSONValue buildJSON() { JSONObject json = new JSONObject(); if (text != null) json.put("text", new JSONString(text)); if (colour != null) json.put("colour", new JSONString(colour)); if (fontsize != null) json.put("font-size", new JSONNumber(fontsize)); return json;//from ww w .j ava2 s. c o m }
From source file:com.rednels.ofcgwt.client.model.axis.Label.java
License:Open Source License
public JSONValue buildJSON() { JSONObject json = new JSONObject(); if (text != null) json.put("text", new JSONString(text)); if (colour != null) json.put("colour", new JSONString(colour)); if (size != null) json.put("size", new JSONNumber(size)); if (rotateAngle != null) json.put("rotate", new JSONNumber(rotateAngle)); if (visible != null) json.put("visible", JSONBoolean.getInstance(visible)); return json;/*from w w w .j a va 2s.c om*/ }
From source file:com.rednels.ofcgwt.client.model.axis.XAxis.java
License:Open Source License
public JSONValue buildJSON() { JSONObject json = (JSONObject) super.buildJSON(); if (tickHeight != null) json.put("tick-height", new JSONNumber(tickHeight)); if (labels != null) json.put("labels", labels.buildJSON()); return json;/*from ww w .j a v a 2s . co m*/ }
From source file:com.rednels.ofcgwt.client.model.axis.YAxis.java
License:Open Source License
public JSONValue buildJSON() { JSONObject json = (JSONObject) super.buildJSON(); if (tickLength != null) json.put("tick-length", new JSONNumber(tickLength)); if (logscale != null) json.put("log-scale", JSONBoolean.getInstance(logscale)); if (labels == null) return json; JSONArray ary = new JSONArray(); int index = 0; for (String o : labels) { ary.set(index++, new JSONString(o)); }/*w w w .j a v a2 s .co m*/ if (index != 0) json.put("labels", ary); return json; }
From source file:com.rednels.ofcgwt.client.model.ChartData.java
License:Open Source License
public JSONValue buildJSON() { final JSONObject json = new JSONObject(); if (title != null) json.put("title", title.buildJSON()); if (tooltip != null) json.put("tooltip", tooltip.buildJSON()); if (x_axis != null) json.put("x_axis", x_axis.buildJSON()); if (y_axis != null) json.put("y_axis", y_axis.buildJSON()); if (yaxis_label_style != null) json.put("y_label__label_style", new JSONString(yaxis_label_style)); if (y_axis_right != null) json.put("y_axis_right", y_axis_right.buildJSON()); if (yaxisright_label_style != null) json.put("y_label_2__label_style", new JSONString(yaxisright_label_style)); if (radar_axis != null) json.put("radar_axis", radar_axis.buildJSON()); if (y_legend != null) json.put("y_legend", y_legend.buildJSON()); if (y2_legend != null) json.put("y2_legend", y2_legend.buildJSON()); if (x_legend != null) json.put("x_legend", x_legend.buildJSON()); if (legend != null) json.put("legend", legend.buildJSON()); if (bg_colour != null) json.put("bg_colour", new JSONString(bg_colour)); if (isDecimalSeparatorComma) json.put("is_decimal_separator_comma", new JSONNumber(1)); if (isFixedNumDecimalsForced) json.put("is_fixed_num_decimals_forced", new JSONNumber(1)); if (isThousandSeparatorDisabled) json.put("is_thousand_separator_disabled", new JSONNumber(1)); if (numDecimals != null) json.put("num_decimals", new JSONNumber(numDecimals)); if (elements == null) return json; final JSONArray ary = new JSONArray(); int index = 0; for (final Element e : elements) { ary.set(index++, e.buildJSON()); }//from www. j ava2 s . c o m json.put("elements", ary); return json; }