Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.neomedia
Class DeviceConfigurationComboBoxModel

java.lang.Object
  extended by net.java.sip.communicator.impl.neomedia.DeviceConfigurationComboBoxModel
All Implemented Interfaces:
HierarchyListener, PropertyChangeListener, EventListener, ComboBoxModel, ListModel

public class DeviceConfigurationComboBoxModel
extends Object
implements ComboBoxModel, PropertyChangeListener, HierarchyListener

Author:
Lubomir Marinov, Damian Minkov

Nested Class Summary
static class DeviceConfigurationComboBoxModel.CaptureDevice
          Encapsulates CaptureDeviceInfo
 
Field Summary
static int AUDIO
          Type of the model - audio.
static int AUDIO_CAPTURE
          Audio Capture Device.
static int AUDIO_NOTIFY
          Audio device for notification sounds.
static int AUDIO_PLAYBACK
          Audio playback device.
static int VIDEO
          Type of the model - video.
 
Constructor Summary
DeviceConfigurationComboBoxModel(Component parent, DeviceConfiguration deviceConfiguration, int type)
          Creates device combobox model
 
Method Summary
 void addListDataListener(ListDataListener listener)
           
protected  void fireContentsChanged(int index0, int index1)
          Change of the content.
 Object getElementAt(int index)
           
 Object getSelectedItem()
           
 int getSize()
           
 void hierarchyChanged(HierarchyEvent e)
          We listen when the component was hidden in order to release resources, remove listener to clean this instance.
 void propertyChange(PropertyChangeEvent event)
          We listen for changes in the devices in order to update the list of devices we show.
 void removeListDataListener(ListDataListener listener)
           
 void setSelectedItem(Object item)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUDIO

public static final int AUDIO
Type of the model - audio.

See Also:
Constant Field Values

VIDEO

public static final int VIDEO
Type of the model - video.

See Also:
Constant Field Values

AUDIO_CAPTURE

public static final int AUDIO_CAPTURE
Audio Capture Device.

See Also:
Constant Field Values

AUDIO_PLAYBACK

public static final int AUDIO_PLAYBACK
Audio playback device.

See Also:
Constant Field Values

AUDIO_NOTIFY

public static final int AUDIO_NOTIFY
Audio device for notification sounds.

See Also:
Constant Field Values
Constructor Detail

DeviceConfigurationComboBoxModel

public DeviceConfigurationComboBoxModel(Component parent,
                                        DeviceConfiguration deviceConfiguration,
                                        int type)
Creates device combobox model

Parameters:
parent - the parent component
deviceConfiguration - the current device configuration
type - the device - audio/video
Method Detail

addListDataListener

public void addListDataListener(ListDataListener listener)
Specified by:
addListDataListener in interface ListModel

fireContentsChanged

protected void fireContentsChanged(int index0,
                                   int index1)
Change of the content.

Parameters:
index0 - from index.
index1 - to index.

getElementAt

public Object getElementAt(int index)
Specified by:
getElementAt in interface ListModel

getSelectedItem

public Object getSelectedItem()
Specified by:
getSelectedItem in interface ComboBoxModel

getSize

public int getSize()
Specified by:
getSize in interface ListModel

removeListDataListener

public void removeListDataListener(ListDataListener listener)
Specified by:
removeListDataListener in interface ListModel

setSelectedItem

public void setSelectedItem(Object item)
Specified by:
setSelectedItem in interface ComboBoxModel

propertyChange

public void propertyChange(PropertyChangeEvent event)
We listen for changes in the devices in order to update the list of devices we show.

Specified by:
propertyChange in interface PropertyChangeListener
Parameters:
event - the event.

hierarchyChanged

public void hierarchyChanged(HierarchyEvent e)
We listen when the component was hidden in order to release resources, remove listener to clean this instance.

Specified by:
hierarchyChanged in interface HierarchyListener
Parameters:
e - the event.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.