1. /*
  2. * @(#)UndoableEditEvent.java 1.14 00/02/02
  3. *
  4. * Copyright 1997-2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. package javax.swing.event;
  11. import javax.swing.undo.*;
  12. /**
  13. * An event indicating that an operation which can be undone has occurred.
  14. * <p>
  15. * <strong>Warning:</strong>
  16. * Serialized objects of this class will not be compatible with
  17. * future Swing releases. The current serialization support is appropriate
  18. * for short term storage or RMI between applications running the same
  19. * version of Swing. A future release of Swing will provide support for
  20. * long term persistence.
  21. *
  22. * @version 1.14 02/02/00
  23. * @author Ray Ryan
  24. */
  25. public class UndoableEditEvent extends java.util.EventObject {
  26. private UndoableEdit myEdit;
  27. /**
  28. * Constructs an UndoableEditEvent object.
  29. *
  30. * @param source the Object that originated the event
  31. * (typically <code>this</code>)
  32. * @param edit an UndoableEdit object
  33. */
  34. public UndoableEditEvent(Object source, UndoableEdit edit) {
  35. super(source);
  36. myEdit = edit;
  37. }
  38. /**
  39. * Returns the edit value.
  40. *
  41. * @return the UndoableEdit object encapsulating the edit
  42. */
  43. public UndoableEdit getEdit() {
  44. return myEdit;
  45. }
  46. }