Class DnDImportUtils
java.lang.Object
com.levigo.jadice.web.client.tools.dnd.DnDImportUtils
Helper class to handle common import actions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleandatastoreHasType(com.google.gwt.dom.client.NativeEvent event, String type) Checks if the datastore of the event contains the given type.static com.google.gwt.dom.client.DataTransfer.DropEffectgetDropEffectByKeys(DnDParameter parameter) Returns the matchingDataTransfer.DropEffectby the keys that are pressed.
-
Constructor Details
-
DnDImportUtils
public DnDImportUtils()
-
-
Method Details
-
getDropEffectByKeys
public static com.google.gwt.dom.client.DataTransfer.DropEffect getDropEffectByKeys(DnDParameter parameter) Returns the matchingDataTransfer.DropEffectby the keys that are pressed.- No key = MOVE
- CTRL = COPY
- CTRL + SHIFT = LINK
DataTransfer.DropEffectare based on given standards. To get the correct effect while dragging for example between the browser and a java application the same keys have to be used to define the effect. Otherwise the effect would not be reliable as feedback of the accepted action in a cross application drag and drop.- Parameters:
parameter- The parameters used for the import- Returns:
- The to the pressed keys matching dropEffect.
-
datastoreHasType
Checks if the datastore of the event contains the given type. We cannot check the content of the type but we can check the presence of the type.- Parameters:
event- The event which holds the datastore to checktype- The type to search for- Returns:
- True if the datastore contains the type, false otherwise
-