本文整理了Java中com.google.gwt.user.client.Element.getParentNode()
方法的一些代码示例,展示了Element.getParentNode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getParentNode()
方法的具体详情如下:
包路径:com.google.gwt.user.client.Element
类名称:Element
方法名:getParentNode
暂无
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Adds a child widget to the panel, replacing the HTML element.
*
* @param widget the widget to be added
* @param toReplace the element to be replaced by the widget
* @deprecated use {@link #addAndReplaceElement(Widget, Element)}
*/
@Deprecated
public void addAndReplaceElement(Widget widget,
com.google.gwt.user.client.Element toReplace) {
// Logic pulled from super.add(), replacing the element rather than adding.
widget.removeFromParent();
getChildren().add(widget);
toReplace.getParentNode().replaceChild(widget.getElement(), toReplace);
adopt(widget);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
toReplace.getParentNode().replaceChild(widget.getElement(), toReplace);
} else {
toReplace.getParentNode().insertBefore(widget.getElement(), toReplace);
remove(toRemove);
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
public void setFocus(String itemKey, String columnKey) {
HasWidgets row = tableWidget.getRenderedRowByKey(itemKey);
int columnIndex = Arrays.asList(tableWidget.getVisibleColOrder()).indexOf(columnKey);
for (Widget childWidget : row) {
Element element = ((Widget) row).getElement();
if (element.getChild(columnIndex).getFirstChild() == childWidget.getElement().getParentNode()) {
this.focusWidget(childWidget);
break;
}
}
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Adds a child widget to the panel, replacing the HTML element.
*
* @param widget the widget to be added
* @param toReplace the element to be replaced by the widget
* @deprecated use {@link #addAndReplaceElement(Widget, Element)}
*/
@Deprecated
public void addAndReplaceElement(Widget widget,
com.google.gwt.user.client.Element toReplace) {
// Logic pulled from super.add(), replacing the element rather than adding.
widget.removeFromParent();
getChildren().add(widget);
toReplace.getParentNode().replaceChild(widget.getElement(), toReplace);
adopt(widget);
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Adds a child widget to the panel, replacing the HTML element.
*
* @param widget the widget to be added
* @param toReplace the element to be replaced by the widget
* @deprecated use {@link #addAndReplaceElement(Widget, Element)}
*/
@Deprecated
public void addAndReplaceElement(Widget widget,
com.google.gwt.user.client.Element toReplace) {
// Logic pulled from super.add(), replacing the element rather than adding.
widget.removeFromParent();
getChildren().add(widget);
toReplace.getParentNode().replaceChild(widget.getElement(), toReplace);
adopt(widget);
}
代码示例来源:origin: net.wetheinter/gwt-user
toReplace.getParentNode().replaceChild(widget.getElement(), toReplace);
} else {
toReplace.getParentNode().insertBefore(widget.getElement(), toReplace);
remove(toRemove);
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
protected void handleBadDD(NativeEvent event) {
Element target = WidgetUtil.getElementUnderMouse(event);
if (target == null) {
VDragAndDropManager.get().interruptDrag();
return;
}
Node targetParent = DOM.asOld(target).getParentNode();
if (!getElement().isOrHasChild(targetParent)) {
VDragAndDropManager.get().interruptDrag();
}
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
toReplace.getParentNode().replaceChild(widget.getElement(), toReplace);
} else {
toReplace.getParentNode().insertBefore(widget.getElement(), toReplace);
remove(toRemove);
代码示例来源:origin: com.extjs/gxt
protected void onAdd(List<M> models, int index) {
if (rendered) {
if (all.getCount() == 0) {
refresh();
return;
}
NodeList<Element> nodes = bufferRender(models);
Element[] elements = Util.toElementArray(nodes);
all.insert(elements, index);
Element ref = index == 0 ? all.getElement(elements.length) : all.getElement(index - 1);
for (int i = elements.length - 1; i >= 0; i--) {
Node n = ref.getParentNode();
if (index == 0) {
n.insertBefore(elements[i], n.getFirstChild());
} else {
Node next = ref == null ? null : ref.getNextSibling();
if (next == null) {
n.appendChild(elements[i]);
} else {
n.insertBefore(elements[i], next);
}
}
if (GXT.isAriaEnabled()) {
elements[i].setId(XDOM.getUniqueId());
}
}
updateIndexes(index, -1);
}
}
内容来源于网络,如有侵权,请联系作者删除!