本文整理了Java中com.google.gwt.user.client.Element.getLastChild()
方法的一些代码示例,展示了Element.getLastChild()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getLastChild()
方法的具体详情如下:
包路径:com.google.gwt.user.client.Element
类名称:Element
方法名:getLastChild
暂无
代码示例来源:origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets
/**
* Saves natural column width if it hasn't been saved already.
*
* @param columnIndex
* @since 7.3.9
*/
protected void saveNaturalColumnWidthIfNotSaved(int columnIndex) {
if (naturalWidth < 0) {
// This is recently revealed column. Try to detect a proper
// value (greater of header and data cols)
final int hw = ((Element) getElement().getLastChild())
.getOffsetWidth() + getHeaderPadding();
if (columnIndex < 0) {
columnIndex = 0;
for (Widget widget : tHead) {
if (widget == this) {
break;
}
columnIndex++;
}
}
final int cw = scrollBody.getColWidth(columnIndex);
naturalWidth = (hw > cw ? hw : cw);
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
public CubaScrollTableHead() {
Element iconElement = presentationsEditIcon.getElement();
iconElement.setClassName("c-table-prefs-icon");
iconElement.getStyle().setDisplay(Style.Display.NONE);
Element columnSelector = (Element) getElement().getLastChild();
DOM.insertChild(getElement(), iconElement, DOM.getChildIndex(getElement(), columnSelector));
DOM.sinkEvents(iconElement, Event.ONCLICK);
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
public CubaTreeTableTableHead() {
Element iconElement = presentationsEditIcon.getElement();
iconElement.setClassName("c-table-prefs-icon");
iconElement.getStyle().setDisplay(Style.Display.NONE);
Element columnSelector = (Element) getElement().getLastChild();
DOM.insertChild(getElement(), iconElement, DOM.getChildIndex(getElement(), columnSelector));
DOM.sinkEvents(iconElement, Event.ONCLICK);
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-ui
/**
* Adds the new radio button to the group.
*
* @param label radio button's label
* @param title radio button's tooltip
* @param icon radio button's icon
* @param clickHandler click handler
*/
public void addButton(
String label, String title, @Nullable SVGResource icon, ClickHandler clickHandler) {
final RadioButton radioButton = new RadioButton(GROUP_NAME, label);
radioButton.setTitle(title);
radioButton.setStyleName(resources.getCSS().button());
radioButton.addClickHandler(clickHandler);
final Element radioButtonElement = radioButton.getElement();
final Node labelNode = radioButtonElement.getLastChild();
if (icon != null) {
labelNode.insertFirst(new SVGImage(icon).getElement());
} else {
radioButtonElement.getStyle().setWidth(90, PX);
as(labelNode).getStyle().setWidth(90, PX);
}
mainPanel.add(radioButton);
buttons.add(radioButton);
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
TableCellElement td = getElement().getLastChild().cast();
int colSpan = visibleColOrder.length - groupColIndex;
td.setColSpan(colSpan);
代码示例来源:origin: com.extjs/gxt
/**
* Returns the height in pixels of the framing elements of this panel
* (including any top and bottom bars and header and footer elements, but not
* including the body height). To retrieve the body height see
* {@link #getInnerHeight}.
*
* @return the frame height
*/
public int getFrameHeight() {
int h = el().getFrameWidth("tb") + bwrap.getFrameWidth("tb");
if (frame) {
Element hd = el().dom.getFirstChildElement().cast();
Element ft = bwrap.dom.getLastChild().cast();
h += (fly(hd).getHeight() + fly(ft).getHeight());
Element mc = bwrap.subChild(3).dom;
h += fly(mc).getFrameWidth("tb");
} else {
if (head != null) {
h += head.getOffsetHeight();
}
if (foot != null) {
h += foot.getHeight();
}
}
h += (tbar != null ? tbar.getHeight() : 0) + (bbar != null ? bbar.getHeight() : 0);
return h;
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
Node lastChild = consoleLines.getElement().getLastChild();
if (lastChild != null) {
lastChild.removeFromParent();
代码示例来源:origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets
protected boolean addTreeSpacer(UIDL rowUidl) {
if (cellShowsTreeHierarchy(getElement().getChildCount() - 1)) {
Element container = (Element) getElement().getLastChild()
.getFirstChild();
if (rowUidl.hasAttribute("icon")) {
Icon icon = client
.getIcon(rowUidl.getStringAttribute("icon"));
icon.setAlternateText("icon");
container.insertFirst(icon.getElement());
}
String classname = "v-treetable-treespacer";
if (rowUidl.getBooleanAttribute("ca")) {
canHaveChildren = true;
open = rowUidl.getBooleanAttribute("open");
classname += open ? " v-treetable-node-open"
: " v-treetable-node-closed";
}
treeSpacer = Document.get().createSpanElement();
treeSpacer.setClassName(classname);
container.insertFirst(treeSpacer);
depth = rowUidl.hasAttribute("depth")
? rowUidl.getIntAttribute("depth")
: 0;
setIndent();
isTreeCellAdded = true;
return true;
}
return false;
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets
@Override
protected boolean addTreeSpacer(UIDL rowUidl) {
if (cellShowsTreeHierarchy(getElement().getChildCount() - 1)) {
Element container = (Element) getElement().getLastChild().getChild(0);
if (rowUidl.hasAttribute("icon")) {
// icons are in first content cell in TreeTable
ImageElement icon = Document.get().createImageElement();
icon.setClassName("v-icon");
icon.setAlt("icon");
icon.setSrc(client.translateVaadinUri(rowUidl.getStringAttribute("icon")));
container.insertFirst(icon);
}
String classname = "v-treetable-treespacer-patched";
if (rowUidl.getBooleanAttribute("ca")) {
canHaveChildren = true;
open = rowUidl.getBooleanAttribute("open");
classname += open ? " v-treetable-node-open" : " v-treetable-node-closed";
classname += open ? " icon-arrow1_s" : " icon-arrow1_e";
}
treeSpacer = Document.get().createDivElement();
treeSpacer.getStyle().setDisplay(Display.INLINE_BLOCK);
treeSpacer.setClassName(classname);
container.insertAfter(treeSpacer, container.getFirstChild());
depth = rowUidl.hasAttribute("depth") ? rowUidl.getIntAttribute("depth") : 0;
setIndent();
isTreeCellAdded = true;
return true;
}
return false;
}
代码示例来源:origin: com.extjs/gxt
if (frame) {
Element hd = el().dom.getFirstChildElement().cast();
Element ft = bwrap.dom.getLastChild().cast();
h += (fly(hd).getHeight() + fly(ft).getHeight());
h += mcFrameSize.height;
内容来源于网络,如有侵权,请联系作者删除!