当前位置: 首页>>代码示例>>Java>>正文


Java JsArrayInteger.push方法代码示例

本文整理汇总了Java中com.google.gwt.core.client.JsArrayInteger.push方法的典型用法代码示例。如果您正苦于以下问题:Java JsArrayInteger.push方法的具体用法?Java JsArrayInteger.push怎么用?Java JsArrayInteger.push使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.core.client.JsArrayInteger的用法示例。


在下文中一共展示了JsArrayInteger.push方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getStyle

import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
public static JSObject getStyle(VectorStyleDef def) {

		String fillColor = def.getFill().getNormalColor();
		Double fillOpacity = def.getFill().getOpacity();
		String strokeColor = def.getLine().getNormalColor();
		Double strokeWidth = new Double(def.getLine().getThickness());
		
		JSObject styleObject = JSObject.createJSObject();
		styleObject.setProperty(FILL_NAME, true);
		styleObject.setProperty(FILL_COLOR_NAME, fillColor);
		styleObject.setProperty(FILL_OPACITY_NAME, fillOpacity);
		styleObject.setProperty(STROKE_COLOR_NAME, strokeColor);
		styleObject.setProperty(STROKE_WIDTH_NAME, strokeWidth);
		styleObject.setProperty(RADIUS_NAME, RADIUS_VALUE);
		
		
		//icon
		String iconUrl = def.getPoint().getExternalGraphic();
		if (iconUrl != null) {
			JSObject iconObject = JSObject.createJSObject();
			iconObject.setProperty(ICON_URL_NAME, iconUrl);
			JsArrayInteger iconSize = JSObject.createArray().cast();
			
			iconSize.push(def.getPoint().getGraphicWidth());
			iconSize.push(def.getPoint().getGraphicHeight());
			
			JSObject iconSizeObject = iconSize.cast();
			
			iconObject.setProperty(ICON_SIZE_NAME, iconSizeObject);	
			
			styleObject.setProperty(ICON_NAME, iconObject);
		}
						
		return styleObject;
	}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:36,代码来源:LeafletStyle.java

示例2: toIntegerArray

