Package com.allen_sauer.gwt.dnd.client

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


      resizeDragController = new WindowResizeDragController(boundaryPanel);
      resizeDragController.setBehaviorConstrainedToBoundaryPanel(false);
      resizeDragController.setConstrainWidgetToBoundaryPanel(false);
      resizeDragController.setBehaviorMultipleSelection(false);
      DragHandler glassHandler = new DragHandler() {
    @Override
    public void onDragEnd(DragEndEvent event) {
      GlassPanel.setGlassPanelVisibility(false, 3);
    }
    @Override
View Full Code Here


    // The VerticalPanelDropController handles DOM manipulation.
    final VerticalPanelDropController widgetDropController =
        new VerticalPanelDropController(currentVerticalPanel);

    boundaryPanel.add(currentVerticalPanel);
    DragHandler dragHandler = createDragHandler(currentVerticalPanel);

    PickupDragController widgetDragController = new PickupDragController(boundaryPanel, false);
    widgetDragController.setBehaviorMultipleSelection(false);
    widgetDragController.addDragHandler(dragHandler);
    widgetDragController.registerDropController(widgetDropController);
View Full Code Here

  /**
   * Returns a generic DragHandler for notification of drag events.
   */
  private DragHandler createDragHandler(final VerticalPanel verticalPanel) {
    // TODO(chrsmith): Provide a way to hook into events. (Required to preserve ordering.)
    return new DragHandler() {
      @Override
      public void onDragEnd(DragEndEvent event) {
        List<Widget> widgetList = Lists.newArrayList();
        for (int index = 0; index < verticalPanel.getWidgetCount(); index++) {
          widgetList.add(verticalPanel.getWidget(index));
View Full Code Here

            new ArrayList<FlowPanelWithSpacer>();
        columns.add(todo);
        columns.add(doing);
        columns.add(done);

        DragHandler demoDragHandler = new DragHandler() {
            @Override
            public void onPreviewDragStart(DragStartEvent event)
                    throws VetoDragException {
            }
View Full Code Here

        ArgumentCaptor<DragHandler> argument = ArgumentCaptor
                .forClass(DragHandler.class);
        verify(dragController, times(1)).addDragHandler(argument.capture());

        DragHandler dragHandler = argument.getValue();

        dragHandler.onDragEnd(mock(DragEndEvent.class));

        verify(hoverModel, times(1)).setHighlightedResourceSet(
                ((ResourceSet) isNull()));
    }
View Full Code Here

          dragController.setBehaviorDragProxy(true);
          dragController.setBehaviorDragStartSensitivity(1);
          dragController.setBehaviorConstrainedToBoundaryPanel(true); //do I need these?
          dragController.setConstrainWidgetToBoundaryPanel(true); //do I need these?
          dragController.setBehaviorMultipleSelection(false);
          dragController.addDragHandler(new DragHandler(){
 
        public void onDragEnd(DragEndEvent event) {
          Appointment appt = ((AppointmentWidget) event.getContext().draggable).getAppointment();
                  calendarWidget.setCommittedAppointment(appt);
                  calendarWidget.fireUpdateEvent(appt);
View Full Code Here

  }
 
  private void createResizeController() {
    if (resizeController == null) {
      resizeController = new DayViewResizeController(dayViewBody.getGrid().grid);
      resizeController.addDragHandler(new DragHandler(){

        public void onDragEnd(DragEndEvent event) {
          Appointment appt = ((AppointmentWidget) event.getContext().draggable.getParent()).getAppointment();
                    calendarWidget.setCommittedAppointment(appt);
                    calendarWidget.fireUpdateEvent(appt);
        }

        public void onDragStart(DragStartEvent event) {
          calendarWidget
          .setRollbackAppointment(((AppointmentWidget) event
              .getContext().draggable.getParent()).getAppointment()
              .clone());
        }

        public void onPreviewDragEnd(DragEndEvent event)
            throws VetoDragException {}
        public void onPreviewDragStart(DragStartEvent event)
            throws VetoDragException {}
      });
    }
     
    if(proxyResizeController == null) {
      proxyResizeController = new DayViewResizeController(dayViewBody.getGrid().grid);
      proxyResizeController.addDragHandler(new DragHandler(){
        long startTime = 0L;
        int initialX = 0;
        int initialY = 0;
        Date startDate;
       
View Full Code Here

    selectedAppointmentWidgets.clear();

    if (dragController == null) {
      dragController = new MonthViewPickupDragController(appointmentCanvas, true);
      dragController.addDragHandler(new DragHandler() {

        public void onDragEnd(DragEndEvent event) {
                    Appointment appt = ((AppointmentWidget) event.getContext().draggable).getAppointment();

                    calendarWidget.setCommittedAppointment(appt);
View Full Code Here

    _dragController.setBehaviorDragStartSensitivity(40);

    _dropController = new MindMapDropController(this);
    _dragController.registerDropController(_dropController);

    _dragController.addDragHandler(new DragHandler() {

      private NodeWidget _dragged;
      private int _index;
      private NodeWidget _parentNodeWidget;
View Full Code Here

TOP

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

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.