getElement().replaceChild(newInputElem, inputElem);
/** * 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); } }
/** * 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); } }
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); }
/** * 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; } } }
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; }
getBody().replaceChild( tre, rowHeaders[ iRow ] ); rowHeaders[ iRow ] = tre;
getBody().replaceChild( tre, headerRows[ iRow ] ); headerRows[ iRow ] = tre;
getElement().replaceChild(newInputElem, inputElem);
getElement().replaceChild(newInputElem, inputElem);
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); } }
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); } }
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); }
getElement().replaceChild(newInputElem, inputElem);