本文整理汇总了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;
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
}
示例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;
}
示例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);
}
}