com.teamdev.jxcapture
Class MediaSource

java.lang.Object
  extended by com.teamdev.jxcapture.MediaSource
Direct Known Subclasses:
AudioSource, ImageSource

public abstract class MediaSource
extends java.lang.Object

Abstract media source device.


Field Summary
static java.lang.String PROPERTY_ACTIVE
           
static java.lang.String PROPERTY_ENABLED
           
static java.lang.String PROPERTY_NAME
           
 
Constructor Summary
protected MediaSource()
           
protected MediaSource(java.lang.String name)
           
protected MediaSource(java.lang.String name, boolean enabled)
           
 
Method Summary
 void activate()
          Activates this media source.
 void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
          Add a PropertyChangeListener to the listener list.
 void deactivate()
          Deactivates this media source.
 java.lang.String getName()
          Returns the system name of the device.
protected  java.beans.PropertyChangeSupport getPropertyChangeSupport()
           
 boolean isActive()
          Check if this source is active.
 boolean isEnabled()
          Check if device is enabled.
 void release()
          Releases this media source.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Remove a PropertyChangeListener from the listener list.
protected  void setEnabled(boolean enabled)
           
protected  void setName(java.lang.String name)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTY_ENABLED

public static final java.lang.String PROPERTY_ENABLED
See Also:
Constant Field Values

PROPERTY_NAME

public static final java.lang.String PROPERTY_NAME
See Also:
Constant Field Values

PROPERTY_ACTIVE

public static final java.lang.String PROPERTY_ACTIVE
See Also:
Constant Field Values
Constructor Detail

MediaSource

protected MediaSource(java.lang.String name,
                      boolean enabled)

MediaSource

protected MediaSource(java.lang.String name)

MediaSource

protected MediaSource()
Method Detail

setName

protected void setName(java.lang.String name)

setEnabled

protected void setEnabled(boolean enabled)

getName

public java.lang.String getName()
Returns the system name of the device.

Returns:
device name

isEnabled

public boolean isEnabled()
Check if device is enabled.

Returns:
true if device is enabled; false otherwise

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.

Parameters:
propertyName - The name of the property to listen on.
listener - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list.

Parameters:
listener - The PropertyChangeListener to be removed

getPropertyChangeSupport

protected java.beans.PropertyChangeSupport getPropertyChangeSupport()

activate

public void activate()
Activates this media source.


deactivate

public void deactivate()
Deactivates this media source.


isActive

public boolean isActive()
Check if this source is active.

Returns:
true if source is active; false otherwise

release

public void release()
Releases this media source.