public class ChangingComboBoxModel
extends javax.swing.DefaultComboBoxModel
ChangeListeners
and javax.swing.event.ActionListeners of changes in the selection.| Constructor | Description |
|---|---|
ChangingComboBoxModel() |
Constructs an empty model.
|
ChangingComboBoxModel(java.lang.Object[] items) |
Constructs a model with a given initial list of items.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addActionListener(java.awt.event.ActionListener listener) |
Adds a listener which is notified whenever the selection changes.
|
void |
addChangeListener(javax.swing.event.ChangeListener listener) |
Adds a listener which is notified whenever the selection changes.
|
protected void |
fireActionPerformed(java.lang.Object source) |
Called to notify listeners of a change.
|
protected void |
fireSelectionChanged(java.lang.Object source) |
Called to notify listeners of a change.
|
void |
removeActionListener(java.awt.event.ActionListener listener) |
Removes a listener previously added by
#addListener. |
void |
removeChangeListener(javax.swing.event.ChangeListener listener) |
Removes a listener previously added by
#addListener. |
void |
setSelectedItem(java.lang.Object item) |
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListenerpublic ChangingComboBoxModel()
public ChangingComboBoxModel(java.lang.Object[] items)
items - initial list of items in the modelpublic void addChangeListener(javax.swing.event.ChangeListener listener)
listener - listener to addpublic void removeChangeListener(javax.swing.event.ChangeListener listener)
#addListener.listener - listener to removepublic void addActionListener(java.awt.event.ActionListener listener)
listener - listener to addpublic void removeActionListener(java.awt.event.ActionListener listener)
#addListener.listener - listener to removepublic void setSelectedItem(java.lang.Object item)
setSelectedItem in class javax.swing.DefaultComboBoxModelprotected void fireSelectionChanged(java.lang.Object source)
source - change sourceprotected void fireActionPerformed(java.lang.Object source)
source - change sourceCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.