Package com.allen_sauer.gwt.dnd.client

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


    @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

    @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

    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

    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

TOP

Related Classes of com.allen_sauer.gwt.dnd.client.DragContext

Copyright © 2018 www.massapicom. 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.