javax.sound.sampled
public class: LineEvent [javadoc |
source]
java.lang.Object
java.util.EventObject
javax.sound.sampled.LineEvent
The
LineEvent
class encapsulates information that a line
sends its listeners whenever the line opens, closes, starts, or stops.
Each of these four state changes is represented by a corresponding
type of event. A listener receives the event as a parameter to its
update method. By querying the event,
the listener can learn the type of event, the line responsible for
the event, and how much data the line had processed when the event occurred.
Although this class implements Serializable, attempts to
serialize a LineEvent
object will fail.
Also see:
- Line
- LineListener#update
- author:
Kara
- Kytle
- since:
1.3
-
- serial:
exclude
-
Nested Class Summary: |
---|
public static class | LineEvent.Type | The LineEvent.Type inner class identifies what kind of event occurred on a line.
Static instances are provided for the common types (OPEN, CLOSE, START, and STOP). |
Constructor: |
public LineEvent(Line line,
Type type,
long position) {
super(line);
this.type = type;
this.position = position;
}
Constructs a new event of the specified type, originating from the specified line. Parameters:
line - the source of this event
type - the event type (OPEN , CLOSE , START , or STOP )
position - the number of sample frames that the line had already processed when the event occurred,
or AudioSystem#NOT_SPECIFIED
Throws:
IllegalArgumentException - if line is
null .
|
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |