com.vaadin.client.ui.dd.
Class DDUtil
- java.lang.Object
-
- com.vaadin.client.ui.dd.DDUtil
-
public class DDUtil extends Object
Utility class for drag and drop handling.
Author:
Vaadin Ltd
-
-
Method Summary
All Methods Modifier and Type Method Description static HorizontalDropLocation
getHorizontalDropLocation(com.google.gwt.dom.client.Element element, com.google.gwt.dom.client.NativeEvent event, double leftRightRatio)
Get horizontal drop location.
static VerticalDropLocation
getVerticalDropLocation(com.google.gwt.dom.client.Element element, int offsetHeight, int clientY, double topBottomRatio)
Get vertical drop location.
static VerticalDropLocation
getVerticalDropLocation(com.google.gwt.dom.client.Element element, int offsetHeight, com.google.gwt.dom.client.NativeEvent event, double topBottomRatio)
Get vertical drop location.
static VerticalDropLocation
getVerticalDropLocation(com.google.gwt.dom.client.Element element, com.google.gwt.dom.client.NativeEvent event, double topBottomRatio)
Get vertical drop location.
-
-
-
Method Detail
-
getVerticalDropLocation
public static VerticalDropLocation getVerticalDropLocation(com.google.gwt.dom.client.Element element, com.google.gwt.dom.client.NativeEvent event, double topBottomRatio)
Get vertical drop location.
Parameters:
element
- the drop target elementevent
- the latestNativeEvent
that relates to this drag operationtopBottomRatio
- the ratio that determines how big portion of the element on each end counts for indicating desire to drop above or below the element rather than on top of itReturns:
the drop location
-
getVerticalDropLocation
public static VerticalDropLocation getVerticalDropLocation(com.google.gwt.dom.client.Element element, int offsetHeight, com.google.gwt.dom.client.NativeEvent event, double topBottomRatio)
Get vertical drop location.
Parameters:
element
- the drop target elementoffsetHeight
- the height of an element relative to the layoutevent
- the latestNativeEvent
that relates to this drag operationtopBottomRatio
- the ratio that determines how big portion of the element on each end counts for indicating desire to drop above or below the element rather than on top of itReturns:
the drop location
-
getVerticalDropLocation
public static VerticalDropLocation getVerticalDropLocation(com.google.gwt.dom.client.Element element, int offsetHeight, int clientY, double topBottomRatio)
Get vertical drop location.
Parameters:
element
- the drop target elementoffsetHeight
- the height of an element relative to the layoutclientY
- the y-coordinate of the latest event that relates to this drag operationtopBottomRatio
- the ratio that determines how big portion of the element on each end counts for indicating desire to drop above or below the element rather than on top of itReturns:
the drop location
-
getHorizontalDropLocation
public static HorizontalDropLocation getHorizontalDropLocation(com.google.gwt.dom.client.Element element, com.google.gwt.dom.client.NativeEvent event, double leftRightRatio)
Get horizontal drop location.
Parameters:
element
- the drop target elementevent
- the latestNativeEvent
that relates to this drag operationleftRightRatio
- the ratio that determines how big portion of the element on each end counts for indicating desire to drop beside the element rather than on top of itReturns:
the drop location
-
-