\r
import java.util.List;\r
\r
+import com.gargoylesoftware.htmlunit.javascript.host.KeyboardEvent;\r
import com.google.gwt.core.client.GWT;\r
import com.google.gwt.dom.client.NativeEvent;\r
import com.google.gwt.event.dom.client.ContextMenuEvent;\r
@Source("gr/ebs/gss/resources/groupevent.png")\r
ImageResource groupImage();\r
\r
+ @Override\r
@Source("gr/ebs/gss/resources/editdelete.png")\r
ImageResource delete();\r
\r
\r
}\r
}, ContextMenuEvent.getType());\r
+ tree.getElement().setId("groupsList.tree");\r
tree.addSelectionHandler(this);\r
tree.addOpenHandler(this);\r
tree.setAnimationEnabled(true);\r
initWidget(tree);\r
+ this.getElement().setAttribute("id", "CreativeFilesPanel");\r
setStylePrimaryName("gss-Groups");\r
sinkEvents(Event.ONCONTEXTMENU);\r
sinkEvents(Event.ONMOUSEUP);\r
sinkEvents(Event.ONDBLCLICK);\r
+ sinkEvents(Event.KEYEVENTS);\r
}\r
\r
\r
for (int i = 0; i < groupList.size(); i++) {\r
final TreeItem item = new TreeItem();\r
item.setWidget(imageItemHTML(images.groupImage(), groupList.get(i).getName(),item));\r
- item.setUserObject(groupList.get(i));\r
+ item.setUserObject(groupList.get(i)); \r
tree.addItem(item);\r
updateUsers(item);\r
}\r
* @return the resultant HTML\r
*/\r
private HTML imageItemHTML(final ImageResource imageProto, final String title,final TreeItem item) {\r
- final HTML link = new HTML("<a class='hidden-link' href='javascript:;'>" + "<span>" + AbstractImagePrototype.create(imageProto).getHTML() + " " + title + "</span>" + "</a>"){\r
+ final HTML link = new HTML("<a class='hidden-link' href='javascript:;'>" + "<span id='groupsList."+title+"'>" + AbstractImagePrototype.create(imageProto).getHTML() + " " + title + "</span>" + "</a>"){\r
@Override\r
public void onBrowserEvent(Event event) {\r
switch (DOM.eventGetType(event)) {\r
super.onBrowserEvent(event);\r
\r
}\r
- };\r
+ }; \r
link.sinkEvents(Event.ONMOUSEDOWN);\r
+ link.sinkEvents(Event.ONCONTEXTMENU);\r
+ link.sinkEvents(Event.ONCLICK);\r
+ link.sinkEvents(Event.ONKEYDOWN); \r
return link;\r
}\r
\r