|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jaxfront.core.util.Queue
com.jaxfront.core.util.QueueListModel
public class QueueListModel
Constructor Summary | |
---|---|
QueueListModel()
|
Method Summary | |
---|---|
void |
addListDataListener(javax.swing.event.ListDataListener l)
Adds a listener to the list that's notified each time a change to the data model occurs. |
java.lang.Object |
dequeue()
Removes the element at the top of the queue. |
java.lang.Object |
enqueue(java.lang.Object element)
Inserts a new element at the rear of the queue. |
java.lang.Object |
enqueueUnique(java.lang.Object element)
Inserts a new element at the rear of the queue. |
java.lang.Object |
getElementAt(int index)
|
javax.swing.event.ListDataListener[] |
getListDataListeners()
Returns an array of all the list data listeners registered on this AbstractListModel . |
java.util.EventListener[] |
getListeners(java.lang.Class listenerType)
Returns an array of all the objects currently registered as FooListener s upon this model. |
int |
getSize()
|
void |
removeListDataListener(javax.swing.event.ListDataListener l)
Removes a listener from the list that's notified each time a change to the data model occurs. |
void |
setSelectedItem(java.lang.Object anObject)
Set the value of the selected item. |
Methods inherited from class com.jaxfront.core.util.Queue |
---|
add, add, addAll, addAll, clear, contains, containsAll, empty, exportToCSV, front, get, getItems, indexOf, initFromCSV, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray, toInverseArray, toInverseArray |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
equals, hashCode |
Constructor Detail |
---|
public QueueListModel()
Method Detail |
---|
public void addListDataListener(javax.swing.event.ListDataListener l)
addListDataListener
in interface javax.swing.ListModel
l
- the ListDataListener
to be addedpublic void removeListDataListener(javax.swing.event.ListDataListener l)
removeListDataListener
in interface javax.swing.ListModel
l
- the ListDataListener
to be removedpublic javax.swing.event.ListDataListener[] getListDataListeners()
AbstractListModel
.
ListDataListener
s, or an
empty array if no list data listeners are currently registeredaddListDataListener(javax.swing.event.ListDataListener)
,
removeListDataListener(javax.swing.event.ListDataListener)
public java.util.EventListener[] getListeners(java.lang.Class listenerType)
FooListener
s upon this model.
FooListener
s are registered using the
addFooListener
method.
You can specify the listenerType
argument with a class
literal, such as FooListener.class
. For
example, you can query a list model m
for its list data
listeners with the following code:
ListDataListener[] ldls = (ListDataListener[]) (m.getListeners(ListDataListener.class));If no such listeners exist, this method returns an empty array.
listenerType
- the type of listeners requested; this parameter should specify
an interface that descends from
java.util.EventListener
FooListener
s on this model, or an
empty array if no such listeners have been added
java.lang.ClassCastException
- if listenerType
doesn't specify a class or
interface that implements
java.util.EventListener
getListDataListeners()
public int getSize()
getSize
in interface javax.swing.ListModel
public java.lang.Object getElementAt(int index)
getElementAt
in interface javax.swing.ListModel
public void setSelectedItem(java.lang.Object anObject)
anObject
- The combo box value or null for no selection.public java.lang.Object enqueue(java.lang.Object element)
Queue
enqueue
in class Queue
element
- element to be inserted.public java.lang.Object enqueueUnique(java.lang.Object element)
Queue
enqueueUnique
in class Queue
element
- element to be inserted.public java.lang.Object dequeue()
Queue
dequeue
in class Queue
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |