本文整理汇总了Java中com.google.gwt.event.dom.client.DragStartHandler类的典型用法代码示例。如果您正苦于以下问题:Java DragStartHandler类的具体用法?Java DragStartHandler怎么用?Java DragStartHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DragStartHandler类属于com.google.gwt.event.dom.client包,在下文中一共展示了DragStartHandler类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: dragStartHandlerTest
import com.google.gwt.event.dom.client.DragStartHandler; //导入依赖的package包/类
@Test
public void dragStartHandlerTest() {
DragStartHandler dragStartHandler = mock(DragStartHandler.class);
ArgumentCaptor<DragStartEventWrapper> captor = ArgumentCaptor.forClass(DragStartEventWrapper.class);
when(draggableWidget.addDragStartHandler(Matchers.any(DragStartEventHandler.class))).then(new Answer<HandlerRegistration>() {
@Override
public HandlerRegistration answer(InvocationOnMock invocation) throws Throwable {
startHandler = (DragStartEventHandler) invocation.getArguments()[0];
return null;
}
});
doNothing().when(instance).setData(Matchers.anyString(), Matchers.anyString());
doReturn(null).when(instance).getData(Matchers.anyString());
instance.wrap(dragStartHandler);
startHandler.onDragStart(Mockito.mock(DragStartEvent.class));
verify(dragStartHandler).onDragStart(captor.capture());
DragStartEventWrapper 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"));
}
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:23,代码来源:DragStartEndHandlerWrapperTest.java
示例2: addDragStartHandlerToItem
import com.google.gwt.event.dom.client.DragStartHandler; //导入依赖的package包/类
private void addDragStartHandlerToItem(DraggableObject<FlowPanel> draggableObject) {
draggableObject.addDragStartHandler(new DragStartHandler() {
@Override
public void onDragStart(DragStartEvent event) {
touchController.setTouchReservation(true);
event.getDataTransfer().setDragImage(itemWrapper.getElement(), 0, 0);
dragStartHandlerOptional.get().onDragStart(event);
}
});
}
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:11,代码来源:DragGapViewImpl.java
示例3: addDragStartHandler
import com.google.gwt.event.dom.client.DragStartHandler; //导入依赖的package包/类
private void addDragStartHandler() {
draggable.addDragStartHandler(new DragStartHandler() {
@Override
public void onDragStart(DragStartEvent event) {
scormScrollPanel.lockScroll();
touchController.setTouchReservation(true);
getElement().addClassName(styleNames.QP_DRAGGED_DRAG());
event.getDataTransfer().setDragImage(getElement(), 0, 0);
sourceListView.onDragEvent(DragDropEventTypes.DRAG_START, SourceListViewItem.this, event);
}
});
}
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:13,代码来源:SourceListViewItem.java
示例4: wrap
import com.google.gwt.event.dom.client.DragStartHandler; //导入依赖的package包/类
public HandlerRegistration wrap(final DragStartHandler dragHandlers) {
HandlerRegistration addDragStartHandler = draggableWidget.addDragStartHandler(new DragStartEventHandler() {
@Override
public void onDragStart(DragStartEvent event) {
dragHandlers.onDragStart(new DragStartEventWrapper(DragStartEndHandlerWrapper.this));
}
});
return addDragStartHandler;
}
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:10,代码来源:DragStartEndHandlerWrapper.java
示例5: disableDragAndDrop
import com.google.gwt.event.dom.client.DragStartHandler; //导入依赖的package包/类
public void disableDragAndDrop() {
this.dndEnabled = false;
// Prevent from dragging title element around
if (noDragHandler == null) {
noDragHandler = this.addDomHandler(new DragStartHandler() {
@Override
public void onDragStart(DragStartEvent event) {
event.preventDefault();
}
},
DragStartEvent.getType());
}
}
开发者ID:kiegroup,项目名称:appformer,代码行数:14,代码来源:PartListDropdown.java
示例6: setDragStartHandler
import com.google.gwt.event.dom.client.DragStartHandler; //导入依赖的package包/类
@Override
public void setDragStartHandler(DragStartHandler dragStartHandler) {
dragStartHandlerOptional = Optional.fromNullable(dragStartHandler);
}
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:5,代码来源:DragGapViewImpl.java
示例7: wrapDragStartHandlerTest
import com.google.gwt.event.dom.client.DragStartHandler; //导入依赖的package包/类
@Test
public void wrapDragStartHandlerTest() {
DragStartHandler startHandler = mock(DragStartHandler.class);
instance.wrap(startHandler);
verify(draggableWidget).addDragStartHandler(Matchers.any(DragStartEventHandler.class));
}
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:7,代码来源:DragStartEndHandlerWrapperTest.java
示例8: addDragStartHandler
import com.google.gwt.event.dom.client.DragStartHandler; //导入依赖的package包/类
public HandlerRegistration addDragStartHandler(DragStartHandler handler) {
return addBitlessDomHandler(handler, DragStartEvent.getType());
}
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:4,代码来源:HandlerPanel.java
示例9: addDragStartHandler
import com.google.gwt.event.dom.client.DragStartHandler; //导入依赖的package包/类
@Override
public com.google.gwt.event.shared.HandlerRegistration addDragStartHandler(DragStartHandler handler) {
return this.addBitlessDomHandler(handler, DragStartEvent.getType());
}
开发者ID:Putnami,项目名称:putnami-web-toolkit,代码行数:5,代码来源:AbstractInput.java
示例10: addDragStartHandler
import com.google.gwt.event.dom.client.DragStartHandler; //导入依赖的package包/类
@Override
public HandlerRegistration addDragStartHandler(DragStartHandler handler) {
return this.addBitlessDomHandler(handler, DragStartEvent.getType());
}
开发者ID:Putnami,项目名称:putnami-web-toolkit,代码行数:5,代码来源:ListItem.java
示例11: addDragStartHandler
import com.google.gwt.event.dom.client.DragStartHandler; //导入依赖的package包/类
public void addDragStartHandler(DragStartHandler handler)
{
addBitlessDomHandler(handler, DragStartEvent.getType());
}
开发者ID:dougkoellmer,项目名称:swarm,代码行数:5,代码来源:BaseButton.java
示例12: setDragStartHandler
import com.google.gwt.event.dom.client.DragStartHandler; //导入依赖的package包/类
void setDragStartHandler(DragStartHandler dragGapStartDragHandler);
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:2,代码来源:DragGapView.java
示例13: addDragStartHandler
import com.google.gwt.event.dom.client.DragStartHandler; //导入依赖的package包/类
public HandlerRegistration addDragStartHandler(DragStartHandler handler);
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:2,代码来源:HasDragHandlers.java
注:本文中的com.google.gwt.event.dom.client.DragStartHandler类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论