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


Java JsArrayInteger.get方法代码示例

本文整理汇总了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));
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:24,代码来源:DragObject.java

示例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;
}
 
开发者ID:iSergio,项目名称:gwt-cs,代码行数:10,代码来源:Slider.java

示例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));
    }

}
 
开发者ID:lsst,项目名称:firefly,代码行数:10,代码来源:WebPlotResultParser.java

示例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;
    
}
 
开发者ID:ivanceras,项目名称:crypto-gwt,代码行数:13,代码来源:JsArrayUtils.java

示例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;
    }
}
 
开发者ID:growbit,项目名称:turbogwt-core,代码行数:13,代码来源:JsArrays.java

示例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;
}
 
开发者ID:artemis-esf,项目名称:quake2-gwt-port,代码行数:30,代码来源:GwtWebGLRenderer.java

示例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;
}
 
开发者ID:artemis-esf,项目名称:quake2-gwt-port,代码行数:16,代码来源:GwtWireframeGLRenderer.java

示例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));
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:13,代码来源:VTopologyComponent.java

示例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;
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:45,代码来源:GeoJSONCSS.java

示例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));
}
 
开发者ID:BenDol,项目名称:gwt-jui,代码行数:5,代码来源:Sortable.java

示例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));
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:5,代码来源:DragObject.java

示例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));
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:5,代码来源:DragObject.java


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