com.dlsc.flexgantt.swing.layer.system

## Class DragLayerEvent

- java.lang.Object
- - java.util.EventObject
  - - com.dlsc.flexgantt.swing.layer.system.DragLayerEvent

- All Implemented Interfaces:
    Serializable

      public class DragLayerEvent
      extends EventObject

  An event object that encapsulates the most important information about a drag & drop operation executed in an instance of `DragLayer`.
  Since:
    1.0
  Version:
    $Revision: 1.8 $
  Author:
    Dirk Lemmermann
  See Also:
    `DragLayer.addDragLayerListener(IDragLayerListener)`, Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `DragLayerEvent.ID` An enumerator with different identifiers that can be used to distinguish between different types of events.

  - ### Field Summary

    - ### Fields inherited from class java.util.EventObject

      `source`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DragLayerEvent(DragLayer layer, DragLayerEvent.ID id, ObjectBounds draggedObjectBounds, ITimeSpan span, int dropAction)` Constructs a new event object.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ObjectBounds` | `getDraggedObjectBounds()` Returns the bounds of the object that is being dragged around (or resized) by the user.
    `DragLayer` | `getDragLayer()` Returns the drag layer where the drag operation takes place.
    `int` | `getDropAction()` Returns the drop action as requested by the user (copy, move).
    `DragLayerEvent.ID` | `getId()` Returns the event ID.
    `ITimeSpan` | `getTimeSpan()` Returns the time span to which the dragged object has been moved (or resized) by the user.

    - ### Methods inherited from class java.util.EventObject

      `getSource, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### DragLayerEvent

          public DragLayerEvent(DragLayer layer,
                                DragLayerEvent.ID id,
                                ObjectBounds draggedObjectBounds,
                                ITimeSpan span,
                                int dropAction)

      Constructs a new event object.
      Parameters:
        `layer` - the drag layer where the event occured
        `id` - the type of event
        `draggedObjectBounds` - the object that is being dragged
        `span` - the time span that will be applied to the dragged object
        `dropAction` - the drop action specified by the user: copy or move (possible values are listed in `DnDConstants`)
      Since:
        1.0

  - ### Method Detail

    - #### getId

          public DragLayerEvent.ID getId()

      Returns the event ID.
      Returns:
        the event ID
      Since:
        1.0

    - #### getDragLayer

          public DragLayer getDragLayer()

      Returns the drag layer where the drag operation takes place.
      Returns:
        the origin / the source of the event
      Since:
        1.0

    - #### getTimeSpan

          public ITimeSpan getTimeSpan()

      Returns the time span to which the dragged object has been moved (or resized) by the user.
      Returns:
        the time span that will be applied to the dragged object once the user releases the mouse
      Since:
        1.0

    - #### getDraggedObjectBounds

          public ObjectBounds getDraggedObjectBounds()

      Returns the bounds of the object that is being dragged around (or resized) by the user.
      Returns:
        the bounds of the dragged object
      Since:
        1.0

    - #### getDropAction

          public int getDropAction()

      Returns the drop action as requested by the user (copy, move). Possible values are listed in `DnDConstants`.
      Returns:
        the drop action
      Since:
        1.0

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.