Bartosz Firyn (SarXos)

com.github.sarxos.webcam
Class WebcamEvent

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

public class WebcamEvent
extends EventObject

Webcam event.

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

Constructor Summary
WebcamEvent(WebcamEventType type, Webcam w)
          Webcam event.
WebcamEvent(WebcamEventType type, Webcam w, BufferedImage image)
          Webcam event.
 
Method Summary
 BufferedImage getImage()
          Return image acquired by webcam.
 Webcam getSource()
           
 WebcamEventType getType()
          Return event type.
 
Methods inherited from class java.util.EventObject
toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WebcamEvent

public WebcamEvent(WebcamEventType type,
                   Webcam w)
Webcam event.

Parameters:
type - the event type
w - the webcam object

WebcamEvent

public WebcamEvent(WebcamEventType type,
                   Webcam w,
                   BufferedImage image)
Webcam event.

Parameters:
type - the event type
w - the webcam object
image - the image acquired from webcam
Method Detail

getSource

public Webcam getSource()
Overrides:
getSource in class EventObject

getImage

public BufferedImage getImage()
Return image acquired by webcam. This method will return not-null object only in case new image acquisition event. For all other events, it will simply return null.

Returns:
Acquired image

getType

public WebcamEventType getType()
Return event type.

Returns:
Event type
See Also:
WebcamEventType

Bartosz Firyn (SarXos)

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