- celltable = new DragAndDropCellTable<FileResource>(GSS.VISIBLE_FILE_COUNT,resources,keyProvider){
- @Override
- protected void onBrowserEvent2(Event event) {
- /*if (DOM.eventGetType((Event) event) == Event.ONMOUSEDOWN && DOM.eventGetButton((Event) event) == NativeEvent.BUTTON_RIGHT){
- fireClickEvent((Element) event.getEventTarget().cast());
- }*/
- super.onBrowserEvent2(event);
- }
- };
- provider.addDataDisplay(celltable);
- celltable.addDragStopHandler(dragStop);
- celltable.addDragStartHandler(new DragStartEventHandler() {
-
- public void onDragStart(DragStartEvent event) {
- FileResource value = event.getDraggableData();
- com.google.gwt.dom.client.Element helper = event.getHelper();
- SafeHtmlBuilder sb = new SafeHtmlBuilder();
- sb.appendHtmlConstant("<b>");
- DisplayHelper.log(value.getName());
- sb.appendEscaped(value.getName());
- sb.appendHtmlConstant("</b>");
- helper.setInnerHTML(sb.toSafeHtml().asString());
-
- }
- });
- Column<FileResource, ImageResource> status = new Column<FileResource, ImageResource>(new ImageResourceCell()) {
- @Override
- public ImageResource getValue(FileResource entity) {
- return getFileIcon(entity);
- }
- };
- celltable.addColumn(status,"");
-
-