本文整理了Java中com.google.gwt.dom.client.Element.removeFromParent()
方法的一些代码示例,展示了Element.removeFromParent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.removeFromParent()
方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:removeFromParent
暂无
代码示例来源:origin: com.google.gwt/gwt-servlet
public void removeChild(Element container, Element child) {
container.removeFromParent();
// We want this code to be resilient to the child having already been
// removed from its container (perhaps by widget code).
if (child.getParentElement() == container) {
child.removeFromParent();
}
// Cleanup child styles set by fillParent().
Style style = child.getStyle();
style.clearPosition();
style.clearLeft();
style.clearTop();
style.clearWidth();
style.clearHeight();
}
}
代码示例来源:origin: GwtMaterialDesign/gwt-material
@Override
public void unload() {
if (themeColorElement != null) {
themeColorElement.removeFromParent();
themeColorElement = null;
GWT.log("Meta theme color has been unloaded.");
}
}
代码示例来源:origin: GwtMaterialDesign/gwt-material
@Override
public void unload() {
if (manifestElement != null) {
manifestElement.removeFromParent();
manifestElement = null;
GWT.log("Web manifest has been unloaded.");
}
}
代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material
@Override
public void unload() {
if (manifestElement != null) {
manifestElement.removeFromParent();
manifestElement = null;
GWT.log("Web manifest has been unloaded.");
}
}
代码示例来源:origin: org.vaadin.addons/dragdroplayouts
public void detachDragImageFromLayout(VDragEvent drag) {
if (placeHolderElement != null) {
if (placeHolderElement.hasParentElement()) {
placeHolderElement.removeFromParent();
}
placeHolderElement = null;
}
}
代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material
@Override
public void unload() {
if (themeColorElement != null) {
themeColorElement.removeFromParent();
themeColorElement = null;
GWT.log("Meta theme color has been unloaded.");
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
public void detachDragImageFromLayout(VDragEvent drag) {
if (placeHolderElement != null) {
if (placeHolderElement.hasParentElement()) {
placeHolderElement.removeFromParent();
}
placeHolderElement = null;
}
}
代码示例来源:origin: org.uberfire/uberfire-runtime-plugins-client
@Override
public void onMouseUp(final MouseUpEvent event) {
mouseDown = false;
glassElem.removeFromParent();
Event.releaseCapture(getElement());
}
},
代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-library
/**
* Removes the value of the image element if any. It is safe to call this
* method regardless of if an image has been set or not.
*/
public JQMListItem removeImage() {
if (imageElem != null) {
imageElem.removeFromParent();
imageElem = null;
}
getElement().removeClassName(STYLE_UI_LI_HAS_THUMB);
return this;
}
代码示例来源:origin: com.google.gwt/gwt-servlet
mouseDown = false;
glassElem.removeFromParent();
代码示例来源:origin: gwtbootstrap3/gwtbootstrap3
@Override
public void onChange(ChangeEvent event) {
if (iconElement != null) {
iconElement.removeFromParent();
}
String html = getHTML();
if (showRequiredIndicator && html != null && !"".equals(html)) {
iconElement = createIconElement();
getElement().appendChild(iconElement);
}
}
}, ChangeEvent.getType());
代码示例来源:origin: GwtMaterialDesign/gwt-material
protected void onOpening() {
open = true;
$("#sidenav-overlay").each((param1, element) -> element.removeFromParent());
SideNavOpeningEvent.fire(this);
}
代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material
protected void onOpening() {
open = true;
$("#sidenav-overlay").each((param1, element) -> element.removeFromParent());
SideNavOpeningEvent.fire(this);
}
代码示例来源:origin: org.gwtbootstrap3/gwtbootstrap3
@Override
public void onChange(ChangeEvent event) {
if (iconElement != null) {
iconElement.removeFromParent();
}
if (error && iconType != null) {
iconElement = createIconElement();
getElement().insertFirst(iconElement);
}
}
}, ChangeEvent.getType());
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Recalculate the height and width of a native scrollbar.
*/
private static void maybeRecalculateNativeScrollbarSize() {
// Check if the size has already been calculated.
if (nativeHeight > -1) {
return;
}
// Create a scrollable element and attach it to the body.
Element scrollable = Document.get().createDivElement();
scrollable.getStyle().setPosition(Position.ABSOLUTE);
scrollable.getStyle().setTop(-1000.0, Unit.PX);
scrollable.getStyle().setLeft(-1000.0, Unit.PX);
scrollable.getStyle().setHeight(100.0, Unit.PX);
scrollable.getStyle().setWidth(100.0, Unit.PX);
scrollable.getStyle().setOverflow(Overflow.SCROLL);
scrollable.getStyle().setProperty("direction", "rtl");
Document.get().getBody().appendChild(scrollable);
// Add some content.
Element content = Document.get().createDivElement();
content.setInnerText("content");
scrollable.appendChild(content);
// Measure the height and width.
nativeHeight = scrollable.getOffsetHeight() - scrollable.getClientHeight();
nativeWidth = scrollable.getOffsetWidth() - scrollable.getClientWidth();
nativeRtl = (content.getAbsoluteLeft() > scrollable.getAbsoluteLeft());
// Detach the scrollable element.
scrollable.removeFromParent();
}
代码示例来源:origin: pl.touk.gwtaculous/gwtaculous-lib
public static void terminateClone(DragObject dragElement){
if (dragElement.getDragOptions().contains(DragOption.MOVE_TO_CLONE)) {
moveElementToElement(dragElement.getSourceElement(), dragElement.getDragElement(), Position.FIXED);
}
dragElement.getDragElement().removeFromParent();
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
private void hideModalityCurtain() {
Document.get().getBody().removeClassName(MODAL_WINDOW_OPEN_CLASSNAME);
modalityCurtain.removeFromParent();
if (BrowserInfo.get().isIE()) {
// IE leaks memory in certain cases unless we release the reference
// (#9197)
modalityCurtain = null;
}
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-ui
public void onJointChange(NodeDescriptor node, Tree.Joint joint) {
Element currJointEl = getJointContainer(node);
if (currJointEl == null) {
return;
}
Element jointContainer = tree.getPresentationRenderer().getJointContainer(joint);
getNodeContainer(node).insertFirst(jointContainer);
currJointEl.removeFromParent();
node.setJointContainerElement(jointContainer);
}
代码示例来源:origin: org.jboss.errai/errai-ui
public static void initTemplated(final Object templated, final Element wrapped, final Collection<Widget> dataFields) {
// All template fragments are contained in a single element, during initialization.
wrapped.removeFromParent();
final TemplateWidget widget = new TemplateWidget(wrapped, dataFields);
TemplateWidgetMapper.put(templated, widget);
StyleBindingsRegistry.get().updateStyles(templated);
widget.onAttach();
RootPanel.detachOnWindowClose(widget);
TemplateInitializedEvent.fire(widget);
}
代码示例来源:origin: io.github.nibiruos.ui/org.nibiru.ui.gwt
@Override
protected int getNativeWidth() {
Element e = DOM.createDiv();
e.setInnerText(getValue().get() != null ? getValue().get() : "I");
e.getStyle().setPosition(Style.Position.ABSOLUTE);
Document.get().getBody().appendChild(e);
int width = e.getOffsetWidth();
e.removeFromParent();
return width + MAGIC_PADDING;
}
内容来源于网络,如有侵权,请联系作者删除!