com.vaadin.client.ui.calendar.schedule.dd.
Class CalendarWeekDropHandler
- java.lang.Object
-
- com.vaadin.client.ui.dd.VAbstractDropHandler
-
- com.vaadin.client.ui.calendar.schedule.dd.CalendarDropHandler
-
- com.vaadin.client.ui.calendar.schedule.dd.CalendarWeekDropHandler
-
All Implemented Interfaces:
public class CalendarWeekDropHandler extends CalendarDropHandler
Handles DD when the weekly view is showing in the Calendar. In the weekly view, drops are only allowed in the the time slots for each day. The slot index and the day index are included in the drop details sent to the server.
Since:
7.1
Author:
Vaadin Ltd.
-
-
Field Summary
-
Fields inherited from class com.vaadin.client.ui.calendar.schedule.dd.CalendarDropHandler
calendarConnector
-
-
Constructor Summary
Constructors Constructor Description CalendarWeekDropHandler(CalendarConnector connector)
-
Method Summary
All Methods Modifier and Type Method Description protected void
dragAccepted(VDragEvent drag)
This method is called when a valid drop location was found with
AcceptCriterion
either via client or server side check.void
dragEnter(VDragEvent drag)
The default implementation in
VAbstractDropHandler
checks if the Transferable is accepted.void
dragLeave(VDragEvent drag)
Default implementation does nothing.
void
dragOver(VDragEvent drag)
Default implementation does nothing.
boolean
drop(VDragEvent drag)
The default implemmentation visits server if
AcceptCriterion
can't be verified on client or ifAcceptCriterion
are met on client.-
Methods inherited from class com.vaadin.client.ui.calendar.schedule.dd.CalendarDropHandler
getApplicationConnection, getConnector
-
Methods inherited from class com.vaadin.client.ui.dd.VAbstractDropHandler
updateAcceptRules, validate
-
-
-
-
Constructor Detail
-
CalendarWeekDropHandler
public CalendarWeekDropHandler(CalendarConnector connector)
-
-
Method Detail
-
dragAccepted
protected void dragAccepted(VDragEvent drag)
Description copied from class:
VAbstractDropHandler
This method is called when a valid drop location was found with
AcceptCriterion
either via client or server side check.Implementations can set some hints for users here to highlight that the drag is on a valid drop location.
Specified by:
dragAccepted
in classVAbstractDropHandler
-
dragOver
public void dragOver(VDragEvent drag)
Description copied from class:
VAbstractDropHandler
Default implementation does nothing.
Specified by:
dragOver
in interfaceVDropHandler
Overrides:
dragOver
in classVAbstractDropHandler
-
dragEnter
public void dragEnter(VDragEvent drag)
Description copied from class:
VAbstractDropHandler
The default implementation in
VAbstractDropHandler
checks if the Transferable is accepted.If transferable is accepted (either via server visit or client side rules) the default implementation calls abstract
VAbstractDropHandler.dragAccepted(VDragEvent)
method.If drop handler has distinct places where some parts may accept the
Transferable
and others don't, one should use similar validation logic in dragOver method and replace this method with empty implementation.Specified by:
dragEnter
in interfaceVDropHandler
Overrides:
dragEnter
in classVAbstractDropHandler
Parameters:
drag
- DragEvent which contains the transferable and other information for the operation
-
drop
public boolean drop(VDragEvent drag)
Description copied from class:
VAbstractDropHandler
The default implemmentation visits server if
AcceptCriterion
can't be verified on client or ifAcceptCriterion
are met on client.Specified by:
drop
in interfaceVDropHandler
Overrides:
drop
in classVAbstractDropHandler
Returns:
true if the Tranferrable of this drag event needs to be sent to the server, false if drop is rejected or no server side event should be sent
-
dragLeave
public void dragLeave(VDragEvent drag)
Description copied from class:
VAbstractDropHandler
Default implementation does nothing. Implementors should clean possible emphasis or drag icons here.
Specified by:
dragLeave
in interfaceVDropHandler
Overrides:
dragLeave
in classVAbstractDropHandler
Parameters:
drag
- DragEvent which contains the transferable and other information for the operation
-
-