本文整理汇总了Java中com.google.gwt.core.client.JsArrayString.push方法的典型用法代码示例。如果您正苦于以下问题:Java JsArrayString.push方法的具体用法?Java JsArrayString.push怎么用?Java JsArrayString.push使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.core.client.JsArrayString
的用法示例。
在下文中一共展示了JsArrayString.push方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: add
import com.google.gwt.core.client.JsArrayString; //导入方法依赖的package包/类
/**
* Adds a multi line label
* @param values array ofstring which represents a multi line label
*/
public final void add(String... values){
// checks if is a valid array
if (values != null && values.length > 0){
// creates new JS array
JsArrayString multiValues = JsArrayString.createArray().cast();
// scans values
for(String value: values){
// adds to JS array string
multiValues.push(value);
}
// pushes array to JS array
push(multiValues);
}
}
示例2: getExtensionsToLoad
import com.google.gwt.core.client.JsArrayString; //导入方法依赖的package包/类
public static JsArrayString getExtensionsToLoad() {
JsArrayString result = JsArrayString.createArray().cast();
if (INSTANCE != null) {
for (String s : INSTANCE.extensions) {
result.push(s);
}
}
return result;
}
示例3: glGetUniformIndices
import com.google.gwt.core.client.JsArrayString; //导入方法依赖的package包/类
public static Uint32Array glGetUniformIndices(int program, List<String> uniformNames)
{
JsArrayString arrayString = JsArrayString.createArray(uniformNames.size()).cast();
for (String uniformName : uniformNames)
arrayString.push(uniformName);
return glGetUniformIndices(program, arrayString);
}
示例4: importScripts
import com.google.gwt.core.client.JsArrayString; //导入方法依赖的package包/类
@Override
public final void importScripts(String... urls) {
if(urls.length == 0) {
return;
}
JsArrayString us = JsArray.createArray().cast();
for(String url : urls) {
us.push(url);
}
importScripts0(us);
}
示例5: glTransformFeedbackVaryings
import com.google.gwt.core.client.JsArrayString; //导入方法依赖的package包/类
public static void glTransformFeedbackVaryings(int program, String[] varyings, int bufferMode)
{
JsArrayString varyingsArray = JsArrayString.createArray(varyings.length).cast();
for (String varying : varyings)
varyingsArray.push(varying);
glTransformFeedbackVaryings(program, varyingsArray, bufferMode);
}
示例6: fromStrings
import com.google.gwt.core.client.JsArrayString; //导入方法依赖的package包/类
public static JsArrayString fromStrings(Collection<String> collection) {
JsArrayString array = JsArrayString.createArray().cast();
for(String item : collection) {
array.push(item);
}
return array;
}
示例7: setContentTypes
import com.google.gwt.core.client.JsArrayString; //导入方法依赖的package包/类
public final void setContentTypes(String... theContentTypes) {
JsArrayString arr = JavaScriptObject.createArray().cast();
for (String value : theContentTypes) {
arr.push(value);
}
setContentTypes(arr);
}
示例8: setValues
import com.google.gwt.core.client.JsArrayString; //导入方法依赖的package包/类
@Override
public final void setValues(List<String> values) {
JsArrayString arr = JavaScriptObject.createArray().cast();
for (String value : values) {
arr.push(value);
}
setValues(arr);
}
示例9: setExtension
import com.google.gwt.core.client.JsArrayString; //导入方法依赖的package包/类
public final void setExtension(String... fileExtensions) {
JsArrayString arr = JavaScriptObject.createArray().cast();
for (String value : fileExtensions) {
arr.push(value);
}
setExtension(arr);
}
示例10: setFileName
import com.google.gwt.core.client.JsArrayString; //导入方法依赖的package包/类
public final void setFileName(String... fileNames) {
JsArrayString arr = JavaScriptObject.createArray().cast();
for (String value : fileNames) {
arr.push(value);
}
setFileName(arr);
}
示例11: get
import com.google.gwt.core.client.JsArrayString; //导入方法依赖的package包/类
@Override
public OrionCodeEditWidgetOverlay get() {
if (orionCodeEditWidgetOverlay == null) {
JsArrayString plugins = JavaScriptObject.createArray().cast();
for (OrionPlugin orionPlugin : orionPlugins) {
plugins.push(GWT.getModuleBaseURL() + orionPlugin.getRelPath());
}
OrionCodeEditWidgetOverlay codeEditWidgetModule =
moduleHolder.getModule("CodeEditWidget").cast();
orionCodeEditWidgetOverlay = codeEditWidgetModule.create(plugins);
}
return orionCodeEditWidgetOverlay;
}
示例12: requireScripts
import com.google.gwt.core.client.JsArrayString; //导入方法依赖的package包/类
private void requireScripts(
final RequirejsCallback callback,
final RequirejsErrorHandler errorHandler,
final RequirejsConfig config,
final String[] requiredScripts,
final String[] moduleKeys) {
final JsArrayString jsReqScripts = (JsArrayString) JavaScriptObject.createArray();
for (final String script : requiredScripts) {
jsReqScripts.push(script);
}
Requirejs.config(config)
.require(
jsReqScripts,
new RequirejsCallback() {
@Override
public void onReady(final JsArray<RequirejsModule> result) {
for (int i = 0; i < Math.min(result.length(), moduleKeys.length); i++) {
String itemtoString = "null";
if (result.get(i) != null) {
itemtoString = result.get(i).toString();
}
if (itemtoString.length() > 30) {
itemtoString = itemtoString.substring(0, 27) + "...";
}
Log.debug(
RequireJsLoader.class,
"Add module reference - name=" + moduleKeys[i] + " object=" + itemtoString);
moduleHolder.setModule(moduleKeys[i], result.get(i));
}
callback.onReady(result);
}
},
errorHandler);
}
示例13: createComparisonCharts
import com.google.gwt.core.client.JsArrayString; //导入方法依赖的package包/类
protected void createComparisonCharts() {
for (int i = 0; i < panels.size(); ++i) {
ArrayList<Double> compare = new ArrayList<>();
for (int j = 0; j < dataList.size(); ++j) {
compare.add(dataList.get(j).getValues().get(i));
}
//Window.alert(String.valueOf(i));
PlotModel model = new PlotModel();
PlotOptions plotOptions = PlotOptions.create();
plotOptions.setLegendOptions( LegendOptions.create().setShow(false));
plotOptions.setGridOptions( GridOptions.create().setMargin( 5 ) );
//plotOptions.addXAxisOptions( AxisOptions.create().setFont( FontOptions.create().setColor("black").setWeight( "bold" ).setStyle( "italic" ) ) );
// plotOptions.addYAxisOptions( AxisOptions.create().setFont( FontOptions.create().setColor( "black" ).setWeight( "bold" ).setStyle( "italic" ) ) );
plotOptions.addYAxisOptions( AxisOptions.create().setMaximum(1).setMinimum(0));
plotOptions.addXAxisOptions( AxisOptions.create().setTicks(new AbstractAxisOptions.TickGenerator() {
@Override
public JsArray<Tick> generate(Axis axis) {
JsArray<Tick> array = JsArray.createArray().cast();
for ( int i = 0; i < dataList.size(); i++ )
{
array.push( Tick.of( i, dataList.get(i).getStringDate() ) );
}
return array;
}
}));
// create the plot
SimplePlot plot = new SimplePlot( model, plotOptions );
plot.getModel().addSeries( Series.of( "Exposure" ) );
for ( int j = 0; j < compare.size(); j++ ) {
for ( SeriesHandler series : plot.getModel().getHandlers() ) {
series.add( DataPoint.of( j, compare.get(j) ) );
}
}
JsArrayString colors = JavaScriptObject.createArray().cast();
colors.push(colorsArray[i]);
plotOptions.setDefaultColorTheme(colors);
plot.setHeight("200px");
panels.get(i).setWidget(plot);
}
}
示例14: WebSocket
import com.google.gwt.core.client.JsArrayString; //导入方法依赖的package包/类
public WebSocket(String url, String protocol, WebSocketCallback callback) {
this.callback = callback;
JsArrayString jsProtocols = (JsArrayString) JsArrayString.createArray();
if (protocol != null) {
jsProtocols.push(protocol);
}
this.jsWebSocket = createJSWebSocket(url, jsProtocols, this);
}
示例15: newCm
import com.google.gwt.core.client.JsArrayString; //导入方法依赖的package包/类
@Override
CodeMirror newCm(DiffInfo.FileMeta meta, String contents, Element parent) {
JsArrayString gutters = JavaScriptObject.createArray().cast();
gutters.push(UnifiedTable.style.lineNumbersLeft());
gutters.push(UnifiedTable.style.lineNumbersRight());
return CodeMirror.create(
parent,
Configuration.create()
.set("cursorBlinkRate", prefs.cursorBlinkRate())
.set("cursorHeight", 0.85)
.set("gutters", gutters)
.set("inputStyle", "textarea")
.set("keyMap", "vim_ro")
.set("lineNumbers", false)
.set("lineWrapping", prefs.lineWrapping())
.set("matchBrackets", prefs.matchBrackets())
.set("mode", getFileSize() == FileSize.SMALL ? getContentType(meta) : null)
.set("readOnly", true)
.set("scrollbarStyle", "overlay")
.set("styleSelectedText", true)
.set("showTrailingSpace", prefs.showWhitespaceErrors())
.set("tabSize", prefs.tabSize())
.set("theme", prefs.theme().name().toLowerCase())
.set("value", meta != null ? contents : "")
.set("viewportMargin", renderEntireFile() ? POSITIVE_INFINITY : 10));
}