本文整理了Java中com.google.gwt.dom.client.Element.replaceChild()
方法的一些代码示例,展示了Element.replaceChild()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.replaceChild()
方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:replaceChild
暂无
代码示例来源:origin: com.google.gwt/gwt-servlet
} else {
Element nextSibling = toReplace.getNextSiblingElement();
childContainer.replaceChild(newChildren.getChild(0), toReplace);
toReplace = nextSibling;
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
protected void setKeyboardSelected(int index, boolean selected, boolean stealFocus) {
super.setKeyboardSelected(index, selected, stealFocus);
if (!isRowWithinBounds(index)) {
return;
}
// Update the style.
Element elem = getRowElement(index);
T value = getPresenter().getVisibleItem(index);
boolean isOpen = selected && isOpen(index);
setStyleName(elem, style.cellBrowserOpenItem(), isOpen);
// Update the image.
SafeHtml image = null;
if (isOpen) {
image = openImageHtml;
} else if (getTreeViewModel().isLeaf(value)) {
image = LEAF_IMAGE;
} else {
image = closedImageHtml;
}
tmpElem.setInnerSafeHtml(image);
elem.replaceChild(tmpElem.getFirstChildElement(), elem.getFirstChildElement());
// Update the open state.
updateChildState(this, true);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
oldImg.getParentElement().replaceChild(imageElem, oldImg);
代码示例来源:origin: fr.lteconsulting/hexa.core
public void setHeaders( String... headers )
{
Element oldHeaderRow = m_headerRow;
m_headers = headers;
m_headerRow = DOM.createTR();
m_headerRow.setClassName( "thead" );
StringBuilder b = new StringBuilder();
StringBuilder bTemplate = new StringBuilder();
m_nbColumns = headers.length;
for( int i = 0; i < m_nbColumns; i++ )
{
b.append( "<th>" + headers[i] + "</th>" );
bTemplate.append( "<td/>" );
}
m_headerRow.setInnerHTML( b.toString() );
if( oldHeaderRow != null )
m_head.replaceChild( m_headerRow, oldHeaderRow );
else
DOM.insertChild( m_head, m_headerRow, 0 );
m_rowTemplate = bTemplate.toString();
}
代码示例来源:origin: ltearno/hexa.tools
public void setHeaders( String... headers )
{
Element oldHeaderRow = m_headerRow;
m_headers = headers;
m_headerRow = DOM.createTR();
m_headerRow.setClassName( "thead" );
StringBuilder b = new StringBuilder();
StringBuilder bTemplate = new StringBuilder();
m_nbColumns = headers.length;
for( int i = 0; i < m_nbColumns; i++ )
{
b.append( "<th>" + headers[i] + "</th>" );
bTemplate.append( "<td/>" );
}
m_headerRow.setInnerHTML( b.toString() );
if( oldHeaderRow != null )
m_head.replaceChild( m_headerRow, oldHeaderRow );
else
DOM.insertChild( m_head, m_headerRow, 0 );
m_rowTemplate = bTemplate.toString();
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-ui
Element rootContainer =
view.getRootContainer(getNodeDescriptor(visible.get(i)));
rootContainer.replaceChild(rootContainer.getFirstChildElement(), html);
} else {
refresh(visible.get(i));
代码示例来源:origin: org.jboss.errai/errai-ui
parentElement.replaceChild(field.getElement(), element);
代码示例来源:origin: errai/errai
parentElement.replaceChild(field.getElement(), element);
代码示例来源:origin: org.vaadin.addons/dragdroplayouts
iframe.getParentElement().replaceChild(coverContainer, iframe);
coverContainer.appendChild(iframe);
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
iframe.getParentElement().replaceChild(coverContainer, iframe);
coverContainer.appendChild(iframe);
代码示例来源:origin: com.extjs/gxt
@SuppressWarnings({"unchecked", "rawtypes"})
protected void onUpdate(M model, int index) {
if (rendered) {
Element original = all.getElement(index);
if (original != null) {
List list = Util.createList(model);
Element node = bufferRender(list).getItem(0);
all.replaceElement(original, node);
original.getParentElement().replaceChild(node, original);
}
ListViewEvent<M> evt = new ListViewEvent<M>(this);
evt.setModel(model);
evt.setIndex(index);
fireEvent(Events.RowUpdated, evt);
}
}
代码示例来源:origin: net.wetheinter/gwt-user
} else {
Element nextSibling = toReplace.getNextSiblingElement();
childContainer.replaceChild(newChildren.getChild(0), toReplace);
toReplace = nextSibling;
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
} else {
Element nextSibling = toReplace.getNextSiblingElement();
childContainer.replaceChild(newChildren.getChild(0), toReplace);
toReplace = nextSibling;
代码示例来源:origin: net.wetheinter/gwt-user
@Override
protected void setKeyboardSelected(int index, boolean selected, boolean stealFocus) {
super.setKeyboardSelected(index, selected, stealFocus);
if (!isRowWithinBounds(index)) {
return;
}
// Update the style.
Element elem = getRowElement(index);
T value = getPresenter().getVisibleItem(index);
boolean isOpen = selected && isOpen(index);
setStyleName(elem, style.cellBrowserOpenItem(), isOpen);
// Update the image.
SafeHtml image = null;
if (isOpen) {
image = openImageHtml;
} else if (getTreeViewModel().isLeaf(value)) {
image = LEAF_IMAGE;
} else {
image = closedImageHtml;
}
tmpElem.setInnerSafeHtml(image);
elem.replaceChild(tmpElem.getFirstChildElement(), elem.getFirstChildElement());
// Update the open state.
updateChildState(this, true);
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
@Override
protected void setKeyboardSelected(int index, boolean selected, boolean stealFocus) {
super.setKeyboardSelected(index, selected, stealFocus);
if (!isRowWithinBounds(index)) {
return;
}
// Update the style.
Element elem = getRowElement(index);
T value = getPresenter().getVisibleItem(index);
boolean isOpen = selected && isOpen(index);
setStyleName(elem, style.cellBrowserOpenItem(), isOpen);
// Update the image.
SafeHtml image = null;
if (isOpen) {
image = openImageHtml;
} else if (getTreeViewModel().isLeaf(value)) {
image = LEAF_IMAGE;
} else {
image = closedImageHtml;
}
tmpElem.setInnerSafeHtml(image);
elem.replaceChild(tmpElem.getFirstChildElement(), elem.getFirstChildElement());
// Update the open state.
updateChildState(this, true);
}
代码示例来源:origin: net.wetheinter/gwt-user
oldImg.getParentElement().replaceChild(imageElem, oldImg);
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
oldImg.getParentElement().replaceChild(imageElem, oldImg);
内容来源于网络,如有侵权,请联系作者删除!