Java 类com.google.gwt.event.dom.client.DragEndHandler 实例源码

项目:empiria.player    文件:DragStartEndHandlerWrapperTest.java   
@Test
public void dragEndHandlerTest() {
    DragEndHandler endHandler = mock(DragEndHandler.class);
    ArgumentCaptor<DragEndEventWrapper> captor = ArgumentCaptor.forClass(DragEndEventWrapper.class);
    when(draggableWidget.addDragStopHandler(Matchers.any(DragStopEventHandler.class))).then(new Answer<HandlerRegistration>() {
        @Override
        public HandlerRegistration answer(InvocationOnMock invocation) throws Throwable {
            stopHandler = (DragStopEventHandler) invocation.getArguments()[0];
            return null;
        }
    });
    doNothing().when(instance).setData(Matchers.anyString(), Matchers.anyString());
    doReturn(null).when(instance).getData(Matchers.anyString());
    instance.wrap(endHandler);
    stopHandler.onDragStop(mock(DragStopEvent.class));
    verify(endHandler).onDragEnd(captor.capture());
    DragEndEventWrapper event = captor.getValue();
    event.setData("text", "text");
    event.getData("text");
    verify(instance).setData(Matchers.eq("text"), Matchers.eq("text"));
    verify(instance).getData(Matchers.eq("text"));

}
项目:empiria.player    文件:DragGapViewImpl.java   
private void addDragEndHandlerToItem(DraggableObject<FlowPanel> draggableObject) {
    draggableObject.addDragEndHandler(new DragEndHandler() {

        @Override
        public void onDragEnd(DragEndEvent event) {
            removeDraggableStyleFromItem();
            dragEndHandler.onDragEnd(event);
        }
    });
}
项目:empiria.player    文件:SourceListViewItem.java   
private void addDragEndHandler() {
    draggable.addDragEndHandler(new DragEndHandler() {
        @Override
        public void onDragEnd(DragEndEvent event) {
            scormScrollPanel.unlockScroll();
            getElement().removeClassName(styleNames.QP_DRAGGED_DRAG());
            sourceListView.onDragEvent(DragDropEventTypes.DRAG_END, SourceListViewItem.this, event);
        }
    });
}
项目:empiria.player    文件:DragStartEndHandlerWrapper.java   
public HandlerRegistration wrap(final DragEndHandler dragHandlers) {
    HandlerRegistration addDragStartHandler = draggableWidget.addDragStopHandler(new DragStopEventHandler() {

        @Override
        public void onDragStop(DragStopEvent event) {
            dragHandlers.onDragEnd(new DragEndEventWrapper(DragStartEndHandlerWrapper.this));
        }
    });
    return addDragStartHandler;
}
项目:empiria.player    文件:DragGapViewImpl.java   
@Override
public void setDragEndHandler(final DragEndHandler dragEndHandler) {
    this.dragEndHandler = dragEndHandler;
}
项目:empiria.player    文件:DragStartEndHandlerWrapperTest.java   
@Test
public void wrapDragEndHandlerTest() {
    DragEndHandler endHandler = mock(DragEndHandler.class);
    instance.wrap(endHandler);
    verify(draggableWidget).addDragStopHandler(Matchers.any(DragStopEventHandler.class));
}
项目:appinventor-extensions    文件:HandlerPanel.java   
public HandlerRegistration addDragEndHandler(DragEndHandler handler) {
  return addBitlessDomHandler(handler, DragEndEvent.getType());
}
项目:putnami-web-toolkit    文件:AbstractInput.java   
@Override
public com.google.gwt.event.shared.HandlerRegistration addDragEndHandler(DragEndHandler handler) {
    return this.addBitlessDomHandler(handler, DragEndEvent.getType());
}
项目:putnami-web-toolkit    文件:ListItem.java   
@Override
public HandlerRegistration addDragEndHandler(DragEndHandler handler) {
    return this.addBitlessDomHandler(handler, DragEndEvent.getType());
}
项目:putnami-web-toolkit    文件:Anchor.java   
@Override
public HandlerRegistration addDragEndHandler(DragEndHandler handler) {
    return this.addBitlessDomHandler(handler, DragEndEvent.getType());
}
项目:empiria.player    文件:DragGapView.java   
void setDragEndHandler(DragEndHandler dragEndHandler);
项目:empiria.player    文件:HasDragHandlers.java   
public HandlerRegistration addDragEndHandler(DragEndHandler handler);