本文整理了Java中com.google.gwt.user.client.Element.replaceChild()
方法的一些代码示例,展示了Element.replaceChild()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.replaceChild()
方法的具体详情如下:
包路径:com.google.gwt.user.client.Element
类名称:Element
方法名:replaceChild
暂无
代码示例来源:origin: com.google.gwt/gwt-servlet
getElement().replaceChild(newInputElem, inputElem);
代码示例来源:origin: org.vaadin.addons/dragdroplayouts
/**
* Removes a iframe cover
*
* @param iframe
* The iframe element which has been covered
*/
private static void removeIframeCover(Element iframe) {
Element coverContainer = iframeCoverMap.get(iframe);
if (coverContainer != null) {
Element parent = coverContainer.getParentElement().cast();
parent.replaceChild(iframe, coverContainer);
iframe.getStyle().clearPosition();
iframeCoverMap.remove(iframe);
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
/**
* Removes a iframe cover
*
* @param iframe
* The iframe element which has been covered
*/
private static void removeIframeCover(Element iframe) {
Element coverContainer = iframeCoverMap.get(iframe);
if (coverContainer != null) {
Element parent = coverContainer.getParentElement().cast();
parent.replaceChild(iframe, coverContainer);
iframe.getStyle().clearPosition();
iframeCoverMap.remove(iframe);
}
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets
public MessageBubbleWidget(String primaryStyleName) {
super();
setStyleName(primaryStyleName + "-inline");
messageWrapper.addClassName(primaryStyleName);
triangleSVG.addStyleName("triangle");
compositeIcon.setStyleName("composite-icon");
compositeIcon.addStyleName("message-bubble-icon");
compositeIcon.getElement().getStyle().setProperty("lineHeight", "1.4");
messageWrapper.replaceChild(compositeIcon.getElement(), icon);
messageEl.getStyle().setDisplay(Style.Display.BLOCK);
messageEl.getStyle().setMarginLeft(30, Style.Unit.PX);
}
代码示例来源:origin: gwtbootstrap/gwt-bootstrap
/**
* Sets whether the Alert has a close icon or not.
*
* @param hasClose <code>false</code> if you don't want to have a close icon.
* Default: <code>true</code>
*/
public void setClose(boolean hasClose) {
this.hasClose = hasClose;
if (!isAttached()) {
return;
}
if (hasClose) {
if (close == null) {
close = new Close(DismissType.ALERT);
getElement().replaceChild(close.getElement(), closeReplacement.getElement());
}
} else {
if (close != null) {
getElement().replaceChild(closeReplacement.getElement(), close.getElement());
close = null;
}
}
}
代码示例来源:origin: com.vaadin.addon/vaadin-touchkit-agpl
public void setIcon(Icon icon) {
if (icon == null) {
if (this.icon != null) {
getElement().removeChild(this.icon.getElement());
}
} else if (this.icon != null) {
getElement()
.replaceChild(this.icon.getElement(), icon.getElement());
} else {
getElement().insertFirst(icon.getElement());
}
this.icon = icon;
}
代码示例来源:origin: org.kie.guvnor/guvnor-guided-dtable-editor-client
getBody().replaceChild( tre,
rowHeaders[ iRow ] );
rowHeaders[ iRow ] = tre;
代码示例来源:origin: kiegroup/drools-wb
getBody().replaceChild( tre,
headerRows[ iRow ] );
headerRows[ iRow ] = tre;
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
getElement().replaceChild(newInputElem, inputElem);
代码示例来源:origin: net.wetheinter/gwt-user
getElement().replaceChild(newInputElem, inputElem);
代码示例来源:origin: com.googlecode.mgwt/mgwt
private void replaceInputElement(Element elem) {
InputElement newInputElem = InputElement.as(elem);
// Collect information we need to set
boolean checked = getValue();
boolean enabled = isEnabled();
String formValue = getFormValue();
String uid = inputRadio.getId();
String accessKey = inputRadio.getAccessKey();
int sunkEvents = Event.getEventsSunk(inputRadio);
// Clear out the old input element
DOM.setEventListener(inputRadio, null);
getElement().replaceChild(newInputElem, inputRadio);
// Sink events on the new element
Event.sinkEvents(elem, Event.getEventsSunk(inputRadio));
Event.sinkEvents(inputRadio, 0);
inputRadio = newInputElem;
// Setup the new element
Event.sinkEvents(inputRadio, sunkEvents);
inputRadio.setId(uid);
if (!"".equals(accessKey)) {
inputRadio.setAccessKey(accessKey);
}
setValue(checked);
setEnabled(enabled);
setFormValue(formValue);
// Set the event listener
if (isAttached()) {
DOM.setEventListener(inputRadio, this);
}
}
代码示例来源:origin: dankurka/mgwt
private void replaceInputElement(Element elem) {
InputElement newInputElem = InputElement.as(elem);
// Collect information we need to set
boolean checked = getValue();
boolean enabled = isEnabled();
String formValue = getFormValue();
String uid = inputRadio.getId();
String accessKey = inputRadio.getAccessKey();
int sunkEvents = Event.getEventsSunk(inputRadio);
// Clear out the old input element
DOM.setEventListener(inputRadio, null);
getElement().replaceChild(newInputElem, inputRadio);
// Sink events on the new element
Event.sinkEvents(elem, Event.getEventsSunk(inputRadio));
Event.sinkEvents(inputRadio, 0);
inputRadio = newInputElem;
// Setup the new element
Event.sinkEvents(inputRadio, sunkEvents);
inputRadio.setId(uid);
if (!"".equals(accessKey)) {
inputRadio.setAccessKey(accessKey);
}
setValue(checked);
setEnabled(enabled);
setFormValue(formValue);
// Set the event listener
if (isAttached()) {
DOM.setEventListener(inputRadio, this);
}
}
代码示例来源:origin: com.extjs/gxt
private void replaceInputElement(Element elem) {
InputElement newInputElem = InputElement.as(elem);
int tabIndex = getTabIndex();
boolean checked = getValue();
boolean enabled = isEnabled();
String uid = input.getId();
String accessKey = InputElement.as(input.dom).getAccessKey();
int sunkEvents = Event.getEventsSunk(input.dom);
String styleName = input.getStyleName();
String valueAttribute = getValueAttribute();
getElement().replaceChild(newInputElem, input.dom);
Event.sinkEvents(elem, 0);
input = new El((Element) Element.as(newInputElem));
input.makePositionable();
Event.sinkEvents(input.dom, sunkEvents);
input.setId(uid);
if (!"".equals(accessKey)) {
InputElement.as(input.dom).setAccessKey(accessKey);
}
setTabIndex(tabIndex);
setValueAttribute(valueAttribute);
setValue(checked);
setEnabled(enabled);
input.setStyleName(styleName);
}
代码示例来源:origin: gwtbootstrap/gwt-bootstrap
getElement().replaceChild(newInputElem, inputElem);
内容来源于网络,如有侵权,请联系作者删除!