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
  • Deprecated. 

    Since 8.1, no direct replacement currently, see DropTargetExtensionConnector


    @Deprecated
    public class VHtml5DragEvent
    extends com.google.gwt.dom.client.NativeEvent

    Helper class to access html5 style drag events.

    Author:

    Vaadin Ltd

    • Field Summary

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

        BUTTON_LEFT, BUTTON_MIDDLE, BUTTON_RIGHT
    • Constructor Summary

      Constructors
      Modifier Constructor and Description
      protected VHtml5DragEvent()

      Deprecated. 

      Singleton.

    • Method Summary

      All Methods
      Modifier and Type Method and Description
      String getDataAsText(String type)

      Deprecated. 

      Returns the data for the given type as text.

      String getEffectAllowed()

      Deprecated. 

      Returns whether drop effect is allowed or not.

      VHtml5File getFile(int fileIndex)

      Deprecated. 

      Returns the file indicated by the given index.

      String getFileAsString(int index)

      Deprecated. 

      this method is no longer used internally

      int getFileCount()

      Deprecated. 

      Returns the transfer file count.

      com.google.gwt.core.client.JsArrayString getTypes()

      Deprecated. 

      Returns type values, or ["Text","Url","Html"] if types are not supported.

      boolean isFile(int fileIndex)

      Deprecated. 

      Detects if dropped element is a file.

      void setDropEffect(String effect)

      Deprecated. 

      Sets the drop effect value.

      void setEffectAllowed(String effect)

      Deprecated. 

      Sets whether drop effect is allowed or not.

      void setHtml5DataFlavor(String flavor, String data)

      Deprecated. 

      Adds a data String with the given flavor identifier.

      • 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()

        Deprecated. 

        Singleton.

    • Method Detail

      • getTypes

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

        Deprecated. 

        Returns type values, or ["Text","Url","Html"] if types are not supported.

        Returns:

        types

      • getDataAsText

        public final String getDataAsText(String type)

        Deprecated. 

        Returns the data for the given type as text.

        Parameters:

        type - the type whose data to retrieve

        Returns:

        the data as text

      • getFileAsString

        @Deprecated
        public final String getFileAsString(int index)

        Deprecated. this method is no longer used internally

        Works on FF 3.6 and possibly with gears.

        Parameters:

        index - the index of the file to get

        Returns:

        the file as text

      • setDropEffect

        public final void setDropEffect(String effect)

        Deprecated. 

        Sets the drop effect value.

        Parameters:

        effect - the drop effect

      • getEffectAllowed

        public final String getEffectAllowed()

        Deprecated. 

        Returns whether drop effect is allowed or not.

        Returns:

        true id drop effect is allowed, false otherwise

      • setEffectAllowed

        public final void setEffectAllowed(String effect)

        Deprecated. 

        Sets whether drop effect is allowed or not.

        Parameters:

        effect - true id drop effect should be allowed, false otherwise

      • getFileCount

        public final int getFileCount()

        Deprecated. 

        Returns the transfer file count.

        Returns:

        the file count

      • getFile

        public final VHtml5File getFile(int fileIndex)

        Deprecated. 

        Returns the file indicated by the given index.

        Parameters:

        fileIndex - the index of the file

        Returns:

        the file

      • isFile

        public final boolean isFile(int fileIndex)

        Deprecated. 

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

        Parameters:

        fileIndex - the index of the element to check

        Returns:

        true if the dropped element is a file, false otherwise

      • setHtml5DataFlavor

        public final void setHtml5DataFlavor(String flavor,
                                             String data)

        Deprecated. 

        Adds a data String with the given flavor identifier.

        Parameters:

        flavor - the identifier

        data - the data