1 /* 2 * @(#)UndoableEditEvent.java 1.18 03/12/19 3 * 4 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 5 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 6 */ 7 8 package javax.swing.event; 9 10 import javax.swing.undo.*; 11 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 18 * appropriate for short term storage or RMI between applications running 19 * the same version of Swing. As of 1.4, support for long term storage 20 * of all JavaBeans<sup><font size="-2">TM</font></sup> 21 * has been added to the <code>java.beans</code> package. 22 * Please see {@link java.beans.XMLEncoder}. 23 * 24 * @version 1.18 12/19/03 25 * @author Ray Ryan 26 */ 27 public class UndoableEditEvent extends java.util.EventObject { 28 private UndoableEdit myEdit; 29 30 /** 31 * Constructs an UndoableEditEvent object. 32 * 33 * @param source the Object that originated the event 34 * (typically <code>this</code>) 35 * @param edit an UndoableEdit object 36 */ 37 public UndoableEditEvent(Object source, UndoableEdit edit) { 38 super(source); 39 myEdit = edit; 40 } 41 42 /** 43 * Returns the edit value. 44 * 45 * @return the UndoableEdit object encapsulating the edit 46 */ 47 public UndoableEdit getEdit() { 48 return myEdit; 49 } 50 } 51