/** * Gets the amount of spacing that is added around all cells. * * @return the cell spacing, in pixels */ public int getCellSpacing() { return tableElem.getPropertyInt("cellSpacing"); }
/** * Returns the offsetWidth element property. * * @param elem the element * @return the offsetWidth property */ static final int getOffsetWidth(Element elem) { return elem.getPropertyInt("offsetWidth"); }
/** * Gets the amount of padding that is added around all cells. * * @return the cell padding, in pixels */ public int getCellPadding() { return tableElem.getPropertyInt("cellPadding"); }
/** * Returns the offsetHeight element property. * * @param elem the element * @return the offsetHeight property */ static final int getOffsetHeight(Element elem) { return elem.getPropertyInt("offsetHeight"); }
/** * 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); }
/** * 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); }
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; }
@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"); }
@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"); } }
/** * Gets the amount of spacing that is added around all cells. * * @return the cell spacing, in pixels */ public int getCellSpacing() { return tableElem.getPropertyInt("cellSpacing"); }
/** * Returns the offsetHeight element property. * * @param elem the element * @return the offsetHeight property */ static final int getOffsetHeight(Element elem) { return elem.getPropertyInt("offsetHeight"); }
/** * Returns the offsetHeight element property. * * @param elem the element * @return the offsetHeight property */ static final int getOffsetHeight(Element elem) { return elem.getPropertyInt("offsetHeight"); }
/** * Gets the amount of padding that is added around all cells. * * @return the cell padding, in pixels */ public int getCellPadding() { return tableElem.getPropertyInt("cellPadding"); }
/** * Gets the amount of spacing that is added around all cells. * * @return the cell spacing, in pixels */ public int getCellSpacing() { return tableElem.getPropertyInt("cellSpacing"); }
/** * Returns the offsetWidth element property. * * @param elem the element * @return the offsetWidth property */ static final int getOffsetWidth(Element elem) { return elem.getPropertyInt("offsetWidth"); }
/** * 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); }
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();
/** * 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; }
int width = selectedElem.getPropertyInt("offsetWidth"); int height = selectedElem.getPropertyInt("offsetHeight");
/** * 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; }