Package eu.bandm.tools.message
Class MessageStore_.ListModel
java.lang.Object
javax.swing.AbstractListModel<M>
eu.bandm.tools.message.MessageStore_.ListModel
- All Implemented Interfaces:
Serializable
,ListModel<M>
- Enclosing class:
MessageStore_<M extends Message>
Standard specialisation of
AbstractListModel
.
Usage is like ..
frame = new JFrame(); list = new JList(); list.setModel(myMessageStore.getListModel()); frame.getContentPane().add(list); frame.pack(); frame.setVisibiliy(true);Own specializations are inserted by ...
class myListModel extends MessageStore.ListModel {...} myMessageStore.setListModel(myMessageStore.new MyListModel()) ;
- See Also:
-
Field Summary
Fields inherited from class javax.swing.AbstractListModel
listenerList
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetElementAt
(int pos) Returns the element at the given list position.int
getSize()
Returns the number of list items.void
notifyAdd
(int pos) Nofication that at the given position the data has changed.void
notifySortingChanged
(int j) Nofication that potentially everywhere the data may have changed because the sorting order has changed.Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
-
Constructor Details
-
ListModel
public ListModel()Only constructor.
-
-
Method Details
-
notifyAdd
public void notifyAdd(int pos) Nofication that at the given position the data has changed. Triggers graphic repainting.- Parameters:
pos
- the position number of the message which has been added.
-
notifySortingChanged
public void notifySortingChanged(int j) Nofication that potentially everywhere the data may have changed because the sorting order has changed. Triggers graphic repainting.- Parameters:
j
- the current size of the message store.
-
getSize
public int getSize()Returns the number of list items. Callback needed by the Swing kernel. -
getElementAt
Returns the element at the given list position. Callback needed by the Swing kernel.
-