public class SelectivePlasticListModel extends AbstractListModel<Object> implements ListDataListener, ComboBoxModel<Object>
ApplicationItem objects,
and optionally the ALL_LISTENERS string.
The purpose of this class is to give you the subset of the applications
which support a given PLASTIC message ID.
Applications which support all messages are included.
For convenience, this class implements ComboBoxModel as well, but you don't need to use the selection if you don't want.
| Modifier and Type | Field and Description |
|---|---|
static String |
ALL_LISTENERS |
listenerList| Constructor and Description |
|---|
SelectivePlasticListModel(ListModel<uk.ac.starlink.plastic.ApplicationItem> base,
URI messageId,
boolean includeAll,
uk.ac.starlink.plastic.HubManager excludeApp)
Constructs a new list model specifying whether certain particular
options are included.
|
| Modifier and Type | Method and Description |
|---|---|
void |
contentsChanged(ListDataEvent evt) |
Object |
getElementAt(int i) |
Object |
getSelectedItem() |
int |
getSize() |
void |
intervalAdded(ListDataEvent evt) |
void |
intervalRemoved(ListDataEvent evt) |
void |
setSelectedItem(Object item) |
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListDataListener, removeListDataListenerpublic static final String ALL_LISTENERS
public SelectivePlasticListModel(ListModel<uk.ac.starlink.plastic.ApplicationItem> base, URI messageId, boolean includeAll, uk.ac.starlink.plastic.HubManager excludeApp)
base - base list model; should contain
ApplicationItemsmessageId - PLASTIC message id to be supported by all the
apps in this listincludeAll - true iff the list should include an
"All Listeners" optionexcludeApp - plastic listener manager whose ID will be
excluded from the list (typically represents the
sender application)public Object getElementAt(int i)
getElementAt in interface ListModel<Object>public void setSelectedItem(Object item)
setSelectedItem in interface ComboBoxModel<Object>public Object getSelectedItem()
getSelectedItem in interface ComboBoxModel<Object>public void contentsChanged(ListDataEvent evt)
contentsChanged in interface ListDataListenerpublic void intervalAdded(ListDataEvent evt)
intervalAdded in interface ListDataListenerpublic void intervalRemoved(ListDataEvent evt)
intervalRemoved in interface ListDataListenerCopyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.