本文整理汇总了Java中com.google.gwt.core.client.JsArrayInteger.get方法的典型用法代码示例。如果您正苦于以下问题:Java JsArrayInteger.get方法的具体用法?Java JsArrayInteger.get怎么用?Java JsArrayInteger.get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.core.client.JsArrayInteger
的用法示例。
在下文中一共展示了JsArrayInteger.get方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DragObject
import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
public DragObject(TopologyView<TopologyViewRenderer> svgTopologyMap, Element draggableElement, Element containerElement, D3 selection) {
m_svgTopologyMap = svgTopologyMap;
m_draggableElement = draggableElement;
m_containerElement = containerElement;
m_selection = selection;
m_selection.each(new Handler<GWTVertex>() {
@Override
public void call(GWTVertex vertex, int index) {
Point p = new Point(vertex.getX(), vertex.getY());
m_startPosition.put(vertex.getId(), p);
}
});
//User m_vertexgroup because this is what we scale instead of every vertex element
m_transform = D3.getTransform(D3.d3().select(getTopologyView().getVertexGroup()).attr("transform"));
JsArrayInteger position = D3.getMouse(containerElement);
m_startX = (int) (position.get(0) / m_transform.getScale().get(0));
m_startY = (int) (position.get(1) / m_transform.getScale().get(1));
}
示例2: jsArrayIntegerToIntArray
import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
private int[] jsArrayIntegerToIntArray(JsArrayInteger values)
{
int len = values.length();
int[] vals = new int[len];
for (int i = 0; i < len; i++) {
vals[i] = values.get(i);
}
return vals;
}
示例3: checkForIntAryResult
import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
private static void checkForIntAryResult(String key, WebPlotResult wpRes,PlotResultOverlay res) {
JsArrayInteger jsAry= res.getIntArrayResult(key);
if (jsAry!=null) {
int ary[]= new int[jsAry.length()];
for(int i= 0; (i<ary.length); i++) ary[i]= jsAry.get(i);
wpRes.putResult(key,new DataEntry.IntArray(ary));
}
}
示例4: toByteArray
import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
public static byte[] toByteArray(JsArrayInteger array, byte[] result, int offset) {
int j = offset;
for (int i=0; i < array.length(); i++) {
int value = array.get(i);
result[j++] = (byte) (value >>> 24);
result[j++] = (byte) (value >>> 16);
result[j++] = (byte) (value >>> 8);
result[j++] = (byte) (value);
}
return result;
}
示例5: toArray
import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
public static int[] toArray(JsArrayInteger values) {
if (GWT.isScript()) {
return reinterpretCast(values);
} else {
int length = values.length();
int[] ret = new int[length];
for (int i = 0, l = length; i < l; i++) {
ret[i] = values.get(i);
}
return ret;
}
}
示例6: GL_LoadNewImage
import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
public Image GL_LoadNewImage(final String name, int type) {
final Image image = Images.GL_Find_free_image_t(name, type);
int cut = name.lastIndexOf('.');
String normalizedName = cut == -1 ? name : name.substring(0, cut);
JsArrayInteger d = getImageSize(normalizedName);
if (d == null) {
GlState.gl.log("Size not found for " + name);
image.width = 128;
image.height = 128;
} else {
image.width = d.get(0);
image.height = d.get(1);
}
if (type != com.googlecode.gwtquake.shared.common.QuakeImage.it_pic) {
GlState.gl.glTexImage2D(TEXTURE_2D, 0, RGBA, HOLODECK_TEXTURE_SIZE, HOLODECK_TEXTURE_SIZE, 0, RGBA,
UNSIGNED_BYTE, holoDeckTexture);
GlState.gl.glTexParameterf(TEXTURE_2D, TEXTURE_MIN_FILTER, LINEAR);
GlState.gl.glTexParameterf(TEXTURE_2D, TEXTURE_MAG_FILTER, LINEAR);
}
imageQueue.add(image);
if(imageQueue.size() == 1) {
new ImageLoader().schedule();
}
return image;
}
示例7: GL_LoadNewImage
import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
public Image GL_LoadNewImage(final String name, int type) {
final Image image = Images.GL_Find_free_image_t(name, type);
JsArrayInteger d = getImageSize(name);
if (d == null) {
GlState.gl.log("Size not found for " + name);
image.width = 128;
image.height = 128;
} else {
image.width = d.get(0);
image.height = d.get(1);
}
return image;
}
示例8: DragObject
import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
public DragObject(Element draggableElement, Element containerElement) {
m_draggableElement = draggableElement;
m_containerElement = containerElement;
//User m_vertexgroup because this is what we scale instead of every vertex element
m_transform = D3.getTransform(D3.d3().select(m_vertexGroup).attr("transform"));
JsArrayInteger position = D3.getMouse(containerElement);
m_startX = (int) (position.get(0) / m_transform.getScale().get(0));
m_startY = (int) (position.get(1) / m_transform.getScale().get(1));
}
示例9: getStyleDef
import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
public VectorFeatureStyleDef getStyleDef(JSObject styleObject) {
VectorFeatureStyleDef def = new VectorFeatureStyleDef();
if (styleObject.hasProperty(LeafletStyle.FILL_COLOR_NAME)) {
String fillColor = styleObject.getPropertyAsString(LeafletStyle.FILL_COLOR_NAME);
def.getFill().setNormalColor(fillColor);
}
if (styleObject.hasProperty(LeafletStyle.FILL_OPACITY_NAME)) {
Double fillOpacity = styleObject.getPropertyAsDouble(LeafletStyle.FILL_OPACITY_NAME);
def.getFill().setOpacity(fillOpacity);
}
if (styleObject.hasProperty(LeafletStyle.STROKE_COLOR_NAME)) {
String strokeColor = styleObject.getPropertyAsString(LeafletStyle.STROKE_COLOR_NAME);
def.getLine().setNormalColor(strokeColor);
}
if (styleObject.hasProperty(LeafletStyle.STROKE_WIDTH_NAME)) {
Double strokeWidth = styleObject.getPropertyAsDouble(LeafletStyle.STROKE_WIDTH_NAME);
def.getLine().setThickness(strokeWidth.intValue());
}
JSObject iconObject = styleObject.getProperty(LeafletStyle.ICON_NAME);
if (iconObject != null) {
if (iconObject.hasProperty(LeafletStyle.ICON_URL_NAME)) {
String iconUrl = iconObject.getPropertyAsString(LeafletStyle.ICON_URL_NAME);
def.getPoint().setExternalGraphic(iconUrl);
}
if (iconObject.hasProperty(LeafletStyle.ICON_SIZE_NAME)) {
JsArrayInteger iconSize = iconObject.getProperty(LeafletStyle.ICON_SIZE_NAME).cast();
int iconWidth = iconSize.get(0);
int iconHeight = iconSize.get(1);
def.getPoint().setGraphicWidth(iconWidth);
def.getPoint().setGraphicHeight(iconHeight);
}
}
return def;
}
示例10: getGrid
import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
public JsPoint getGrid() {
JsArrayInteger array = getOption("grid");
return new JsPoint(array.get(0), array.get(1));
}
示例11: getCurrentX
import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
public int getCurrentX() {
JsArrayInteger position = D3.getMouse(m_containerElement);
return (int) (position.get(0) / m_transform.getScale().get(0));
}
示例12: getCurrentY
import com.google.gwt.core.client.JsArrayInteger; //导入方法依赖的package包/类
public int getCurrentY() {
JsArrayInteger position = D3.getMouse(m_containerElement);
return (int) (position.get(1) / m_transform.getScale().get(1));
}