1. /*
  2. * @(#)DragSourceEvent.java 1.10 01/11/29
  3. *
  4. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.awt.dnd;
  8. import java.awt.dnd.DragSourceContext;
  9. import java.util.EventObject;
  10. /**
  11. * This class is the base class for
  12. * <code>DragSourceDragEvent</code> and
  13. * <code>DragSourceDropEvent</code>.
  14. * @since JDK1.2
  15. *
  16. */
  17. public class DragSourceEvent extends EventObject {
  18. /**
  19. * Construct a <code>DragSourceEvent</code>
  20. * given a specified <code>DragSourceContext</code>.
  21. * <P>
  22. * @param dsc the <code>DragSourceContext</code>
  23. */
  24. public DragSourceEvent(DragSourceContext dsc) { super(dsc); }
  25. /**
  26. * This method returns the <code>DragSourceContext</code> that
  27. * originated the event.
  28. * <P>
  29. * @return the <code>DragSourceContext</code> that originated the event
  30. */
  31. public DragSourceContext getDragSourceContext() {
  32. return (DragSourceContext)getSource();
  33. }
  34. }