本文整理了Java中com.google.gwt.dom.client.Element.getPropertyInt()
方法的一些代码示例,展示了Element.getPropertyInt()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getPropertyInt()
方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:getPropertyInt
[英]Gets an integer property from this element.
[中]从该元素获取整数属性。
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Gets the amount of spacing that is added around all cells.
*
* @return the cell spacing, in pixels
*/
public int getCellSpacing() {
return tableElem.getPropertyInt("cellSpacing");
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Returns the offsetWidth element property.
*
* @param elem the element
* @return the offsetWidth property
*/
static final int getOffsetWidth(Element elem) {
return elem.getPropertyInt("offsetWidth");
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Gets the amount of padding that is added around all cells.
*
* @return the cell padding, in pixels
*/
public int getCellPadding() {
return tableElem.getPropertyInt("cellPadding");
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Returns the offsetHeight element property.
*
* @param elem the element
* @return the offsetHeight property
*/
static final int getOffsetHeight(Element elem) {
return elem.getPropertyInt("offsetHeight");
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Gets any named property from an element, as an int.
*
* @param elem the element whose property is to be retrieved
* @param prop the name of the property
* @return the property's value as an int
* @deprecated Use {@link Element#getPropertyInt(String)} instead.
*/
@Deprecated
public static int getElementPropertyInt(Element elem, String prop) {
return elem.getPropertyInt(prop);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Gets an integer property on a given element.
*
* @param elem the element whose property is to be retrieved
* @param attr the name of the property to be retrieved
* @return the property's value as an integer
* @deprecated Use the more appropriately named
* {@link Element#getPropertyInt(String)} instead.
*/
@Deprecated
public static int getIntAttribute(Element elem, String attr) {
return elem.getPropertyInt(attr);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
private int findDividerIndex(Element elem) {
while (elem != null && elem != getElement()) {
String expando = elem.getPropertyString("__index");
if (expando != null) {
// Make sure it belongs to me!
int ownerHash = elem.getPropertyInt("__owner");
if (ownerHash == hashCode()) {
// Yes, it's mine.
return Integer.parseInt(expando);
} else {
// It must belong to some nested StackPanel.
return -1;
}
}
elem = DOM.getParent(elem);
}
return -1;
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
protected void onUpdate(double progress) {
if (!growing) {
progress = 1.0 - progress;
}
// Container1 expands (shrinks) to its target height
int height1;
int height2;
if (fixedHeight == -1) {
height1 = (int) (progress * container1.getPropertyInt("scrollHeight"));
height2 = (int) ((1.0 - progress) * container2.getPropertyInt("scrollHeight"));
} else {
height1 = (int) (progress * fixedHeight);
height2 = fixedHeight - height1;
}
// Issue 2339: If the height is 0px, IE7 will display the entire content
// widget instead of hiding it completely.
if (height1 == 0) {
height1 = 1;
height2 = Math.max(1, height2 - 1);
} else if (height2 == 0) {
height2 = 1;
height1 = Math.max(1, height1 - 1);
}
container1.getStyle().setProperty("height", height1 + "px");
container2.getStyle().setProperty("height", height2 + "px");
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
protected void onUpdate(double progress) {
int height = (int) (progress * scrollHeight);
if (!opening) {
height = scrollHeight - height;
}
// Issue 2338: If the height is 0px, IE7 will display all of the children
// instead of hiding them completely.
height = Math.max(height, 1);
curItem.childSpanElem.getStyle().setProperty("height", height + "px");
// We need to set the width explicitly of the item might be cropped
int scrollWidth = curItem.childSpanElem.getPropertyInt("scrollWidth");
curItem.childSpanElem.getStyle().setProperty("width", scrollWidth + "px");
}
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Gets the amount of spacing that is added around all cells.
*
* @return the cell spacing, in pixels
*/
public int getCellSpacing() {
return tableElem.getPropertyInt("cellSpacing");
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Returns the offsetHeight element property.
*
* @param elem the element
* @return the offsetHeight property
*/
static final int getOffsetHeight(Element elem) {
return elem.getPropertyInt("offsetHeight");
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Returns the offsetHeight element property.
*
* @param elem the element
* @return the offsetHeight property
*/
static final int getOffsetHeight(Element elem) {
return elem.getPropertyInt("offsetHeight");
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Gets the amount of padding that is added around all cells.
*
* @return the cell padding, in pixels
*/
public int getCellPadding() {
return tableElem.getPropertyInt("cellPadding");
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Gets the amount of spacing that is added around all cells.
*
* @return the cell spacing, in pixels
*/
public int getCellSpacing() {
return tableElem.getPropertyInt("cellSpacing");
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Returns the offsetWidth element property.
*
* @param elem the element
* @return the offsetWidth property
*/
static final int getOffsetWidth(Element elem) {
return elem.getPropertyInt("offsetWidth");
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Gets any named property from an element, as an int.
*
* @param elem the element whose property is to be retrieved
* @param prop the name of the property
* @return the property's value as an int
* @deprecated Use {@link Element#getPropertyInt(String)} instead.
*/
@Deprecated
public static int getElementPropertyInt(Element elem, String prop) {
return elem.getPropertyInt(prop);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
final Element senderElem = sender.getElement();
int x = event.getClientX() - senderElem.getAbsoluteLeft()
+ senderElem.getPropertyInt("scrollLeft")
+ Window.getScrollLeft();
int y = event.getClientY() - senderElem.getAbsoluteTop()
+ senderElem.getPropertyInt("scrollTop")
+ Window.getScrollTop();
代码示例来源:origin: com.extjs/gxt
/**
* Returns the row index.
*
* @param elem the row or child of the row element
* @return the index
*/
public int findRowIndex(Element elem) {
Element r = findRow(elem);
return r != null ? r.getPropertyInt("rowIndex") : -1;
}
代码示例来源:origin: com.google.gwt/gwt-servlet
int width = selectedElem.getPropertyInt("offsetWidth");
int height = selectedElem.getPropertyInt("offsetHeight");
代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material
/**
* Retrieve the Integer value from the given Attribute of the range element
*
* @param attribute The name of the attribute on the range element
* @return The Integer vaulue read from the given attribute or null
*/
protected Integer getIntFromRangeElement(String attribute) {
Element ele = $(rangeInputElement).asElement();
if (ele != null) {
return ele.getPropertyInt(attribute);
}
return null;
}
内容来源于网络,如有侵权,请联系作者删除!