Class BaseActionEventDrop

java.lang.Object
java.util.EventObject
javax.faces.event.FacesEvent
javax.faces.event.ActionEvent
org.eclnt.jsfserver.elements.BaseActionEvent
org.eclnt.jsfserver.elements.events.BaseActionEventDrop
All Implemented Interfaces:
Serializable, IBaseActionEvent
Direct Known Subclasses:
BaseActionEventDropCopy

public class BaseActionEventDrop extends BaseActionEvent
The event on the one hand provides the data about what was dropped - by calling method getDragInfo() you receive the matching string between the DRAGSEND information of the sending component and the DROPRECEIVE information of the receiving component.

In addition the coordinates of the drop event are passed - both as integer percentage value, as float percentage value and as pixel value. The pixel information contains both the position of the mouse pointer and the delta between the mouse pointer and the shape that was dragged/dropped.

There are a couple of helper methods that transfer the pixel position into a zone definition - is encoding the zone in the DROPRECEIVE information.
See Also:
  • Constructor Details

    • BaseActionEventDrop

      public BaseActionEventDrop(javax.faces.component.UIComponent component, String type)
  • Method Details

    • getDragInfo

      public String getDragInfo()
      This is the information that was passed from the component from which the drag & drop was initiated. Example: "article:4711".
    • getPercentageVertical

      public int getPercentageVertical()
      Location of the drop position in percentages of the size of the component, on which the drop was executed.
    • getPercentageHorizontal

      public int getPercentageHorizontal()
      Location of the drop position in percentages of the size of the component, on which the drop was executed.
    • getPercentageVerticalAsFloat

      public float getPercentageVerticalAsFloat()
      Location of the drop position in percentages of the size of the component, on which the drop was executed.
    • getPercentageHorizontaAsFloat

      public float getPercentageHorizontaAsFloat()
      Location of the drop position in percentages of the size of the component, on which the drop was executed.
    • getPixelX

      public int getPixelX()
      X-Pixel position of the drop position. This is the position of the mouse cursor.
    • getPixelY

      public int getPixelY()
      Y-Pixel position of the drop position. This is the position of the mouse cursor.
    • getDeltaX

      public int getDeltaX()
      This the delta of the rectangle that is moved while drag & dropping compared to the position of the mouse cursor. Typically the mouse cursor is picked within the component, e.g. at position x:20, y:20. "DeltaX" is "0" if the mouse cursor is positioned at the very top left by the user.
    • getDeltaY

      public int getDeltaY()
      This the delta of the rectangle that is moved while drag & dropping compared to the position of the mouse cursor. Typically the mouse cursor is picked within the component, e.g. at position x:20, y:20. "DeltaY" is "0" if the mouse cursor is positioned at the very top left by the user.
    • getGridIndex

      public int getGridIndex()
    • getPercentageDeltaX

      public float getPercentageDeltaX()
      This is the "deltaX" value, now expressed as percentage figure - based on the width of the component on which the drop happened.
    • getPercentageDeltaY

      public float getPercentageDeltaY()
      This is the "deltaY" value, now expressed as percentage figure - based on the height of the component on which the drop happened.
    • checkIfDroppedInZoneSidesTop

      public boolean checkIfDroppedInZoneSidesTop()
    • checkIfDroppedInZoneSidesBottom

      public boolean checkIfDroppedInZoneSidesBottom()
    • checkIfDroppedInZoneSidesLeft

      public boolean checkIfDroppedInZoneSidesLeft()
    • checkIfDroppedInZoneSidesRight

      public boolean checkIfDroppedInZoneSidesRight()
    • checkIfDroppedInZoneHorizontalsplitLeft

      public boolean checkIfDroppedInZoneHorizontalsplitLeft()
    • checkIfDroppedInZoneHorizontalsplitRight

      public boolean checkIfDroppedInZoneHorizontalsplitRight()
    • checkIfDroppedInZoneVerticalsplitTop

      public boolean checkIfDroppedInZoneVerticalsplitTop()
    • checkIfDroppedInZoneVerticalsplitBottom

      public boolean checkIfDroppedInZoneVerticalsplitBottom()
    • checkIfDroppedInZoneEdgesLeftTop

      public boolean checkIfDroppedInZoneEdgesLeftTop()
    • checkIfDroppedInZoneEdgesRightTop

      public boolean checkIfDroppedInZoneEdgesRightTop()
    • checkIfDroppedInZoneEdgesLeftBottom

      public boolean checkIfDroppedInZoneEdgesLeftBottom()
    • checkIfDroppedInZoneEdgesRightBottom

      public boolean checkIfDroppedInZoneEdgesRightBottom()
    • checkIfDroppedInZoneSidesandcenterTop

      public boolean checkIfDroppedInZoneSidesandcenterTop()
    • checkIfDroppedInZoneSidesandcenterBottom

      public boolean checkIfDroppedInZoneSidesandcenterBottom()
    • checkIfDroppedInZoneSidesandcenterLeft

      public boolean checkIfDroppedInZoneSidesandcenterLeft()
    • checkIfDroppedInZoneSidesandcenterRight

      public boolean checkIfDroppedInZoneSidesandcenterRight()
    • checkIfDroppedInZoneSidesandcenterCenter

      public boolean checkIfDroppedInZoneSidesandcenterCenter()