Commit b7f75bfe authored by 皮皮蟹's avatar 皮皮蟹 Committed by Evan W. Patton

Update AssetList.java

parent 2e1118b3
...@@ -110,17 +110,15 @@ public class AssetList extends Composite implements ProjectChangeListener { ...@@ -110,17 +110,15 @@ public class AssetList extends Composite implements ProjectChangeListener {
nodeName.length()); nodeName.length());
String fileSuffix = node.getProjectId() + "/" + node.getFileId(); String fileSuffix = node.getProjectId() + "/" + node.getFileId();
String treeItemText = "<span style='cursor: pointer'>" + nodeName + "</span>"; String treeItemText = "<span style='cursor: pointer'>";
if (StorageUtil.isImageFile(fileSuffix)) { if (StorageUtil.isImageFile(fileSuffix)) {
Image mediaIcon = new Image(images.mediaIconImg()); treeItemText += new Image(images.mediaIconImg());
treeItemText = "<span>" + mediaIcon + nodeName + "</span>";
} else if (StorageUtil.isAudioFile(fileSuffix )) { } else if (StorageUtil.isAudioFile(fileSuffix )) {
Image mediaIcon = new Image(images.mediaIconAudio()); treeItemText += new Image(images.mediaIconAudio());
treeItemText = "<span>" + mediaIcon + nodeName + "</span>"; } else if (StorageUtil.isVideoFile(fileSuffix )) {
} else { treeItemText += new Image(images.mediaIconVideo());
Image mediaIcon = new Image(images.mediaIconVideo());
treeItemText = "<span>" + mediaIcon + nodeName + "</span>";
} }
treeItemText += nodeName + "</span>";
TreeItem treeItem = new TreeItem(new HTML(treeItemText)); TreeItem treeItem = new TreeItem(new HTML(treeItemText));
// keep a pointer from the tree item back to the actual node // keep a pointer from the tree item back to the actual node
treeItem.setUserObject(node); treeItem.setUserObject(node);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment