Class VAbstractDropHandler

    • Constructor Detail

      • VAbstractDropHandler

        public VAbstractDropHandler()
    • Method Detail

      • dragLeave

        public void dragLeave​(VDragEvent drag)
        Default implementation does nothing. Implementors should clean possible emphasis or drag icons here.
        Specified by:
        dragLeave in interface VDropHandler
        Parameters:
        drag - DragEvent which contains the transferable and other information for the operation
      • dragEnter

        public void dragEnter​(VDragEvent drag)
        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 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 interface VDropHandler
        Parameters:
        drag - DragEvent which contains the transferable and other information for the operation
      • dragAccepted

        protected abstract void dragAccepted​(VDragEvent drag)
        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.

        Parameters:
        drag -
      • drop

        public boolean drop​(VDragEvent drag)
        The default implemmentation visits server if AcceptCriterion can't be verified on client or if AcceptCriterion are met on client.
        Specified by:
        drop in interface VDropHandler
        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