public class DeviceConfigurationComboBoxModel
extends java.lang.Object
implements javax.swing.ComboBoxModel, javax.swing.ListModel, java.beans.PropertyChangeListener
Modifier and Type | Class and Description |
---|---|
static class |
DeviceConfigurationComboBoxModel.CaptureDevice
Encapsulates a CaptureDeviceInfo for the purposes of its display
in the user interface.
|
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
DeviceConfigurationComboBoxModel(org.jitsi.impl.neomedia.device.DeviceConfiguration deviceConfiguration,
int type)
Creates device combobox model
|
Modifier and Type | Method and Description |
---|---|
void |
addListDataListener(javax.swing.event.ListDataListener listener) |
protected void |
fireContentsChanged(int index0,
int index1)
Change of the content.
|
java.lang.Object |
getElementAt(int index) |
java.lang.Object |
getSelectedItem() |
int |
getSize() |
void |
propertyChange(java.beans.PropertyChangeEvent ev)
Notifies this instance about changes in the values of the properties of
deviceConfiguration so that this instance keeps itself
up-to-date with respect to the list of devices. |
void |
removeListDataListener(javax.swing.event.ListDataListener listener) |
void |
setSelectedItem(java.lang.Object item) |
public static final int AUDIO
public static final int AUDIO_CAPTURE
public static final int AUDIO_NOTIFY
public static final int AUDIO_PLAYBACK
public static final int VIDEO
public DeviceConfigurationComboBoxModel(org.jitsi.impl.neomedia.device.DeviceConfiguration deviceConfiguration, int type)
parent
- the parent componentdeviceConfiguration
- the current device configurationtype
- the device - audio/videopublic void addListDataListener(javax.swing.event.ListDataListener listener)
addListDataListener
in interface javax.swing.ListModel
protected void fireContentsChanged(int index0, int index1)
index0
- from index.index1
- to index.public java.lang.Object getElementAt(int index)
getElementAt
in interface javax.swing.ListModel
public java.lang.Object getSelectedItem()
getSelectedItem
in interface javax.swing.ComboBoxModel
public int getSize()
getSize
in interface javax.swing.ListModel
public void propertyChange(java.beans.PropertyChangeEvent ev)
deviceConfiguration
so that this instance keeps itself
up-to-date with respect to the list of devices.propertyChange
in interface java.beans.PropertyChangeListener
ev
- a PropertyChangeEvent which describes the name of the
property whose value has changed and the old and new values of that
propertypublic void removeListDataListener(javax.swing.event.ListDataListener listener)
removeListDataListener
in interface javax.swing.ListModel
public void setSelectedItem(java.lang.Object item)
setSelectedItem
in interface javax.swing.ComboBoxModel
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.