com.google.gwt.dom.client.Element.toInt32()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(111)

本文整理了Java中com.google.gwt.dom.client.Element.toInt32()方法的一些代码示例,展示了Element.toInt32()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.toInt32()方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:toInt32

Element.toInt32介绍

[英]Fast helper method to convert small doubles to 32-bit int.

Note: you should be aware that this uses JavaScript rounding and thus does NOT provide the same semantics as int b = (int) someDouble;. In particular, if x is outside the range [-2^31,2^31), then toInt32(x) would return a value equivalent to x modulo 2^32, whereas (int) x would evaluate to either MIN_INT or MAX_INT.
[中]将小双精度转换为32位整数的快速辅助方法。
注意:您应该知道这使用了JavaScript舍入,因此没有提供与int b = (int) someDouble;相同的语义。特别是,如果x在范围[-2^31,2^31]之外,则toInt32(x)将返回一个等于x模2^32的值,而(int)x将计算为MIN_int或MAX_int。

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * Returns the inner height of an element in pixels, including padding but not
 * the horizontal scrollbar height, border, or margin.
 * 
 * @return the element's client height
 */
public final int getClientHeight() {
 return toInt32(getSubPixelClientHeight());
}

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * The number of pixels that the upper left corner of the current element is
 * offset to the left within the offsetParent node.
 */
public final int getOffsetLeft() {
 return toInt32(getSubPixelOffsetLeft());
}

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * The height of an element relative to the layout.
 */
public final int getOffsetHeight() {
 return toInt32(getSubPixelOffsetHeight());
}

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * The width of the scroll view of an element.
 */
public final int getScrollWidth() {
 return toInt32(getSubPixelScrollWidth());
}

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * The height of the scroll view of an element.
 */
public final int getScrollHeight() {
 return toInt32(getSubPixelScrollHeight());
}

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * Returns the inner width of an element in pixels, including padding but not
 * the vertical scrollbar width, border, or margin.
 * 
 * @return the element's client width
 */
public final int getClientWidth() {
 return toInt32(getSubPixelClientWidth());
}

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * The number of pixels that the upper top corner of the current element is
 * offset to the top within the offsetParent node.
 */
public final int getOffsetTop() {
 return toInt32(getSubPixelOffsetTop());
}

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * The width of an element relative to the layout.
 */
public final int getOffsetWidth() {
 return toInt32(getSubPixelOffsetWidth());
}

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * The number of pixels that an element's content is scrolled from the top.
 */
public final int getScrollTop() {
 return toInt32(getSubPixelScrollTop());
}

代码示例来源:origin: net.wetheinter/gwt-user

/**
 * The height of the scroll view of an element.
 */
public final int getScrollHeight() {
 return toInt32(getSubPixelScrollHeight());
}

代码示例来源:origin: net.wetheinter/gwt-user

/**
 * Returns the inner width of an element in pixels, including padding but not
 * the vertical scrollbar width, border, or margin.
 * 
 * @return the element's client width
 */
public final int getClientWidth() {
 return toInt32(getSubPixelClientWidth());
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

/**
 * The width of an element relative to the layout.
 */
public final int getOffsetWidth() {
 return toInt32(getSubPixelOffsetWidth());
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

/**
 * The height of the scroll view of an element.
 */
public final int getScrollHeight() {
 return toInt32(getSubPixelScrollHeight());
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

/**
 * The number of pixels that an element's content is scrolled from the top.
 */
public final int getScrollTop() {
 return toInt32(getSubPixelScrollTop());
}

代码示例来源:origin: net.wetheinter/gwt-user

/**
 * Returns the inner height of an element in pixels, including padding but not
 * the horizontal scrollbar height, border, or margin.
 * 
 * @return the element's client height
 */
public final int getClientHeight() {
 return toInt32(getSubPixelClientHeight());
}

代码示例来源:origin: net.wetheinter/gwt-user

/**
 * The height of an element relative to the layout.
 */
public final int getOffsetHeight() {
 return toInt32(getSubPixelOffsetHeight());
}

代码示例来源:origin: net.wetheinter/gwt-user

/**
 * The number of pixels that the upper left corner of the current element is
 * offset to the left within the offsetParent node.
 */
public final int getOffsetLeft() {
 return toInt32(getSubPixelOffsetLeft());
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

/**
 * Returns the inner width of an element in pixels, including padding but not
 * the vertical scrollbar width, border, or margin.
 * 
 * @return the element's client width
 */
public final int getClientWidth() {
 return toInt32(getSubPixelClientWidth());
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

/**
 * The height of an element relative to the layout.
 */
public final int getOffsetHeight() {
 return toInt32(getSubPixelOffsetHeight());
}

代码示例来源:origin: net.wetheinter/gwt-user

/**
 * The number of pixels that an element's content is scrolled from the top.
 */
public final int getScrollTop() {
 return toInt32(getSubPixelScrollTop());
}

相关文章

微信公众号

最新文章

更多

Element类方法