1. /*
  2. * @(#)UndoableEditEvent.java 1.13 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 javax.swing.event;
  8. import javax.swing.undo.*;
  9. /**
  10. * An event indicating that an operation which can be undone has occurred.
  11. * <p>
  12. * <strong>Warning:</strong>
  13. * Serialized objects of this class will not be compatible with
  14. * future Swing releases. The current serialization support is appropriate
  15. * for short term storage or RMI between applications running the same
  16. * version of Swing. A future release of Swing will provide support for
  17. * long term persistence.
  18. *
  19. * @version 1.13 11/29/01
  20. * @author Ray Ryan
  21. */
  22. public class UndoableEditEvent extends java.util.EventObject {
  23. private UndoableEdit myEdit;
  24. /**
  25. * Constructs an UndoableEditEvent object.
  26. *
  27. * @param source the Object that originated the event
  28. * (typically <code>this</code>)
  29. * @param edit an UndoableEdit object
  30. */
  31. public UndoableEditEvent(Object source, UndoableEdit edit) {
  32. super(source);
  33. myEdit = edit;
  34. }
  35. /**
  36. * Returns the edit value.
  37. *
  38. * @return the UndoableEdit object encapsulating the edit
  39. */
  40. public UndoableEdit getEdit() {
  41. return myEdit;
  42. }
  43. }