Class PortalDropEvent

  • All Implemented Interfaces:
    java.io.Serializable

    public class PortalDropEvent
    extends org.zkoss.zk.ui.event.Event
    Represents an event after a portal being dropped and before a portal being moved. Note: If you want to control portal move behavior before a portal being moved, you should call preventDefault() otherwise the result may not be as expected.

    Available in ZK EE

    Since:
    9.5.1
    Author:
    Leon
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      PortalDropEvent​(java.lang.String evtnm, org.zkoss.zk.ui.Component target, Portalchildren from, Portalchildren to, org.zkoss.zul.Panel dragged, int droppedIndex, int draggedIndex, int droppedColumnIndex, int draggedColumnIndex)
      Constructs a PortalDrop event.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.zkoss.zul.Panel getDragged()
      Returns the panel being dragged.
      int getDraggedColumnIndex()
      Returns the index of the column which dragged happened.
      int getDraggedIndex()
      Returns the dragged index.
      int getDroppedColumnIndex()
      Returns the index of the column which dropped happened.
      int getDroppedIndex()
      Returns the dropped index.
      Portalchildren getFrom()
      Returns the portalchildren from the dragged panel.
      static PortalDropEvent getPortalDropEvent​(org.zkoss.zk.au.AuRequest request)
      Converts an AU request to a portal-drop event.
      Portalchildren getTo()
      Returns the portalchildren where the dragged panel drops to.
      boolean isDefaultPrevented()
      Returns whether to process the default behavior(move the portal) after portal drop.
      void preventDefault()
      Stop the default behavior(move the portal) after portal drop.
      • Methods inherited from class org.zkoss.zk.ui.event.Event

        getData, getEvent, getName, getPage, getTarget, isPropagatable, stopPropagation, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PortalDropEvent

        public PortalDropEvent​(java.lang.String evtnm,
                               org.zkoss.zk.ui.Component target,
                               Portalchildren from,
                               Portalchildren to,
                               org.zkoss.zul.Panel dragged,
                               int droppedIndex,
                               int draggedIndex,
                               int droppedColumnIndex,
                               int draggedColumnIndex)
        Constructs a PortalDrop event.
    • Method Detail

      • getPortalDropEvent

        public static final PortalDropEvent getPortalDropEvent​(org.zkoss.zk.au.AuRequest request)
        Converts an AU request to a portal-drop event.
      • getFrom

        public Portalchildren getFrom()
        Returns the portalchildren from the dragged panel.
      • getTo

        public Portalchildren getTo()
        Returns the portalchildren where the dragged panel drops to.
      • getDragged

        public final org.zkoss.zul.Panel getDragged()
        Returns the panel being dragged.
      • getDroppedIndex

        public int getDroppedIndex()
        Returns the dropped index.
      • getDraggedIndex

        public int getDraggedIndex()
        Returns the dragged index.
      • getDroppedColumnIndex

        public int getDroppedColumnIndex()
        Returns the index of the column which dropped happened.
      • getDraggedColumnIndex

        public int getDraggedColumnIndex()
        Returns the index of the column which dragged happened.
      • isDefaultPrevented

        public boolean isDefaultPrevented()
        Returns whether to process the default behavior(move the portal) after portal drop.
      • preventDefault

        public void preventDefault()
        Stop the default behavior(move the portal) after portal drop. If you want to control portal move behavior before a portal being moved, you should call this method.