Examples of DropEvent


Examples of com.google.gwt.event.dom.client.DropEvent

  private <W extends Widget & HasAllDragAndDropHandlers> void verifyDropEventSink(W w) {
    DropHandlerImpl handler = new DropHandlerImpl();
    w.addDropHandler(handler);

    assertFalse(handler.hasEventFired());
    w.fireEvent(new DropEvent() {
    });
    assertTrue(handler.hasEventFired());
  }
View Full Code Here

Examples of org.olat.core.gui.control.dragdrop.DropEvent

        for (Iterator it_accdrags = accDrags.iterator(); it_accdrags.hasNext();) {
          Draggable dr = (Draggable) it_accdrags.next();
          DragSource ds = dr.find(dropid);
          if (ds != null) {
            // found!
            fireEvent(ureq, new DropEvent(ds, null));
            return;
          }
         
        }
      } else {
View Full Code Here

Examples of org.richfaces.event.DropEvent

            // TODO - log
            return;
        }

        AbstractDropTarget dropTarget = (AbstractDropTarget) component;
        new DropEvent(dropTarget, dropTarget.getDropValue(), dragSourceContextCallBack.getDragSource(),
            dragSourceContextCallBack.getDragValue()).queue();
    }
View Full Code Here

Examples of org.richfaces.event.DropEvent

          new ContextCallbackWrapper(draggableDecoderContextCallback));
     
        Draggable draggable = draggableDecoderContextCallback.getDraggable();
        if (draggable != null) {
          if (draggableDecoderContextCallback.isValid()) {
            DropEvent dropEvent = new DropEvent(component);
            dropEvent.setDraggableSource(draggable);
            dropEvent.setDragType(draggableDecoderContextCallback.getDragType());
            dropEvent.setDragValue(draggableDecoderContextCallback.getDragValue());

            dropEvent.queue();
          } else {
            String text = MessageFormat.format(
                MISTYPED_DND_MESSAGE,
                new Object[] {
                    MessageUtil.getLabel(context, component),
View Full Code Here

Examples of org.richfaces.event.DropEvent

      }
     
      Dropzone dropzone = (Dropzone) component;
     
      eventsExchanger.mailEvent(dragSourceId, component,
          context, new DropEvent(component), dropEventsCallback,
          dropzone.getAcceptedTypes(),
          dropzone.getDropValue(), false
      );
    }
  }
View Full Code Here

Examples of org.richfaces.event.DropEvent

  public final void testQueueEventFacesEvent() {
    NodeExpandedEvent nodeExpandedEvent = new NodeExpandedEvent(tree);
    NodeSelectedEvent nodeSelectedEvent = new NodeSelectedEvent(tree, null);
    ExpandAllCommandEvent expandAllCommandEvent = new ExpandAllCommandEvent(tree);
    DragEvent dragEvent = new DragEvent(treeNode);
    DropEvent dropEvent = new DropEvent(treeNode);

    tree.queueEvent(nodeExpandedEvent);
    tree.queueEvent(nodeSelectedEvent);
    tree.queueEvent(expandAllCommandEvent);
    treeNode.queueEvent(dragEvent);
    treeNode.queueEvent(dropEvent);

    assertEquals(PhaseId.INVOKE_APPLICATION, nodeExpandedEvent.getPhaseId());
    assertEquals(PhaseId.UPDATE_MODEL_VALUES, nodeSelectedEvent.getPhaseId());
    assertEquals(PhaseId.INVOKE_APPLICATION, expandAllCommandEvent.getPhaseId());
    assertEquals(PhaseId.INVOKE_APPLICATION, dragEvent.getPhaseId());
    assertEquals(PhaseId.INVOKE_APPLICATION, dropEvent.getPhaseId());
  }
View Full Code Here

Examples of org.richfaces.event.DropEvent

    NodeExpandedEvent nodeExpandedEvent = new NodeExpandedEvent(tree);
    NodeSelectedEvent nodeSelectedEvent = new NodeSelectedEvent(tree, null);
    ExpandAllCommandEvent expandAllCommandEvent = new ExpandAllCommandEvent(tree);
    DragEvent dragEvent = new DragEvent(treeNode);
    DropEvent dropEvent = new DropEvent(treeNode);

    tree.queueEvent(nodeExpandedEvent);
    tree.queueEvent(nodeSelectedEvent);
    tree.queueEvent(expandAllCommandEvent);
    treeNode.queueEvent(dragEvent);
    treeNode.queueEvent(dropEvent);

    assertEquals(PhaseId.APPLY_REQUEST_VALUES, nodeExpandedEvent.getPhaseId());
    assertEquals(PhaseId.APPLY_REQUEST_VALUES, nodeSelectedEvent.getPhaseId());
    assertEquals(PhaseId.APPLY_REQUEST_VALUES, expandAllCommandEvent.getPhaseId());
    assertEquals(PhaseId.APPLY_REQUEST_VALUES, dragEvent.getPhaseId());
    assertEquals(PhaseId.APPLY_REQUEST_VALUES, dropEvent.getPhaseId());
  }
View Full Code Here

Examples of org.richfaces.event.DropEvent

    // ------------ Invoke listeners --------------------
    NodeExpandedEvent nodeExpandedEvent = new NodeExpandedEvent(tree);
    NodeSelectedEvent nodeSelectedEvent = new NodeSelectedEvent(tree, null);
    ExpandAllCommandEvent expandAllCommandEvent = new ExpandAllCommandEvent(tree);
    DragEvent dragEvent = new DragEvent(tree);
    DropEvent dropEvent = new DropEvent(tree);

    tree.queueEvent(nodeExpandedEvent);
    tree.queueEvent(dropEvent);
    tree.queueEvent(nodeSelectedEvent);
    tree.queueEvent(dragEvent);
View Full Code Here

Examples of org.richfaces.event.DropEvent

  public void testDropEvent() {
    MockMethodBinding binding = new MockMethodBinding();
    treeNode.setDropListener(binding);
 
    DropEvent event = new DropEvent(treeNode);
    TreeEvents.invokeListenerBindings(treeNode, event, facesContext);

    Object[][] args = binding.getInvocationArgs();
    assertEquals(1, args.length);
    assertEquals(1, args[0].length);
View Full Code Here

Examples of org.richfaces.event.DropEvent

          new ContextCallbackWrapper(draggableDecoderContextCallback));
     
        Draggable draggable = draggableDecoderContextCallback.getDraggable();
        if (draggable != null) {
          if (draggableDecoderContextCallback.isValid()) {
            DropEvent dropEvent = new DropEvent(component);
            dropEvent.setDraggableSource(draggable);
            dropEvent.setDragType(draggableDecoderContextCallback.getDragType());
            dropEvent.setDragValue(draggableDecoderContextCallback.getDragValue());

            dropEvent.queue();
          } else {
            String text = MessageFormat.format(
                MISTYPED_DND_MESSAGE,
                new Object[] {
                    MessageUtil.getLabel(context, component),
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.