当前位置: 首页>>代码示例>>Java>>正文


Java DragStartEvent类代码示例

本文整理汇总了Java中com.google.gwt.event.dom.client.DragStartEvent的典型用法代码示例。如果您正苦于以下问题:Java DragStartEvent类的具体用法?Java DragStartEvent怎么用?Java DragStartEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

DragStartEvent类属于com.google.gwt.event.dom.client包,在下文中一共展示了DragStartEvent类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: addDragStartHandlerToItem

import com.google.gwt.event.dom.client.DragStartEvent; //导入依赖的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


示例2: onDragStart

import com.google.gwt.event.dom.client.DragStartEvent; //导入依赖的package包/类
@Override
public void onDragStart(DragStartEvent event) {
    sourceListManagerAdapter.dragStart();

    DragDataObject dataObject = overlayTypesParser.<NativeDragDataObject>get();
    dataObject.setItemId(itemIdWrapper.getInstance());
    dataObject.setSourceId(moduleIdentifier);
    event.setData("json", dataObject.toJSON());
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:10,代码来源:SourceListConnectedDragHandler.java


示例3: addDragStartHandler

import com.google.gwt.event.dom.client.DragStartEvent; //导入依赖的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: shouldInformSourcelistManagerAndExtendEventDataOnDragStart

import com.google.gwt.event.dom.client.DragStartEvent; //导入依赖的package包/类
@Test
public void shouldInformSourcelistManagerAndExtendEventDataOnDragStart() throws Exception {
    DragStartEvent event = Mockito.mock(DragStartEvent.class);

    NativeDragDataObject dragDataObject = Mockito.mock(NativeDragDataObject.class);
    when(overlayTypesParser.get()).thenReturn(dragDataObject);

    String jsonString = "jsonString";
    when(dragDataObject.toJSON()).thenReturn(jsonString);

    dragHandler.onDragStart(event);

    verify(sourcelistManagerAdapter).dragStart();

    InOrder inOrder = Mockito.inOrder(overlayTypesParser, dragDataObject);
    inOrder.verify(overlayTypesParser)
            .get();
    inOrder.verify(dragDataObject)
            .setItemId(itemIdWrapper.getInstance());
    inOrder.verify(dragDataObject)
            .setSourceId(moduleIdentifier);
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:23,代码来源:SourceListConnectedDragHandlerTest.java


示例5: disableDragAndDrop

import com.google.gwt.event.dom.client.DragStartEvent; //导入依赖的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: onDragStart

import com.google.gwt.event.dom.client.DragStartEvent; //导入依赖的package包/类
/**
 * Handles "drag-start" events inside the element named "root".
*/
@UiHandler({"root"})
void onDragStart(DragStartEvent event, Element parent, Context context) {
  // Save the ID of the TaskProxy.
  DataTransfer dataTransfer = event.getDataTransfer();
  dataTransfer.setData("text", String.valueOf(context.getIndex()));

  // Set the image.
  dataTransfer.setDragImage(parent, 25, 15);
}
 
开发者ID:Peergos,项目名称:Peergos,代码行数:13,代码来源:DesktopTaskEditView.java


示例7: addDragStartHandler

import com.google.gwt.event.dom.client.DragStartEvent; //导入依赖的package包/类
public HandlerRegistration addDragStartHandler(DragStartHandler handler) {
  return addBitlessDomHandler(handler, DragStartEvent.getType());
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:4,代码来源:HandlerPanel.java


示例8: addDragStartHandler

import com.google.gwt.event.dom.client.DragStartEvent; //导入依赖的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


示例9: addDragStartHandler

import com.google.gwt.event.dom.client.DragStartEvent; //导入依赖的package包/类
@Override
public HandlerRegistration addDragStartHandler(DragStartHandler handler) {
	return this.addBitlessDomHandler(handler, DragStartEvent.getType());
}
 
开发者ID:Putnami,项目名称:putnami-web-toolkit,代码行数:5,代码来源:ListItem.java


示例10: addDragStartHandler

import com.google.gwt.event.dom.client.DragStartEvent; //导入依赖的package包/类
public void addDragStartHandler(DragStartHandler handler)
{
    addBitlessDomHandler(handler, DragStartEvent.getType());
}
 
开发者ID:dougkoellmer,项目名称:swarm,代码行数:5,代码来源:BaseButton.java



注:本文中的com.google.gwt.event.dom.client.DragStartEvent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。