comm API
Version 2.0

javax.comm
Class ParallelPortEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byjavax.comm.ParallelPortEvent
All Implemented Interfaces:
Serializable

public class ParallelPortEvent
extends EventObject

A parallel port event.

See Also:
ParallelPort, ParallelPortEventListener, EventObject, Serialized Form

Field Summary
 int eventType
          Deprecated. Replaced by getEventType().
static int PAR_EV_BUFFER
          An error occurred on the port.
static int PAR_EV_ERROR
          The port's output buffer is empty.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ParallelPortEvent(ParallelPort srcport, int eventtype, boolean oldvalue, boolean newvalue)
          Constructs a ParallelPortEvent with the specified parallel port, event type, old and new values.
 
Method Summary
 int getEventType()
          Gets the type of this event.
 boolean getNewValue()
          Gets the new value of the state change that caused the ParallelPortEvent to be propagated.
 boolean getOldValue()
          Gets the old value of the state change that caused the ParallelPortEvent to be propagated.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

eventType

public int eventType
Deprecated. Replaced by getEventType().

For compatibility with version 1.0 of the CommAPI only.


PAR_EV_ERROR

public static final int PAR_EV_ERROR
The port's output buffer is empty.

See Also:
Constant Field Values

PAR_EV_BUFFER

public static final int PAR_EV_BUFFER
An error occurred on the port.

See Also:
Constant Field Values
Constructor Detail

ParallelPortEvent

public ParallelPortEvent(ParallelPort srcport,
                         int eventtype,
                         boolean oldvalue,
                         boolean newvalue)
Constructs a ParallelPortEvent with the specified parallel port, event type, old and new values.

Parameters:
srcport - source parallel port
eventtype - event type
oldvalue - old value
newvalue - new value
Method Detail

getEventType

public int getEventType()
Gets the type of this event.

Returns:
integer that can be either PAR_EV_ERROR or PAR_EV_BUFFER.
Since:
CommAPI 1.1

getNewValue

public boolean getNewValue()
Gets the new value of the state change that caused the ParallelPortEvent to be propagated.

Returns:
true or false.

getOldValue

public boolean getOldValue()
Gets the old value of the state change that caused the ParallelPortEvent to be propagated.

Returns:
true or false.

comm API
Version 2.0

http://java.sun.com/products/javacomm