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>

public class MessageStore_.ListModel extends AbstractListModel<M>
standard specialisation of AbstractListModel.

Usage is like ... // cf applics/src/eu/bandm/bpm/aspPcg/Main.java
    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:
  • Constructor Details

    • ListModel

      public ListModel()
  • Method Details

    • notifyAdd

      public void notifyAdd(int pos)
      Nofication that at the given position the data has changed. Triggers graphic repainting.
    • notifySortingChanged

      public void notifySortingChanged(int j)
      Nofication that potentially everywhere the data may have changed. Triggers graphic repainting.
    • getSize

      public int getSize()
      Returns the number of list items. Callback needed by the Swing kernel.
    • getElementAt

      public M getElementAt(int pos)
      Returns the element at the given list position. Callback needed by the Swing kernel.