com.vaadin.client.ui.dd.

Class VHtml5DragEvent

  • java.lang.Object
    • com.google.gwt.core.client.JavaScriptObject
      • com.google.gwt.dom.client.NativeEvent
        • com.vaadin.client.ui.dd.VHtml5DragEvent
  • public class VHtml5DragEvent
    extends com.google.gwt.dom.client.NativeEvent

    Helper class to access html5 style drag events. TODO Gears support ?

    • Field Summary

      • Fields inherited from class com.google.gwt.dom.client.NativeEvent

        BUTTON_LEFT, BUTTON_MIDDLE, BUTTON_RIGHT
    • Constructor Summary

      Constructors
      Modifier Constructor Description
      protected VHtml5DragEvent()  
    • Method Summary

      All Methods
      Modifier and Type Method Description
      String getDataAsText​(String type)  
      String getEffectAllowed()  
      VHtml5File getFile​(int fileIndex)  
      String getFileAsString​(int index)

      Works on FF 3.6 and possibly with gears.

      int getFileCount()  
      com.google.gwt.core.client.JsArrayString getTypes()  
      boolean isFile​(int fileIndex)

      Detects if dropped element is a file.

      void setDropEffect​(String effect)  
      void setEffectAllowed​(String effect)  
      void setHtml5DataFlavor​(String flavor, String data)  
      • Methods inherited from class com.google.gwt.dom.client.NativeEvent

        getAltKey, getButton, getChangedTouches, getCharCode, getClientX, getClientY, getCtrlKey, getCurrentEventTarget, getDataTransfer, getEventTarget, getKeyCode, getMetaKey, getMouseWheelVelocityY, getRelatedEventTarget, getRotation, getScale, getScreenX, getScreenY, getShiftKey, getString, getTargetTouches, getTouches, getType, preventDefault, stopPropagation
      • Methods inherited from class com.google.gwt.core.client.JavaScriptObject

        cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString
    • Constructor Detail

      • VHtml5DragEvent

        protected VHtml5DragEvent()
    • Method Detail

      • getTypes

        public final com.google.gwt.core.client.JsArrayString getTypes()
      • getDataAsText

        public final String getDataAsText​(String type)
      • getFileAsString

        public final String getFileAsString​(int index)

        Works on FF 3.6 and possibly with gears.

        Parameters:

        index -

        Returns:

      • setDropEffect

        public final void setDropEffect​(String effect)
      • getEffectAllowed

        public final String getEffectAllowed()
      • setEffectAllowed

        public final void setEffectAllowed​(String effect)
      • getFileCount

        public final int getFileCount()
      • getFile

        public final VHtml5File getFile​(int fileIndex)
      • isFile

        public final boolean isFile​(int fileIndex)

        Detects if dropped element is a file.
        Always returns true on Safari even if the dropped element is a folder.

      • setHtml5DataFlavor

        public final void setHtml5DataFlavor​(String flavor,
                                             String data)