本文整理了Java中com.google.gwt.user.client.Element.insertBefore()
方法的一些代码示例,展示了Element.insertBefore()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.insertBefore()
方法的具体详情如下:
包路径:com.google.gwt.user.client.Element
类名称:Element
方法名:insertBefore
暂无
代码示例来源:origin: com.extjs/gxt
/**
* Inserts the element as a child before the given element.
*
* @param child the element to insert
* @param before the element the child will be inserted before
* @return this
*/
public El insertBefore(Element child, Element before) {
dom.insertBefore(child, before);
return this;
}
代码示例来源:origin: com.extjs/gxt
public void show(Element c) {
c.insertBefore(getElement(), null);
show();
}
代码示例来源:origin: fr.putnami.pwt/pwt
@Override
public <A extends EditorValue<T>> A getEditorForTraversal(int index) {
InternalListItem editor = null;
if (this.items.size() > index) {
editor = this.items.get(index);
} else {
editor = new InternalListItem();
this.items.add(editor);
this.addListItem(editor);
this.getElement().insertBefore(editor.getElement(), this.nextItem.getElement());
}
return (A) editor;
}
代码示例来源:origin: Putnami/putnami-web-toolkit
@Override
public <A extends EditorValue<T>> A getEditorForTraversal(int index) {
InternalListItem editor = null;
if (this.items.size() > index) {
editor = this.items.get(index);
} else {
editor = new InternalListItem();
this.items.add(editor);
this.addListItem(editor);
this.getElement().insertBefore(editor.getElement(), this.nextItem.getElement());
}
return (A) editor;
}
代码示例来源:origin: fr.lteconsulting/hexa.core
private void ensureHeader()
{
if( thead != null )
return;
thead = DOM.createTHead();
getElement().insertBefore( thead, getBodyElement() );
}
代码示例来源:origin: ltearno/hexa.tools
private void ensureHeader()
{
if( thead != null )
return;
thead = DOM.createTHead();
getElement().insertBefore( thead, getBodyElement() );
}
代码示例来源:origin: org.geomajas/geomajas-gwt-client-impl
public void insertBefore(IsWidget child, int beforeIndex) {
if (beforeIndex >= children.size()) {
add(child);
return;
}
Node beforeNode = getElement().getChild(beforeIndex);
getElement().insertBefore(child.asWidget().getElement(), beforeNode);
List<IsWidget> newChildList = new ArrayList<IsWidget>();
for (int i = 0; i < children.size(); i++) {
if (i == beforeIndex) {
newChildList.add(child);
}
newChildList.add(children.get(i));
}
children = newChildList;
adopt(child.asWidget());
}
代码示例来源:origin: sk.seges.acris/acris-widgets-beantable
/**
* Inserts a new cell into the specified row.
*
* @param row the row into which the new cell will be inserted
* @param column the column before which the cell will be inserted
* @return the new element
* @throws IndexOutOfBoundsException
*/
protected Element insertCell(int row, int column) {
Element tr = rowFormatter.getElement(row);
Element td = createCell();
Element beforeTd = cellFormatter.getRawElement(row, column);
tr.insertBefore(td, beforeTd);
return td;
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
protected void showModalityCurtain(Element overlayContainer, Element element, boolean isShowing, int index) {
getModalityCurtain().getStyle().setZIndex(index + VNotification.Z_INDEX_BASE);
if (isShowing) {
overlayContainer.insertBefore(getModalityCurtain(), element);
} else {
overlayContainer.appendChild(getModalityCurtain());
}
}
代码示例来源:origin: com.extjs/gxt
@Override
protected void onShow() {
super.onShow();
if (!el().isConnected()) {
XDOM.getBody().insertBefore(getElement(), null);
}
}
代码示例来源:origin: fr.lteconsulting/hexa.core
public void addTab( String text )
{
Element button = DOM.createDiv();
button.setClassName( getStylePrimaryName() + "-Item" );
button.setInnerText( text );
getElement().insertBefore( button, clear );
}
代码示例来源:origin: ltearno/hexa.tools
public void addTab( String text )
{
Element button = DOM.createDiv();
button.setClassName( getStylePrimaryName() + "-Item" );
button.setInnerText( text );
getElement().insertBefore( button, clear );
}
代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-library
public void setPanel(JQMPanel panel) {
removePanel();
this.panel = panel;
addLogical(panel);
getElement().insertBefore(panel.getElement(), getElement().getFirstChild());
}
代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-standalone
public void setPanel(JQMPanel panel) {
removePanel();
this.panel = panel;
addLogical(panel);
getElement().insertBefore(panel.getElement(), getElement().getFirstChild());
}
代码示例来源:origin: stephenh/tessell
@Override
public void add(final int index, final String text) {
final Element child = DOM.createElement(childTag);
child.setInnerText(text);
if (childStyleName != null) {
child.addClassName(childStyleName);
}
getElement().insertBefore(child, getElement().getChild(index));
}
代码示例来源:origin: jqm4gwt/jqm4gwt
public void setPanel(JQMPanel panel) {
removePanel();
this.panel = panel;
addLogical(panel);
getElement().insertBefore(panel.getElement(), getElement().getFirstChild());
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
private void showModalityCurtain() {
getModalityCurtain().getStyle().setZIndex(Z_INDEX);
if (isShowing()) {
getOverlayContainer().insertBefore(getModalityCurtain(),
getElement());
} else {
getOverlayContainer().appendChild(getModalityCurtain());
}
Document.get().getBody().addClassName(MODAL_WINDOW_OPEN_CLASSNAME);
}
代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-standalone
/**
* Sets the header element, overriding an existing header if any.
*/
public void setHeader(HasJqmHeader header) {
removeHeader();
this.header = header;
if (this.header == null) return;
addLogical(header.getHeaderStage());
if (panel == null) {
getElement().insertBefore(header.getJqmHeader().getElement(), getElement().getFirstChild());
} else {
getElement().insertAfter(header.getJqmHeader().getElement(), panel.getElement());
}
}
代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-library
/**
* Sets the header element, overriding an existing header if any.
*/
public void setHeader(HasJqmHeader header) {
removeHeader();
this.header = header;
if (this.header == null) return;
addLogical(header.getHeaderStage());
if (panel == null) {
getElement().insertBefore(header.getJqmHeader().getElement(), getElement().getFirstChild());
} else {
getElement().insertAfter(header.getJqmHeader().getElement(), panel.getElement());
}
}
代码示例来源:origin: jqm4gwt/jqm4gwt
/**
* Sets the header element, overriding an existing header if any.
*/
public void setHeader(HasJqmHeader header) {
removeHeader();
this.header = header;
if (this.header == null) return;
addLogical(header.getHeaderStage());
if (panel == null) {
getElement().insertBefore(header.getJqmHeader().getElement(), getElement().getFirstChild());
} else {
getElement().insertAfter(header.getJqmHeader().getElement(), panel.getElement());
}
}
内容来源于网络,如有侵权,请联系作者删除!