Bartosz Firyn (SarXos)

com.github.sarxos.webcam
Class WebcamDiscoveryEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.github.sarxos.webcam.WebcamDiscoveryEvent
All Implemented Interfaces:
Serializable

public class WebcamDiscoveryEvent
extends EventObject

This event is generated when webcam has been found or lost.

Author:
Bartosz Firyn (sarxos)
See Also:
Serialized Form

Field Summary
static int ADDED
          Event type informing about newly connected webcam.
static int REMOVED
          Event type informing about lately disconnected webcam.
 
Constructor Summary
WebcamDiscoveryEvent(Webcam webcam, int type)
          Create new webcam discovery event.
 
Method Summary
 int getType()
          Return event type (webcam connected / disconnected)
 Webcam getWebcam()
          Return the webcam which has been found or removed.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ADDED

public static final int ADDED
Event type informing about newly connected webcam.

See Also:
Constant Field Values

REMOVED

public static final int REMOVED
Event type informing about lately disconnected webcam.

See Also:
Constant Field Values
Constructor Detail

WebcamDiscoveryEvent

public WebcamDiscoveryEvent(Webcam webcam,
                            int type)
Create new webcam discovery event.

Parameters:
webcam - the webcam which has been found or removed
type - the event type
See Also:
ADDED, REMOVED
Method Detail

getWebcam

public Webcam getWebcam()
Return the webcam which has been found or removed.

Returns:
Webcam instance

getType

public int getType()
Return event type (webcam connected / disconnected)

Returns:
Integer value
See Also:
ADDED, REMOVED

Bartosz Firyn (SarXos)

Copyright © 2012-2013 Bartosz Firyn (SarXos). All Rights Reserved.