2 * Copyright 1998-2001 Sun Microsystems, Inc.
4 * See the file "license.terms" for information on usage and
5 * redistribution of this file, and for a DISCLAIMER OF ALL
8 package com.sun.speech.engine;
10 import javax.speech.SpeechEvent;
11 import java.util.EventObject;
14 * Wraps an arbitrary event object (from <code>EventObject</code>)
15 * in a <code>SpeechEvent</code> so that it can be dispatched through
16 * the speech event dispatch mechanism.
17 * One use of this is in the <code>BaseEngineProperties</code> class
18 * that needs to wrap and issue <code>PropertyChangeEvents</code>.
20 * @see SpeechEventUtilities
23 public class SpeechEventWrapper extends SpeechEvent {
25 * Use an id that won't be confused with JSAPI event ids.
27 protected static int WRAPPER_ID = -25468;
32 protected EventObject eventObject;
37 * @param e the <code>EventObject</code> to wrap.
39 public SpeechEventWrapper(EventObject e) {
40 super(e.getSource(), WRAPPER_ID);
45 * Gets the wrapped event.
47 * @return the event that was passed to the constructor
49 public EventObject getEventObject() {