Examples of DragContext


Examples of com.allen_sauer.gwt.dnd.client.DragContext

     * @param event
     *            the event that fires when dragging ends.
     */
    public void onDragEnd(final DragEndEvent event)
    {
        final DragContext context = event.getContext();
        final GadgetPanel gadgetZone = (GadgetPanel) context.draggable;

        int zoneNumber = 0;
        int zoneIndex = 0;
        final Widget dropTarget = context.finalDropController.getDropTarget();
View Full Code Here

Examples of com.allen_sauer.gwt.dnd.client.DragContext

    @Test
    public void compassDelegationTest() {
        CompassWidget compass = compassDropController.mock;

        DragContext dragContext = mock( DragContext.class );

        compassDropController.onEnter( dragContext );
        verify( compass ).onEnter( dragContext );

        compassDropController.onLeave( dragContext );
View Full Code Here

Examples of com.allen_sauer.gwt.dnd.client.DragContext

    @Test
    public void onDropDoesNothing() {
        //Mock If not dropTarget has been identified do nothing
        compassDropController.mockDropTargetPositionNone();

        DragContext dragContext = mock( DragContext.class );
        compassDropController.onDrop( dragContext );

        verify( compassDropController.mock,never() ).onDrop( dragContext );
    }
View Full Code Here

Examples of com.allen_sauer.gwt.dnd.client.DragContext

    public void onDropNoEffect() {
        compassDropController.mockDropTargetPosition(Position.SELF);

        compassDropController.mockSamePositionDrag(view);

        DragContext dragContext = mock( DragContext.class );

        compassDropController.onDrop( dragContext );

        verify( panelManager, never()  ).addWorkbenchPanel( any( PanelDefinition.class), any(Position.class), any(Integer.class) , any(Integer.class), any(Integer.class), any(Integer.class));
View Full Code Here

Examples of com.allen_sauer.gwt.dnd.client.DragContext

    public void onDropHappens() {
        compassDropController.mockDropTargetPosition(Position.WEST);

        compassDropController.mockSamePositionDrag(view);

        DragContext dragContext = mock( DragContext.class );

        compassDropController.onDrop( dragContext );

        verify( panelManager ).addWorkbenchPanel( any( PanelDefinition.class), any(Position.class), any(Integer.class) , any(Integer.class), any(Integer.class), any(Integer.class));
View Full Code Here

Examples of gwtquery.plugins.draggable.client.events.DragContext

  protected boolean mouseDrag(Element currentDraggable, GqEvent event) {
    dragStart = true;

    boolean result = false;

    DragContext ctx = new DragContext(currentDraggable, currentDraggable,
        selectedDraggables);
    result |= mouseDragImpl(ctx,
        DraggableHandler.getInstance(currentDraggable), event, false);

    for (Element draggable : selectedDraggables) {
      if (draggable != currentDraggable) {
        ctx = new DragContext(draggable, currentDraggable, selectedDraggables);
        result |= mouseDragImpl(ctx, DraggableHandler.getInstance(draggable),
            event, false);
      }

    }
View Full Code Here

Examples of gwtquery.plugins.draggable.client.events.DragContext

        }
      });
    }

    // first call mouseStart for the initial draggable
    DragContext ctx = new DragContext(currentDraggable, currentDraggable,
        selectedDraggables);
    result |= mouseStartImpl(ctx, event);

    // call mouseStartImpl for the others
    for (Element draggable : selectedDraggables) {
      if (draggable != currentDraggable) {
        ctx = new DragContext(draggable, currentDraggable, selectedDraggables);
        result |= mouseStartImpl(ctx, event);
      }
    }

    return result;
View Full Code Here

Examples of gwtquery.plugins.draggable.client.events.DragContext

  @Override
  protected boolean mouseStop(Element initialDraggable, final GqEvent event) {
    boolean result = false;

    DragContext ctx = new DragContext(initialDraggable, initialDraggable,
        selectedDraggables);
    result |= mouseStopImpl(ctx, event);

    for (Element draggable : selectedDraggables) {
      if (draggable != initialDraggable) {
        ctx = new DragContext(draggable, initialDraggable, selectedDraggables);
        result |= mouseStopImpl(ctx, event);
      }

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.