/** * Helper function to build html snippet for column or row headers. * * @param uidl * possibly with values caption and icon * @return html snippet containing possibly an icon + caption text */ protected String buildCaptionHtmlSnippet(UIDL uidl) { String s = uidl.hasAttribute("caption") ? uidl.getStringAttribute("caption") : ""; if (uidl.hasAttribute("icon")) { Icon icon = client.getIcon(uidl.getStringAttribute("icon")); icon.setAlternateText("icon"); s = icon.getElement().getString() + s; } return s; }
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; }
getWidget().submitButton.icon = icon; if (getState().iconAltText != null) { icon.setAlternateText(getState().iconAltText); } else { icon.setAlternateText(""); Icon icon = getWidget().submitButton.icon; if (getState().iconAltText != null) { icon.setAlternateText(getState().iconAltText); } else { icon.setAlternateText("");