List of usage examples for com.google.gwt.json.client JSONNumber JSONNumber
public JSONNumber(double value)
From source file:org.rstudio.studio.client.server.remote.RemoteServer.java
License:Open Source License
public void getHelpAtCursor(String line, int cursorPos, ServerRequestCallback<Void> requestCallback) { JSONArray params = new JSONArray(); params.set(0, new JSONString(line)); params.set(1, new JSONNumber(cursorPos)); sendRequest(RPC_SCOPE, GET_HELP_AT_CURSOR, params, requestCallback); }
From source file:org.rstudio.studio.client.server.remote.RemoteServer.java
License:Open Source License
public void getHelp(String topic, String packageName, int options, ServerRequestCallback<HelpInfo> requestCallback) { JSONArray params = new JSONArray(); params.set(0, new JSONString(topic)); if (packageName != null) params.set(1, new JSONString(packageName)); else/*w w w. j ava 2 s . co m*/ params.set(1, JSONNull.getInstance()); params.set(2, new JSONNumber(options)); sendRequest(RPC_SCOPE, GET_HELP, params, requestCallback); }
From source file:org.rstudio.studio.client.server.remote.RemoteServer.java
License:Open Source License
public void showHelpTopic(String what, String from, int type) { JSONArray params = new JSONArray(); params.set(0, new JSONString(what)); params.set(1, from != null ? new JSONString(from) : JSONNull.getInstance()); params.set(2, new JSONNumber(type)); sendRequest(RPC_SCOPE, SHOW_HELP_TOPIC, params, null); }
From source file:org.rstudio.studio.client.server.remote.RemoteServer.java
License:Open Source License
public void savePlotAs(FileSystemItem file, String format, int width, int height, boolean overwrite, ServerRequestCallback<Bool> requestCallback) { JSONArray params = new JSONArray(); params.set(0, new JSONString(file.getPath())); params.set(1, new JSONString(format)); params.set(2, new JSONNumber(width)); params.set(3, new JSONNumber(height)); params.set(4, JSONBoolean.getInstance(overwrite)); sendRequest(RPC_SCOPE, SAVE_PLOT_AS, params, requestCallback); }
From source file:org.rstudio.studio.client.server.remote.RemoteServer.java
License:Open Source License
public void savePlotAsPdf(FileSystemItem file, double widthInches, double heightInches, boolean useCairoPdf, boolean overwrite, ServerRequestCallback<Bool> requestCallback) { JSONArray params = new JSONArray(); params.set(0, new JSONString(file.getPath())); params.set(1, new JSONNumber(widthInches)); params.set(2, new JSONNumber(heightInches)); params.set(3, JSONBoolean.getInstance(useCairoPdf)); params.set(4, JSONBoolean.getInstance(overwrite)); sendRequest(RPC_SCOPE, SAVE_PLOT_AS_PDF, params, requestCallback); }
From source file:org.rstudio.studio.client.server.remote.RemoteServer.java
License:Open Source License
public void copyPlotToClipboardMetafile(int width, int height, ServerRequestCallback<Void> requestCallback) { JSONArray params = new JSONArray(); params.set(0, new JSONNumber(width)); params.set(1, new JSONNumber(height)); sendRequest(RPC_SCOPE, COPY_PLOT_TO_CLIPBOARD_METAFILE, params, requestCallback); }
From source file:org.rstudio.studio.client.server.remote.RemoteServer.java
License:Open Source License
@Override public void copyPlotToCocoaPasteboard(int width, int height, ServerRequestCallback<Void> requestCallback) { JSONArray params = new JSONArray(); params.set(0, new JSONNumber(width)); params.set(1, new JSONNumber(height)); sendRequest(RPC_SCOPE, COPY_PLOT_TO_COCOA_PASTEBOARD, params, requestCallback); }
From source file:org.rstudio.studio.client.server.remote.RemoteServer.java
License:Open Source License
public void manipulatorPlotClicked(int x, int y, ServerRequestCallback<Void> requestCallback) { JSONArray params = new JSONArray(); params.set(0, new JSONNumber(x)); params.set(1, new JSONNumber(y)); sendRequest(RPC_SCOPE, MANIPULATOR_PLOT_CLICKED, params, requestCallback); }
From source file:org.rstudio.studio.client.server.remote.RemoteServer.java
License:Open Source License
public void saveDocumentDiff(String id, String path, String fileType, String encoding, String foldSpec, String replacement, int offset, int length, String hash, ServerRequestCallback<String> requestCallback) { JSONArray params = new JSONArray(); params.set(0, new JSONString(id)); params.set(1, path == null ? JSONNull.getInstance() : new JSONString(path)); params.set(2, fileType == null ? JSONNull.getInstance() : new JSONString(fileType)); params.set(3, encoding == null ? JSONNull.getInstance() : new JSONString(encoding)); params.set(4, new JSONString(StringUtil.notNull(foldSpec))); params.set(5, new JSONString(replacement)); params.set(6, new JSONNumber(offset)); params.set(7, new JSONNumber(length)); params.set(8, new JSONString(hash)); sendRequest(RPC_SCOPE, SAVE_DOCUMENT_DIFF, params, requestCallback); }
From source file:org.rstudio.studio.client.server.remote.RemoteServer.java
License:Open Source License
public void getHistoryItems(long startIndex, // inclusive long endIndex, // exclusive ServerRequestCallback<RpcObjectList<HistoryEntry>> requestCallback) { JSONArray params = new JSONArray(); params.set(0, new JSONNumber(startIndex)); params.set(1, new JSONNumber(endIndex)); sendRequest(RPC_SCOPE, GET_HISTORY_ITEMS, params, requestCallback); }