import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
static JsArrayInteger toIntegerArray(int... javaArray) {
  JsArrayInteger jsArray = JavaScriptObject.createArray().cast();
  for (int integer : javaArray) {
    jsArray.push(integer);
  }
  return jsArray;
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:8,代码来源:JsUtil.java

示例3: convert

import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
@Override
public JsMessage convert(Message value) {
    JsMessenger messenger = JsMessenger.getInstance();

    String rid = value.getRid() + "";
    String sortKey = value.getSortDate() + "";

    JsPeerInfo sender = messenger.buildPeerInfo(Peer.user(value.getSenderId()));
    boolean isOut = value.getSenderId() == messenger.myUid();
    boolean isOnServer = value.isOnServer();
    String date = messenger.getFormatter().formatTime(value.getDate());
    JsDate fullDate = JsDate.create(value.getDate());

    JsContent content = JsContent.createContent(value.getContent(),
            value.getSenderId());

    JsArray<JsReaction> reactions = JsArray.createArray().cast();

    for (Reaction r : value.getReactions()) {
        JsArrayInteger uids = (JsArrayInteger) JsArrayInteger.createArray();
        boolean isOwnSet = false;
        for (Integer i : r.getUids()) {
            uids.push(i);
            if (i == messenger.myUid()) {
                isOwnSet = true;
            }
        }
        reactions.push(JsReaction.create(r.getCode(), uids, isOwnSet));
    }
    double sortDate = value.getDate() / 1000.0;
    return create(rid, sortKey, sender, isOut, date, fullDate, Enums.convert(value.getMessageState()), isOnServer, content,
            reactions, sortDate);
}
 
开发者ID:wex5,项目名称:dangchat-sdk,代码行数:34,代码来源:JsMessage.java

示例4: glDrawBuffersWEBGL

import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
public static void glDrawBuffersWEBGL(int... buffers)
{
    JsArrayInteger array = JsArrayInteger.createArray(buffers.length).cast();

    for (int buffer : buffers)
        array.push(buffer);

    glDrawBuffersWEBGL(array);
}
 
开发者ID:sriharshachilakapati,项目名称:WebGL4J,代码行数:10,代码来源:WEBGL_draw_buffers.java

示例5: play

import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
void play() {
    int i;
    JsArrayInteger arr = (JsArrayInteger)JsArrayInteger.createArray();
    int ct = dataPtr;
    int base = 0;
    if (dataFull) {
	ct = dataCount;
	base = dataPtr;
    }
    if (ct * sampleStep < .05) {
	Window.alert("Audio data is not ready yet.  Increase simulation speed to make data ready sooner.");
	return;
    }
    
    // rescale data to maximize
    double max = -1e8;
    double min =  1e8;
    for (i = 0; i != ct; i++) {
	if (data[i] > max) max = data[i];
	if (data[i] < min) min = data[i];
    }
    
    double adj = -(max+min)/2;
    double mult = 32766/(max+adj);
    for (i = 0; i != ct; i++) {
	int s = (int)((data[(i+base)%dataCount]+adj)*mult);
	arr.push(s);
    }
    playJS(arr, samplingRate);
}
 
开发者ID:sharpie7,项目名称:circuitjs1,代码行数:31,代码来源:AudioOutputElm.java

示例6: fromIntegers

import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
public static JsArrayInteger fromIntegers(Collection<Integer> collection) {
    JsArrayInteger array = JsArrayInteger.createArray().cast();
    for(Integer item : collection) {
        array.push(item);
    }
    return array;
}
 
开发者ID:BenDol,项目名称:gwt-jui,代码行数:8,代码来源:JsArrayUtil.java

示例7: JsPoint

import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
public JsPoint(int x, int y) {
    JsArrayInteger jsX = (JsArrayInteger)JsArrayInteger.createArray();
    jsX.push(x);
    array.set(0, jsX);

    JsArrayInteger jsY = (JsArrayInteger)JsArrayInteger.createArray();
    jsY.push(y);
    array.set(1, jsY);
}
 
开发者ID:BenDol,项目名称:gwt-jui,代码行数:10,代码来源:JsPoint.java

示例8: setSecondaryOrgUnitIds

import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
public void setSecondaryOrgUnitIds(Set<Integer> secondaryOrgUnitIds) {
	JsArrayInteger array = JavaScriptObject.createArray().cast();
	for (Integer orgUnitId : secondaryOrgUnitIds) {
		array.push(orgUnitId);
	}
	setSecondaryOrgUnitIds(array);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:8,代码来源:AuthenticationJS.java

示例9: setMemberOfProjectIds

import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
public void setMemberOfProjectIds(Set<Integer> memberOfProjectIds) {
	JsArrayInteger array = JavaScriptObject.createArray().cast();
	for (Integer memberOfProjectId : memberOfProjectIds) {
		array.push(memberOfProjectId);
	}
	setMemberOfProjectIds(array);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:8,代码来源:AuthenticationJS.java

示例10: setIndicators

import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
public void setIndicators(List<IndicatorDTO> indicators) {
	if(indicators != null) {
		final JsArrayInteger array = (JsArrayInteger) JavaScriptObject.createArray();

		for(final IndicatorDTO indicator : indicators) {
			array.push(indicator.getId());
		}

		setIndicators(array);
	}
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:12,代码来源:LogFrameActivityJS.java

示例11: setSecondaryOrgUnits

import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
public void setSecondaryOrgUnits(List<OrgUnitDTO> secondaryOrgUnitDTOs) {
	if (secondaryOrgUnitDTOs == null) {
		return;
	}

	JsArrayInteger array = JavaScriptObject.createArray().cast();
	for (OrgUnitDTO orgUnitDTO : secondaryOrgUnitDTOs) {
		array.push(orgUnitDTO.getId());
	}
	setSecondaryOrgUnits(array);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:12,代码来源:UserJS.java

示例12: setArrayOfIdentifiers

import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
public static void setArrayOfIdentifiers(final JavaScriptObject object, final String property, final Collection<? extends EntityDTO<Integer>> dtos) {
	if (dtos == null) {
		return;
	}
	final JsArrayInteger array = createJavaScriptArray(JsArrayInteger.class);
	for(final EntityDTO<Integer> dto : dtos) {
		array.push(dto.getId());
	}
	setJavaScriptObject(object, property, array);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:11,代码来源:Values.java

示例13: setCategoryElements

import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
public void setCategoryElements(List<CategoryElementDTO> categoryElements) {
	if(categoryElements != null) {
		final JsArrayInteger array = (JsArrayInteger) JavaScriptObject.createArray();
		
		for(final CategoryElementDTO categoryElementDTO : categoryElements) {
			array.push(categoryElementDTO.getId());
		}
		
		setCategoryElements(array);
	}
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:12,代码来源:CategoryTypeJS.java

示例14: toArray

import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
public static JsArrayInteger toArray(Set<OrgUnitDTO> children) {
	if (children == null) {
		return null;
	}

	final JsArrayInteger array = (JsArrayInteger) JavaScriptObject.createArray();
	for (final OrgUnitDTO child : children) {
		array.push(child.getId());
	}
	return array;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:12,代码来源:OrgUnitJS.java

示例15: setPhases

import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
public void setPhases(List<PhaseDTO> phases) {
	if (phases != null) {
		final JsArrayInteger array = (JsArrayInteger) JavaScriptObject.createArray();

		for (final PhaseDTO phase : phases) {
			array.push(phase.getId());
		}

		setPhases(array);
	}
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:12,代码来源:ProjectJS.java


注:本文中的com.google.gwt.core.client.JsArrayInteger.push方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。