本文整理匯總了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));
}