本文整理了Java中com.google.gwt.dom.client.Element.getScrollWidth()
方法的一些代码示例,展示了Element.getScrollWidth()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getScrollWidth()
方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:getScrollWidth
[英]The width of the scroll view of an element.
[中]元素的滚动视图的宽度。
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* The width of the scrollable area of the document.
*
* @return the width of the document's scrollable area
*/
public final int getScrollWidth() {
// TODO(dramaix): Use document.scrollingElement when its available. See getScrollLeft().
return getViewportElement().getScrollWidth();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Get the maximum horizontal scroll position.
*
* @param scrollable the scrollable element
* @return the maximum scroll position
*/
public int getMaximumHorizontalScrollPosition(Element scrollable) {
return isRtl(scrollable) ? 0 : scrollable.getScrollWidth() - scrollable.getClientWidth();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Get the minimum horizontal scroll position.
*
* @param scrollable the scrollable element
* @return the minimum scroll position
*/
public int getMinimumHorizontalScrollPosition(Element scrollable) {
return isRtl(scrollable) ? scrollable.getClientWidth() - scrollable.getScrollWidth() : 0;
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public void setScrollLeft(Element elem, int left) {
if (!isGecko19() && isRTL(elem)) {
left += elem.getScrollWidth() - elem.getClientWidth();
}
super.setScrollLeft(elem, left);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public void setScrollLeft(Element elem, int left) {
if (!elem.hasTagName(BodyElement.TAG) && isRTL(elem)) {
left += elem.getScrollWidth() - elem.getClientWidth();
}
super.setScrollLeft(elem, left);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public int getScrollLeft(Element elem) {
if (!elem.hasTagName(BodyElement.TAG) && isRTL(elem)) {
return super.getScrollLeft(elem)
- (elem.getScrollWidth() - elem.getClientWidth());
}
return super.getScrollLeft(elem);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public int getScrollLeft(Element elem) {
if (!isGecko19() && isRTL(elem)) {
return super.getScrollLeft(elem)
- (elem.getScrollWidth() - elem.getClientWidth());
}
return super.getScrollLeft(elem);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
void scrollToEnd() {
Element elem = getElement();
targetScrollLeft = elem.getScrollWidth() - elem.getClientWidth();
if (LocaleInfo.getCurrentLocale().isRTL()) {
targetScrollLeft *= -1;
}
if (isAnimationEnabled()) {
// Animate the scrolling.
startScrollLeft = elem.getScrollLeft();
run(250, elem);
} else {
// Scroll instantly.
onComplete();
}
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
collapsible.setScrollLeft(collapsible.getScrollWidth() + 100);
代码示例来源:origin: net.wetheinter/gwt-user
/**
* The width of the scrollable area of the document.
*
* @return the width of the document's scrollable area
*/
public final int getScrollWidth() {
return getViewportElement().getScrollWidth();
}
代码示例来源:origin: oVirt/ovirt-engine
/**
* Uses scrollWidth to detect horizontal overflow.
*/
public static boolean detectHorizontalOverflow(Element element) {
int scrollWidth = element.getScrollWidth();
int clientWidth = element.getClientWidth();
return scrollWidth > clientWidth;
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Get the minimum horizontal scroll position.
*
* @param scrollable the scrollable element
* @return the minimum scroll position
*/
public int getMinimumHorizontalScrollPosition(Element scrollable) {
return isRtl(scrollable) ? scrollable.getClientWidth() - scrollable.getScrollWidth() : 0;
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Get the maximum horizontal scroll position.
*
* @param scrollable the scrollable element
* @return the maximum scroll position
*/
public int getMaximumHorizontalScrollPosition(Element scrollable) {
return isRtl(scrollable) ? 0 : scrollable.getScrollWidth() - scrollable.getClientWidth();
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Get the minimum horizontal scroll position.
*
* @param scrollable the scrollable element
* @return the minimum scroll position
*/
public int getMinimumHorizontalScrollPosition(Element scrollable) {
return isRtl(scrollable) ? scrollable.getClientWidth() - scrollable.getScrollWidth() : 0;
}
代码示例来源:origin: net.wetheinter/gwt-user
@Override
public void setScrollLeft(Element elem, int left) {
if (!isGecko19() && isRTL(elem)) {
left += elem.getScrollWidth() - elem.getClientWidth();
}
super.setScrollLeft(elem, left);
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
@Override
public void setScrollLeft(Element elem, int left) {
if (!elem.hasTagName(BodyElement.TAG) && isRTL(elem)) {
left += elem.getScrollWidth() - elem.getClientWidth();
}
super.setScrollLeft(elem, left);
}
代码示例来源:origin: net.wetheinter/gwt-user
@Override
public void setScrollLeft(Element elem, int left) {
if (!elem.hasTagName(BodyElement.TAG) && isRTL(elem)) {
left += elem.getScrollWidth() - elem.getClientWidth();
}
super.setScrollLeft(elem, left);
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
@Override
public int getScrollLeft(Element elem) {
if (!elem.hasTagName(BodyElement.TAG) && isRTL(elem)) {
return super.getScrollLeft(elem)
- (elem.getScrollWidth() - elem.getClientWidth());
}
return super.getScrollLeft(elem);
}
代码示例来源:origin: net.wetheinter/gwt-user
@Override
public int getScrollLeft(Element elem) {
if (!elem.hasTagName(BodyElement.TAG) && isRTL(elem)) {
return super.getScrollLeft(elem)
- (elem.getScrollWidth() - elem.getClientWidth());
}
return super.getScrollLeft(elem);
}
代码示例来源:origin: net.wetheinter/gwt-user
@Override
public int getScrollLeft(Element elem) {
if (!isGecko19() && isRTL(elem)) {
return super.getScrollLeft(elem)
- (elem.getScrollWidth() - elem.getClientWidth());
}
return super.getScrollLeft(elem);
}
内容来源于网络,如有侵权,请联系作者删除!