43 * @see Line
44 * @see LineListener#update
45 * @since 1.3
46 *
47 * @serial exclude
48 */
49 public class LineEvent extends EventObject {
50
51 /**
52 * Use serialVersionUID from JDK 1.3 for interoperability.
53 */
54 private static final long serialVersionUID = -1274246333383880410L;
55
56 /**
57 * The kind of line event ({@code OPEN}, {@code CLOSE}, {@code START}, or
58 * {@code STOP}).
59 *
60 * @see #getType
61 * @serial
62 */
63 private final Type type;
64
65 /**
66 * The media position when the event occurred, expressed in sample frames.
67 * Note that this field is only relevant to certain events generated by data
68 * lines, such as {@code START} and {@code STOP}. For events generated by
69 * lines that do not count sample frames, and for any other events for which
70 * this value is not known, the position value should be
71 * {@link AudioSystem#NOT_SPECIFIED}.
72 *
73 * @see #getFramePosition
74 * @serial
75 */
76 private final long position;
77
78 /**
79 * Constructs a new event of the specified type, originating from the
80 * specified line.
81 *
82 * @param line the source of this event
|
43 * @see Line
44 * @see LineListener#update
45 * @since 1.3
46 *
47 * @serial exclude
48 */
49 public class LineEvent extends EventObject {
50
51 /**
52 * Use serialVersionUID from JDK 1.3 for interoperability.
53 */
54 private static final long serialVersionUID = -1274246333383880410L;
55
56 /**
57 * The kind of line event ({@code OPEN}, {@code CLOSE}, {@code START}, or
58 * {@code STOP}).
59 *
60 * @see #getType
61 * @serial
62 */
63 @SuppressWarnings("serial") // Not statically typed as Serializable
64 private final Type type;
65
66 /**
67 * The media position when the event occurred, expressed in sample frames.
68 * Note that this field is only relevant to certain events generated by data
69 * lines, such as {@code START} and {@code STOP}. For events generated by
70 * lines that do not count sample frames, and for any other events for which
71 * this value is not known, the position value should be
72 * {@link AudioSystem#NOT_SPECIFIED}.
73 *
74 * @see #getFramePosition
75 * @serial
76 */
77 private final long position;
78
79 /**
80 * Constructs a new event of the specified type, originating from the
81 * specified line.
82 *
83 * @param line the source of this event
|