本文整理了Java中com.google.gwt.user.client.Element.getOffsetParent()
方法的一些代码示例,展示了Element.getOffsetParent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getOffsetParent()
方法的具体详情如下:
包路径:com.google.gwt.user.client.Element
类名称:Element
方法名:getOffsetParent
暂无
代码示例来源:origin: com.google.gwt/gwt-servlet
if (child.getElement().getOffsetParent() == null) {
return;
if (child.getElement().getOffsetParent() == getElement()) {
return;
代码示例来源:origin: com.allen-sauer.gwt.dnd/gwt-dnd
private void checkGWTIssue1813(Widget child, AbsolutePanel parent) {
if (!GWT.isScript()) {
if (child.getElement().getOffsetParent() != parent.getElement()
&& !"HTML".equals(child.getElement().getOffsetParent().getNodeName())) {
DOMUtil.reportFatalAndThrowRuntimeException("The boundary panel for this drag controller does not appear to have"
+ " 'position: relative' CSS applied to it."
+ " This may be due to custom CSS in your application, although this"
+ " is often caused by using the result of RootPanel.get(\"some-unique-id\") as your boundary"
+ " panel, as described in GWT issue 1813"
+ " (http://code.google.com/p/google-web-toolkit/issues/detail?id=1813)."
+ " You can often remedy this problem by adding one line of code to your application:"
+ " boundaryPanel.getElement().getStyle().setProperty(\"position\", \"relative\");");
}
}
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
@Override
public boolean execute() {
if (!followOutput) {
followScheduled = false;
return false;
}
if (scrollPanel.getElement().getOffsetParent() != null) {
scrollPanel.scrollToBottom();
scrollPanel.scrollToLeft();
followScheduled = false;
return false;
}
return true;
}
},
代码示例来源:origin: net.wetheinter/gwt-user
if (child.getElement().getOffsetParent() == null) {
return;
if (child.getElement().getOffsetParent() == getElement()) {
return;
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
@Override
public boolean execute() {
if (scrollPanel.getElement().getOffsetParent() != null) {
scrollPanel
.getElement()
.setScrollTop(scrollPanel.getElement().getScrollHeight());
scrollBottomRequired = false;
return false;
}
return true;
}
},
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
if (child.getElement().getOffsetParent() == null) {
return;
if (child.getElement().getOffsetParent() == getElement()) {
return;
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
if (scrollPanel.getElement().getOffsetParent() != null) {
scrollPanel.scrollToBottom();
scrollPanel.scrollToLeft();
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
/** {@inheritDoc} */
@Override
public void scrollBottom() {
/** scroll bottom immediately if view is visible */
if (scrollPanel.getElement().getOffsetParent() != null) {
scrollPanel.getElement().setScrollTop(scrollPanel.getElement().getScrollHeight());
return;
}
/** otherwise, check the visibility periodically and scroll the view when it's visible */
if (!scrollBottomRequired) {
scrollBottomRequired = true;
Scheduler.get()
.scheduleFixedPeriod(
new Scheduler.RepeatingCommand() {
@Override
public boolean execute() {
if (scrollPanel.getElement().getOffsetParent() != null) {
scrollPanel
.getElement()
.setScrollTop(scrollPanel.getElement().getScrollHeight());
scrollBottomRequired = false;
return false;
}
return true;
}
},
1000);
}
}
代码示例来源:origin: com.allen-sauer.gwt.dnd/gwt-dnd
setBottom(getTop() + widget.getOffsetHeight());
Element elem = widget.getElement().getOffsetParent();
Element p;
内容来源于网络,如有侵权,请联系作者删除!