summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorGuillermo Alvarez <guillermo@vaadin.com>2014-10-02 17:43:52 +0300
committerMarkus Koivisto <markus@vaadin.com>2014-10-14 18:06:01 +0300
commit55a7cf34e5a52486df36355f7bfbf7fccc1bf035 (patch)
tree125f66727a2200454f5ba5af8a680a8454df7b54 /client
parentc87b3d3fb2cf44ab1d56cad9a68b39649a76bbcf (diff)
downloadvaadin-framework-55a7cf34e5a52486df36355f7bfbf7fccc1bf035.tar.gz
vaadin-framework-55a7cf34e5a52486df36355f7bfbf7fccc1bf035.zip
TreeTable should support font icons for items (#14077)
Change-Id: I758e0f80446290f17280447b1ff5c1f44cb8604b
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/VTreeTable.java12
1 files changed, 4 insertions, 8 deletions
diff --git a/client/src/com/vaadin/client/ui/VTreeTable.java b/client/src/com/vaadin/client/ui/VTreeTable.java
index 49d398246f..9b7e9702b2 100644
--- a/client/src/com/vaadin/client/ui/VTreeTable.java
+++ b/client/src/com/vaadin/client/ui/VTreeTable.java
@@ -26,7 +26,6 @@ import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.Element;
-import com.google.gwt.dom.client.ImageElement;
import com.google.gwt.dom.client.SpanElement;
import com.google.gwt.dom.client.Style.Display;
import com.google.gwt.dom.client.Style.Unit;
@@ -174,13 +173,10 @@ public class VTreeTable extends VScrollTable {
.getFirstChild();
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);
+ Icon icon = client.getIcon(rowUidl
+ .getStringAttribute("icon"));
+ icon.setAlternateText("icon");
+ container.insertFirst(icon.getElement());
}
String classname = "v-treetable-treespacer";